From: Christos Zoulas Date: Mon, 4 Feb 2008 20:51:16 +0000 (+0000) Subject: Debian Fixes via rrt@ X-Git-Tag: FILE5_05~536 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c1626a196a7b6c0f6aea4c3d0c9f27cac037c72;p=file Debian Fixes via rrt@ --- diff --git a/ChangeLog b/ChangeLog index f9cc7bc4..43c775cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ + +2007-02-04 15:50 Christos Zoulas + + * Debian fixes (Reuben Thomas) + 2007-02-04 11:31 Christos Zoulas * !mine: annotations in magic files (Reuben Thomas) diff --git a/Makefile.in b/Makefile.in index d74bfd99..69a43875 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,7 +35,7 @@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure ChangeLog config.guess config.sub \ - depcomp install-sh ltmain.sh missing mkinstalldirs + depcomp install-sh ltcf-c.sh ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in @@ -46,8 +46,6 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = -depcomp = -am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -182,7 +180,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # don't enforce GNU packaging standards -AUTOMAKE_OPTIONS = foreign no-dependencies +AUTOMAKE_OPTIONS = foreign EXTRA_DIST = LEGAL.NOTICE MAINT PORTING SUBDIRS = src magic doc python all: config.h diff --git a/configure b/configure index a81d93d5..4edff89d 100755 --- a/configure +++ b/configure @@ -22288,10 +22288,8 @@ fi if test "$enable_largefile" != no; then - { echo "$as_me:$LINENO: checking for special C compiler options needed for large files= -" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files= -... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else diff --git a/magic/Magdir/clarion b/magic/Magdir/clarion new file mode 100644 index 00000000..5f5f6e75 --- /dev/null +++ b/magic/Magdir/clarion @@ -0,0 +1,26 @@ + +#------------------------------------------------------------------------------ +# clarion: file(1) magic for # Clarion Personal/Professional Developer +# (v2 and above) +# From: Julien Blache + +# Database files +# signature +0 leshort 0x3343 Clarion Developer (v2 and above) data file +# attributes +>2 leshort &0x0001 \b, locked +>2 leshort &0x0004 \b, encrypted +>2 leshort &0x0008 \b, memo file exists +>2 leshort &0x0010 \b, compressed +>2 leshort &0x0040 \b, read only +# number of records +>5 lelong x \b, %ld records + +# Memo files +0 leshort 0x334d Clarion Developer (v2 and above) memo data + +# Key/Index files +# No magic? :( + +# Help files +0 leshort 0x49e0 Clarion Developer (v2 and above) help data diff --git a/magic/Magdir/erlang b/magic/Magdir/erlang new file mode 100644 index 00000000..59f55ecb --- /dev/null +++ b/magic/Magdir/erlang @@ -0,0 +1,18 @@ + +#------------------------------------------------------------------------------ +# erlang: file(1) magic for Erlang JAM and BEAM files +# URL: http://www.erlang.org/faq/x779.html#AEN812 + +# OTP R3-R4 +0 string \0177BEAM! Old Erlang BEAM file +>6 short >0 - version %d + +# OTP R5 and onwards +0 string FOR1 +>8 string BEAM Erlang BEAM file + +# 4.2 version may have a copyright notice! +4 string Tue Jan 22 14:32:44 MET 1991 Erlang JAM file - version 4.2 +79 string Tue Jan 22 14:32:44 MET 1991 Erlang JAM file - version 4.2 + +4 string 1.0 Fri Feb 3 09:55:56 MET 1995 Erlang JAM file - version 4.3 diff --git a/magic/Magdir/gnumeric b/magic/Magdir/gnumeric new file mode 100644 index 00000000..76dfa906 --- /dev/null +++ b/magic/Magdir/gnumeric @@ -0,0 +1,7 @@ + +#------------------------------------------------------------------------------ +# gnumeric: file(1) magic for Gnumeric spreadsheet +# This entry is only semi-helpful, as Gnumeric compresses its files, so +# they will ordinarily reported as "compressed", but at least -z helps +39 string = + +0 regex [Cc]onstant[[:space:]]+[Ss]tory Inform source text diff --git a/magic/Magdir/kde b/magic/Magdir/kde new file mode 100644 index 00000000..d81ee693 --- /dev/null +++ b/magic/Magdir/kde @@ -0,0 +1,10 @@ + +#------------------------------------------------------------------------------ +# kde: file(1) magic for KDE + +0 string [KDE\ Desktop\ Entry] KDE desktop entry +!:mime application/x-kdelnk +0 string #\ KDE\ Config\ File KDE config file +!:mime application/x-kdelnk +0 string #\ xmcd xmcd database file for kscd +!:mime text/x-xmcd diff --git a/magic/Magdir/llvm b/magic/Magdir/llvm new file mode 100644 index 00000000..8c1610cd --- /dev/null +++ b/magic/Magdir/llvm @@ -0,0 +1,10 @@ + +#------------------------------------------------------------------------------ +# llvm: file(1) magic for LLVM byte-codes +# URL: http://llvm.cs.uiuc.edu/docs/BytecodeFormat.html#signature +# From: Al Stone + +0 string llvm LLVM byte-codes, uncompressed +0 string llvc0 LLVM byte-codes, null compression +0 string llvc1 LLVM byte-codes, gzip compression +0 string llvc2 LLVM byte-codes, bzip2 compression diff --git a/magic/Magdir/lua b/magic/Magdir/lua new file mode 100644 index 00000000..ab610fb9 --- /dev/null +++ b/magic/Magdir/lua @@ -0,0 +1,16 @@ + +#------------------------------------------------------------------------------ +# lua: file(1) magic for Lua scripting language +# URL: http://www.lua.org/ +# From: Reuben Thomas , Seo Sanghyeon + +# Lua scripts +0 string/b #!\ /usr/bin/lua Lua script text executable +0 string/b #!\ /usr/local/bin/lua Lua script text executable +0 string #!/usr/bin/env\ lua Lua script text executable +0 string #!\ /usr/bin/env\ lua Lua script text executable + +# Lua bytecode +0 string \033Lua Lua bytecode, +>4 byte 0x50 version 5.0 +>4 byte 0x51 version 5.1 diff --git a/magic/Magdir/luks b/magic/Magdir/luks new file mode 100644 index 00000000..2ab23935 --- /dev/null +++ b/magic/Magdir/luks @@ -0,0 +1,12 @@ + +#------------------------------------------------------------------------------ +# luks: file(1) magic for Linux Unified Key Setup +# URL: http://luks.endorphin.org/spec +# From: Anthon van der Neut + +0 string LUKS\xba\xbe LUKS encrypted file, +>6 beshort x ver %d +>8 string x [%s, +>40 string x %s, +>72 string x %s] +>168 string x UUID: %s diff --git a/magic/Magdir/mathcad b/magic/Magdir/mathcad new file mode 100644 index 00000000..9acb3908 --- /dev/null +++ b/magic/Magdir/mathcad @@ -0,0 +1,7 @@ + +#------------------------------------------------------------------------------ +# mathcad: file(1) magic for Mathcad documents +# URL: http://www.mathsoft.com/ +# From: Josh Triplett + +0 string .MCAD\ Mathcad document diff --git a/magic/Magdir/mozilla b/magic/Magdir/mozilla new file mode 100644 index 00000000..06988606 --- /dev/null +++ b/magic/Magdir/mozilla @@ -0,0 +1,8 @@ + +#------------------------------------------------------------------------------ +# mozilla: file(1) magic for Mozilla XUL fastload files +# (XUL.mfasl and XPC.mfasl) +# URL: http://www.mozilla.org/ +# From: Josh Triplett + +0 string XPCOM\nMozFASL\r\n\x1A Mozilla XUL fastload data diff --git a/magic/Magdir/netware b/magic/Magdir/netware new file mode 100644 index 00000000..fbc16054 --- /dev/null +++ b/magic/Magdir/netware @@ -0,0 +1,6 @@ + +#------------------------------------------------------------------------------ +# netware: file(1) magic for NetWare Loadable Modules (NLMs) +# From: Mads Martin Joergensen + +0 string NetWare\ Loadable\ Module NetWare Loadable Module diff --git a/magic/Makefile.am b/magic/Makefile.am index 54135227..d93e89dc 100644 --- a/magic/Makefile.am +++ b/magic/Makefile.am @@ -50,6 +50,7 @@ Magdir/blit \ Magdir/bout \ Magdir/bsdi \ Magdir/btsnoop \ +Magdir/c-lang \ Magdir/c64 \ Magdir/cad \ Magdir/cafebabe \ @@ -57,7 +58,7 @@ Magdir/cddb \ Magdir/chord \ Magdir/cisco \ Magdir/citrus \ -Magdir/c-lang \ +Magdir/clarion \ Magdir/claris \ Magdir/clipper \ Magdir/commands \ @@ -80,6 +81,7 @@ Magdir/efi \ Magdir/elf \ Magdir/encore \ Magdir/epoc \ +Magdir/erlang \ Magdir/esri \ Magdir/fcs \ Magdir/filesystems \ @@ -94,6 +96,7 @@ Magdir/gcc \ Magdir/geos \ Magdir/gimp \ Magdir/gnu \ +Magdir/gnumeric \ Magdir/grace \ Magdir/gringotts \ Magdir/hitachi-sh \ @@ -103,6 +106,7 @@ Magdir/ibm370 \ Magdir/ibm6000 \ Magdir/iff \ Magdir/images \ +Magdir/inform \ Magdir/intel \ Magdir/interleaf \ Magdir/island \ @@ -110,16 +114,21 @@ Magdir/ispell \ Magdir/java \ Magdir/jpeg \ Magdir/karma \ +Magdir/kde \ Magdir/lecter \ Magdir/lex \ Magdir/lif \ Magdir/linux \ Magdir/lisp \ +Magdir/llvm \ +Magdir/lua \ +Magdir/luks \ Magdir/mach \ Magdir/macintosh \ Magdir/magic \ Magdir/mail.news \ Magdir/maple \ +Magdir/mathcad \ Magdir/mathematica \ Magdir/matroska \ Magdir/mcrypt \ @@ -133,6 +142,7 @@ Magdir/mlssa \ Magdir/mmdf \ Magdir/modem \ Magdir/motorola \ +Magdir/mozilla \ Magdir/msdos \ Magdir/msvc \ Magdir/mup \ @@ -140,6 +150,7 @@ Magdir/natinst \ Magdir/ncr \ Magdir/netbsd \ Magdir/netscape \ +Magdir/netware \ Magdir/news \ Magdir/nitpicker \ Magdir/ocaml \ diff --git a/magic/Makefile.in b/magic/Makefile.in index 193bea89..704b131e 100644 --- a/magic/Makefile.in +++ b/magic/Makefile.in @@ -161,10 +161,13 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -pkgdata_DATA = magic magic.mime magic.mgc magic.mime.mgc -EXTRA_DIST = magic2mime Localstuff Header magic.mime $(magic_FRAGMENTS) -CLEANFILES = magic magic.mgc magic.mime.mgc +pkgdata_DATA = magic magic.mgc +EXTRA_DIST = Localstuff Header $(magic_FRAGMENTS) +CLEANFILES = magic magic.mgc @IS_CROSS_COMPILE_FALSE@FILE_COMPILE = $(top_builddir)/src/file + +# FIXME: Build file natively as well so that it can be used to compile +# the target's magic file @IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file magic_FRAGMENTS = \ Magdir/acorn \ @@ -190,23 +193,23 @@ Magdir/blit \ Magdir/bout \ Magdir/bsdi \ Magdir/btsnoop \ -Magdir/cad \ -Magdir/cafebabe \ Magdir/c-lang \ Magdir/c64 \ +Magdir/cad \ +Magdir/cafebabe \ Magdir/cddb \ Magdir/chord \ Magdir/cisco \ Magdir/citrus \ +Magdir/clarion \ Magdir/claris \ Magdir/clipper \ -Magdir/cracklib \ -Magdir/spec \ Magdir/commands \ Magdir/communications \ Magdir/compress \ Magdir/console \ Magdir/convex \ +Magdir/cracklib \ Magdir/ctags \ Magdir/dact \ Magdir/database \ @@ -215,11 +218,13 @@ Magdir/diff \ Magdir/digital \ Magdir/dolby \ Magdir/dump \ +Magdir/dyadic \ Magdir/editors \ Magdir/efi \ Magdir/elf \ Magdir/encore \ Magdir/epoc \ +Magdir/erlang \ Magdir/esri \ Magdir/fcs \ Magdir/filesystems \ @@ -230,10 +235,11 @@ Magdir/frame \ Magdir/freebsd \ Magdir/fsav \ Magdir/games \ -Magdir/geos \ Magdir/gcc \ +Magdir/geos \ Magdir/gimp \ Magdir/gnu \ +Magdir/gnumeric \ Magdir/grace \ Magdir/gringotts \ Magdir/hitachi-sh \ @@ -243,6 +249,7 @@ Magdir/ibm370 \ Magdir/ibm6000 \ Magdir/iff \ Magdir/images \ +Magdir/inform \ Magdir/intel \ Magdir/interleaf \ Magdir/island \ @@ -250,16 +257,21 @@ Magdir/ispell \ Magdir/java \ Magdir/jpeg \ Magdir/karma \ +Magdir/kde \ Magdir/lecter \ Magdir/lex \ Magdir/lif \ Magdir/linux \ Magdir/lisp \ +Magdir/llvm \ +Magdir/lua \ +Magdir/luks \ Magdir/mach \ Magdir/macintosh \ Magdir/magic \ Magdir/mail.news \ Magdir/maple \ +Magdir/mathcad \ Magdir/mathematica \ Magdir/matroska \ Magdir/mcrypt \ @@ -273,6 +285,7 @@ Magdir/mlssa \ Magdir/mmdf \ Magdir/modem \ Magdir/motorola \ +Magdir/mozilla \ Magdir/msdos \ Magdir/msvc \ Magdir/mup \ @@ -280,6 +293,7 @@ Magdir/natinst \ Magdir/ncr \ Magdir/netbsd \ Magdir/netscape \ +Magdir/netware \ Magdir/news \ Magdir/nitpicker \ Magdir/ocaml \ @@ -312,6 +326,7 @@ Magdir/rpm \ Magdir/rtf \ Magdir/sc \ Magdir/sccs \ +Magdir/scientific \ Magdir/sendmail \ Magdir/sequent \ Magdir/sgi \ @@ -321,9 +336,8 @@ Magdir/sinclair \ Magdir/sketch \ Magdir/smalltalk \ Magdir/sniffer \ -Magdir/dyadic \ -Magdir/scientific \ Magdir/softquad \ +Magdir/spec \ Magdir/spectrum \ Magdir/sql \ Magdir/sun \ @@ -337,8 +351,8 @@ Magdir/timezone \ Magdir/troff \ Magdir/tuxedo \ Magdir/typeset \ -Magdir/unknown \ Magdir/unicode \ +Magdir/unknown \ Magdir/uuencode \ Magdir/varied.out \ Magdir/varied.script \ @@ -548,7 +562,7 @@ uninstall-am: uninstall-pkgdataDATA uninstall uninstall-am uninstall-pkgdataDATA -magic: Header Localstuff $(magic_FRAGMENTS) +magic: Header Localstuff $(magic_FRAGMENTS) $(top_builddir)/src/file cat $(srcdir)/Header $(srcdir)/Localstuff > $@ for frag in $(magic_FRAGMENTS); do \ if test -f $(srcdir)/$$frag; then \ @@ -561,9 +575,6 @@ magic: Header Localstuff $(magic_FRAGMENTS) magic.mgc: magic $(FILE_COMPILE) -C -m magic - -magic.mime.mgc: magic.mime - $(FILE_COMPILE) -C -m $(srcdir)/magic.mime # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/apprentice.c b/src/apprentice.c index 9cba6d88..dc147f02 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -47,7 +47,7 @@ #endif #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.112 2008/02/04 16:33:46 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.113 2008/02/04 20:51:17 christos Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ @@ -1241,9 +1241,6 @@ parse_mime(struct magic_set *ms, struct magic_entry **mentryp, } EATAB; -#if 0 - file_magwarn(ms, "Description: %s\nNew type: %s", m->desc, l); -#endif for (i = 0; *l && ((isascii((unsigned char)*l) && isalnum((unsigned char)*l)) || strchr("-+/", *l)) && i < sizeof(m->mimetype); diff --git a/src/file.c b/src/file.c index 575b951f..4b366396 100644 --- a/src/file.c +++ b/src/file.c @@ -71,7 +71,7 @@ #include "patchlevel.h" #ifndef lint -FILE_RCSID("@(#)$File: file.c,v 1.117 2007/12/27 16:35:58 christos Exp $") +FILE_RCSID("@(#)$File: file.c,v 1.118 2008/02/04 20:51:17 christos Exp $") #endif /* lint */ @@ -349,8 +349,9 @@ main(int argc, char *argv[]) process(argv[optind], wid); } + c = magic->haderr ? 1 : 0; magic_close(magic); - return 0; + return c; } diff --git a/src/is_tar.c b/src/is_tar.c index 1d83336a..a9311117 100644 --- a/src/is_tar.c +++ b/src/is_tar.c @@ -45,7 +45,7 @@ #include "tar.h" #ifndef lint -FILE_RCSID("@(#)$File: is_tar.c,v 1.30 2008/01/26 18:45:16 christos Exp $") +FILE_RCSID("@(#)$File: is_tar.c,v 1.31 2008/02/04 20:51:17 christos Exp $") #endif #define isodigit(c) ( ((c) >= '0') && ((c) <= '7') ) @@ -85,7 +85,8 @@ file_is_tar(struct magic_set *ms, const unsigned char *buf, size_t nbytes) * Return * 0 if the checksum is bad (i.e., probably not a tar archive), * 1 for old UNIX tar file, - * 2 for Unix Std (POSIX) tar file. + * 2 for Unix Std (POSIX) tar file, + * 3 for GNU tar file. */ private int is_tar(const unsigned char *buf, size_t nbytes) diff --git a/src/magic.c b/src/magic.c index 03ae1b59..1bf85ddb 100644 --- a/src/magic.c +++ b/src/magic.c @@ -63,9 +63,18 @@ #include "patchlevel.h" #ifndef lint -FILE_RCSID("@(#)$File: magic.c,v 1.46 2008/01/30 20:36:13 christos Exp $") +FILE_RCSID("@(#)$File: magic.c,v 1.47 2008/02/04 20:51:17 christos Exp $") #endif /* lint */ +#ifndef PIPE_BUF +/* Get the PIPE_BUF from pathconf */ +#ifdef _PC_PIPE_BUF +#define PIPE_BUF pathconf(".", _PC_PIPE_BUF) +#else +#define PIPE_BUF 512 +#endif +#endif + #ifdef __EMX__ private char *apptypeName = NULL; protected int file_os2_apptype(struct magic_set *ms, const char *fn, diff --git a/src/print.c b/src/print.c index c28ee2e1..fd2a8b84 100644 --- a/src/print.c +++ b/src/print.c @@ -41,7 +41,7 @@ #include #ifndef lint -FILE_RCSID("@(#)$File: print.c,v 1.61 2007/12/27 16:35:59 christos Exp $") +FILE_RCSID("@(#)$File: print.c,v 1.62 2008/02/04 20:51:17 christos Exp $") #endif /* lint */ #define SZOF(a) (sizeof(a) / sizeof(a[0])) @@ -184,13 +184,15 @@ protected void file_magwarn(struct magic_set *ms, const char *f, ...) { va_list va; - va_start(va, f); /* cuz we use stdout for most, stderr here */ (void) fflush(stdout); - (void) fprintf(stderr, "%s, %lu: Warning ", ms->file, - (unsigned long)ms->line); + if (ms->file) + (void) fprintf(stderr, "%s, %lu: ", ms->file, + (unsigned long)ms->line); + (void) fprintf(stderr, "Warning: "); + va_start(va, f); (void) vfprintf(stderr, f, va); va_end(va); (void) fputc('\n', stderr); diff --git a/src/readelf.c b/src/readelf.c index b85ac53d..e4ce3e1a 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -37,7 +37,7 @@ #include "readelf.h" #ifndef lint -FILE_RCSID("@(#)$File: readelf.c,v 1.69 2008/01/26 18:45:16 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.70 2008/02/04 20:51:17 christos Exp $") #endif #ifdef ELFCORE @@ -397,6 +397,14 @@ donote(struct magic_set *ms, unsigned char *nbuf, size_t offset, size_t size, if (file_printf(ms, "Solaris") == -1) return size; break; + case GNU_OS_KFREEBSD: + if (file_printf(ms, "kFreeBSD") == -1) + return size; + break; + case GNU_OS_KNETBSD: + if (file_printf(ms, "kNetBSD") == -1) + return size; + break; default: if (file_printf(ms, "") == -1) return size; @@ -919,29 +927,30 @@ file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf, off_t fsize; int flags = 0; - /* - * If we cannot seek, it must be a pipe, socket or fifo. - */ - if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE)) - fd = file_pipe2file(ms, fd, buf, nbytes); - - if (fstat(fd, &st) == -1) { - file_badread(ms); - return -1; - } - fsize = st.st_size; /* * ELF executables have multiple section headers in arbitrary * file locations and thus file(1) cannot determine it from easily. * Instead we traverse thru all section headers until a symbol table * one is found or else the binary is stripped. + * Return immediately if it's not ELF (so we avoid pipe2file unless needed). */ if (buf[EI_MAG0] != ELFMAG0 || (buf[EI_MAG1] != ELFMAG1 && buf[EI_MAG1] != OLFMAG1) || buf[EI_MAG2] != ELFMAG2 || buf[EI_MAG3] != ELFMAG3) return 0; + /* + * If we cannot seek, it must be a pipe, socket or fifo. + */ + if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE)) + fd = file_pipe2file(ms, fd, buf, nbytes); + + if (fstat(fd, &st) == -1) { + file_badread(ms); + return -1; + } + fsize = st.st_size; class = buf[EI_CLASS]; diff --git a/src/readelf.h b/src/readelf.h index 610c310c..77cc2ca7 100644 --- a/src/readelf.h +++ b/src/readelf.h @@ -229,5 +229,7 @@ typedef struct { #define GNU_OS_LINUX 0 #define GNU_OS_HURD 1 #define GNU_OS_SOLARIS 2 +#define GNU_OS_KFREEBSD 3 +#define GNU_OS_KNETBSD 4 #endif