X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstdio-impl.h;h=d41c32f4b7fcbcc080b2cb59084f5810c16142f8;hb=9be7a7f2520e9d3dd7ff625823b0ca77de1137e6;hp=bc853c9d4fba5df7d1e129614053ea9d17dc1957;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index bc853c9d4..d41c32f4b 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -1,5 +1,5 @@ /* Implementation details of FILE streams. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +21,11 @@ /* BSD stdio derived implementations. */ +#if defined __NetBSD__ /* NetBSD */ +/* Get __NetBSD_Version__. */ +# include +#endif + #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __DragonFly__ /* DragonFly */ @@ -50,7 +55,7 @@ # define fp_ fp # endif -# if defined __NetBSD__ || defined __OpenBSD__ /* NetBSD, OpenBSD */ +# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ /* See and */ struct __sfileext @@ -59,7 +64,7 @@ /* More fields, not relevant here. */ }; # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub -# else /* FreeBSD, DragonFly, MacOS X, Cygwin */ +# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */ # define fp_ub fp_->_ub # endif @@ -70,6 +75,17 @@ /* SystemV derived implementations. */ +#ifdef __TANDEM /* NonStop Kernel */ +# ifndef _IOERR +/* These values were determined by the program 'stdioext-flags' at + . */ +# define _IOERR 0x40 +# define _IOREAD 0x80 +# define _IOWRT 0x4 +# define _IORW 0x100 +# endif +#endif + #if defined _IOERR # if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */