avoid a "FILE" name conflict with cygwin's wchar.h
authorTony Cook <tony@develop-help.com>
Mon, 17 Feb 2014 23:38:43 +0000 (10:38 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 17 Feb 2014 23:38:43 +0000 (10:38 +1100)
The 1.7.28 release of cygwin (or possible a separate package released
around the same time) header wchar.h includes the following code:

  typedef __FILE FILE;

With PERLIO_NOT_STDIO set to true, the default for core source files, we
#include nostdio.h which does:

  struct _FILE;
  #define FILE struct _FILE

which turns the above code into:

  typedef __FILE struct _FILE;

which isn't C.

Disable this hack for cygwin.c

cygwin/cygwin.c

index 6b31232..59aa730 100644 (file)
@@ -2,6 +2,7 @@
  * Cygwin extras
  */
 
+#define PERLIO_NOT_STDIO 0
 #include "EXTERN.h"
 #include "perl.h"
 #undef USE_DYNAMIC_LOADING