summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog7
-rw-r--r--Build/source/texk/kpathsea/config.h14
2 files changed, 21 insertions, 0 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 1124ded5fd9..66970cd166f 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * config.h: For __MINGW32__ temporarily define eof as macro
+ while including <unistd.h>.
+
+ From Taco Hoekwater <taco@elvenkind.com>.
+
2009-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
* kpathsea.c: Do not use initializer for kpse_def_inst (FIXME:
diff --git a/Build/source/texk/kpathsea/config.h b/Build/source/texk/kpathsea/config.h
index f4b6a93020f..33ce2db7c97 100644
--- a/Build/source/texk/kpathsea/config.h
+++ b/Build/source/texk/kpathsea/config.h
@@ -73,7 +73,21 @@
#define KPATHSEA 34
#endif
+#ifdef __MINGW32__
+/* In mingw32, the eof() function is part of the !_NO_OLDNAMES section
+ of <io.h>, that is read in automatically via <unistd.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 <kpathsea/c-std.h> /* <stdio.h>, <math.h>, etc. */
+#undef eof
+#else
+#include <kpathsea/c-std.h> /* <stdio.h>, <math.h>, etc. */
+#endif
#include <kpathsea/c-proto.h> /* Macros to discard or keep prototypes. */