diff options
Diffstat (limited to 'Build/source/libs/obsdcompat')
-rw-r--r-- | Build/source/libs/obsdcompat/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/libs/obsdcompat/includes.h | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Build/source/libs/obsdcompat/ChangeLog b/Build/source/libs/obsdcompat/ChangeLog index d7a2bd06abd..22b95a1bed4 100644 --- a/Build/source/libs/obsdcompat/ChangeLog +++ b/Build/source/libs/obsdcompat/ChangeLog @@ -1,3 +1,8 @@ +2010-02-20 Peter Breitenlohner <peb@mppmu.mpg.de> + + * includes.h [__MINGW32__]: Temporarily #define eof as macro + while #including <fcntl.h>. + 2009-05-09 Peter Breitenlohner <peb@mppmu.mpg.de> * configure.ac: Don't check LLONG_MAX twice, otherwise may use diff --git a/Build/source/libs/obsdcompat/includes.h b/Build/source/libs/obsdcompat/includes.h index 32e2b64c2e2..2a3b1539ab5 100644 --- a/Build/source/libs/obsdcompat/includes.h +++ b/Build/source/libs/obsdcompat/includes.h @@ -34,7 +34,21 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg } #include <stdio.h> #include <ctype.h> #include <errno.h> +#ifdef __MINGW32__ +/* In mingw32, the eof() function is part of the !_NO_OLDNAMES section + of <io.h>, that is read in automatically via <fcntl.h>. We cannot + allow that because web2c/lib/eofeoln.c defines a private, + incompatible function named eof(). + But many of the other things defined via !_NO_OLDNAMES are needed, + so #define _NO_OLDNAMES cannot be used. So, temporarily define eof + as a macro. +*/ +#define eof saved_eof #include <fcntl.h> /* For O_NONBLOCK */ +#undef eof +#else +#include <fcntl.h> /* For O_NONBLOCK */ +#endif #include <stdlib.h> #include <string.h> #include <stdarg.h> |