summaryrefslogtreecommitdiff
path: root/ext/POSIX/POSIX.xs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/POSIX/POSIX.xs')
-rw-r--r--ext/POSIX/POSIX.xs18
1 files changed, 13 insertions, 5 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index c3bacb4e29..fd27b11623 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -30,9 +30,8 @@
#endif
#include <setjmp.h>
#include <signal.h>
-#ifdef I_STDARG
#include <stdarg.h>
-#endif
+
#ifdef I_STDDEF
#include <stddef.h>
#endif
@@ -51,7 +50,7 @@
#include <sys/types.h>
#include <time.h>
#ifdef I_UNISTD
-#include <unistd.h> /* see hints/sunos_4_1.sh */
+#include <unistd.h>
#endif
#include <fcntl.h>
@@ -115,6 +114,15 @@
# ifdef _MSC_VER
# define mode_t short
# endif
+# ifdef __MINGW32__
+# define mode_t short
+# ifndef tzset
+# define tzset() not_here("tzset")
+# endif
+# ifndef _POSIX_OPEN_MAX
+# define _POSIX_OPEN_MAX FOPEN_MAX /* XXX bogus ? */
+# endif
+# endif
# define sigaction(a,b,c) not_here("sigaction")
# define sigpending(a) not_here("sigpending")
# define sigprocmask(a,b,c) not_here("sigprocmask")
@@ -262,13 +270,13 @@ unsigned long strtoul _((const char *, char **, int));
#define localeconv() not_here("localeconv")
#endif
-#ifndef WIN32
#ifdef HAS_TZNAME
+# ifndef WIN32
extern char *tzname[];
+# endif
#else
char *tzname[] = { "" , "" };
#endif
-#endif
/* XXX struct tm on some systems (SunOS4/BSD) contains extra (non POSIX)
* fields for which we don't have Configure support yet: