Loading pkgs/os-specific/bsd/openbsd/pkgs/boot-config.nix 0 → 100644 +32 −0 Original line number Diff line number Diff line { mkDerivation, lib, flex, byacc, compatHook, }: mkDerivation { path = "usr.sbin/config"; extraNativeBuildInputs = [ flex byacc compatHook ]; postPatch = '' rm $BSDSRCDIR/usr.sbin/config/ukc.c rm $BSDSRCDIR/usr.sbin/config/ukcutil.c rm $BSDSRCDIR/usr.sbin/config/cmd.c rm $BSDSRCDIR/usr.sbin/config/exec_elf.c ''; buildPhase = '' for f in *.l; do flex $f; done for f in *.y; do yacc -H ''${f%.y}.h $f; done for f in *.c; do $CC -I$TMP/include -DMAKE_BOOTSTRAP -c $f; done $CC *.o -o config ''; meta.platforms = lib.platforms.linux; } pkgs/os-specific/bsd/openbsd/pkgs/boot-ctags.nix 0 → 100644 +25 −0 Original line number Diff line number Diff line { mkDerivation, lib, flex, byacc, compatHook, }: mkDerivation { path = "usr.bin/ctags"; extraNativeBuildInputs = [ flex byacc compatHook ]; buildPhase = '' for f in *.l; do flex $f; done for f in *.y; do yacc -H ''${f%.y}.h $f; done for f in *.c; do $CC -I$TMP/include -DMAKE_BOOTSTRAP -c $f; done $CC *.o -o ctags ''; meta.platforms = lib.platforms.linux; } pkgs/os-specific/bsd/openbsd/pkgs/compat/include/err.h 0 → 100644 +30 −0 Original line number Diff line number Diff line #pragma once #include_next <err.h> #include <errno.h> #include <stdarg.h> static inline void __attribute__((__format__(printf, 3, 4))) errc(int eval, int code, const char *fmt, ...) { // verr uses the error code from errno // No need to keep the old value since this is noreturn anyway errno = code; va_list args; va_start(args, fmt); verr(eval, fmt, args); va_end(args); } static inline void __attribute__((__format__(printf, 2, 3))) warnc(int code, const char *fmt, ...) { // verr uses the error code from errno int old_errno = errno; errno = code; va_list args; va_start(args, fmt); vwarn(fmt, args); va_end(args); errno = old_errno; } pkgs/os-specific/bsd/openbsd/pkgs/compat/include/fcntl.h 0 → 100644 +6 −0 Original line number Diff line number Diff line #pragma once #include_next <fcntl.h> // Linux doesn't let you lock during open, make these do nothing #define O_EXLOCK 0 #define O_SHLOCK 0 pkgs/os-specific/bsd/openbsd/pkgs/compat/include/sys/cdefs.h 0 → 100644 +4 −0 Original line number Diff line number Diff line #include_next <sys/cdefs.h> #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) Loading
pkgs/os-specific/bsd/openbsd/pkgs/boot-config.nix 0 → 100644 +32 −0 Original line number Diff line number Diff line { mkDerivation, lib, flex, byacc, compatHook, }: mkDerivation { path = "usr.sbin/config"; extraNativeBuildInputs = [ flex byacc compatHook ]; postPatch = '' rm $BSDSRCDIR/usr.sbin/config/ukc.c rm $BSDSRCDIR/usr.sbin/config/ukcutil.c rm $BSDSRCDIR/usr.sbin/config/cmd.c rm $BSDSRCDIR/usr.sbin/config/exec_elf.c ''; buildPhase = '' for f in *.l; do flex $f; done for f in *.y; do yacc -H ''${f%.y}.h $f; done for f in *.c; do $CC -I$TMP/include -DMAKE_BOOTSTRAP -c $f; done $CC *.o -o config ''; meta.platforms = lib.platforms.linux; }
pkgs/os-specific/bsd/openbsd/pkgs/boot-ctags.nix 0 → 100644 +25 −0 Original line number Diff line number Diff line { mkDerivation, lib, flex, byacc, compatHook, }: mkDerivation { path = "usr.bin/ctags"; extraNativeBuildInputs = [ flex byacc compatHook ]; buildPhase = '' for f in *.l; do flex $f; done for f in *.y; do yacc -H ''${f%.y}.h $f; done for f in *.c; do $CC -I$TMP/include -DMAKE_BOOTSTRAP -c $f; done $CC *.o -o ctags ''; meta.platforms = lib.platforms.linux; }
pkgs/os-specific/bsd/openbsd/pkgs/compat/include/err.h 0 → 100644 +30 −0 Original line number Diff line number Diff line #pragma once #include_next <err.h> #include <errno.h> #include <stdarg.h> static inline void __attribute__((__format__(printf, 3, 4))) errc(int eval, int code, const char *fmt, ...) { // verr uses the error code from errno // No need to keep the old value since this is noreturn anyway errno = code; va_list args; va_start(args, fmt); verr(eval, fmt, args); va_end(args); } static inline void __attribute__((__format__(printf, 2, 3))) warnc(int code, const char *fmt, ...) { // verr uses the error code from errno int old_errno = errno; errno = code; va_list args; va_start(args, fmt); vwarn(fmt, args); va_end(args); errno = old_errno; }
pkgs/os-specific/bsd/openbsd/pkgs/compat/include/fcntl.h 0 → 100644 +6 −0 Original line number Diff line number Diff line #pragma once #include_next <fcntl.h> // Linux doesn't let you lock during open, make these do nothing #define O_EXLOCK 0 #define O_SHLOCK 0
pkgs/os-specific/bsd/openbsd/pkgs/compat/include/sys/cdefs.h 0 → 100644 +4 −0 Original line number Diff line number Diff line #include_next <sys/cdefs.h> #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x)))