Win32 compilation tweaks for Blair Zajac.
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 25 Nov 2001 19:38:50 +0000 (19:38 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 25 Nov 2001 19:38:50 +0000 (19:38 +0000)
p4raw-id: //depot/perl@13267

ext/IO/IO.xs
ext/POSIX/POSIX.xs
win32/win32.h

index 92a51b6..a798813 100644 (file)
@@ -4,6 +4,8 @@
  * modify it under the same terms as Perl itself.
  */
 
+#define PERL_EXT_IO
+
 #define PERL_NO_GET_CONTEXT
 #include "EXTERN.h"
 #define PERLIO_NOT_STDIO 1
@@ -444,7 +446,7 @@ sockatmark (sock)
      {
        int flag = 0;
 #   ifdef SIOCATMARK
-#     ifdef NETWARE
+#     if defined(NETWARE) || defined(WIN32)
        if (ioctl(fd, SIOCATMARK, (void*)&flag) != 0)
 #     else
        if (ioctl(fd, SIOCATMARK, &flag) != 0)
index 60469a3..21f69db 100644 (file)
@@ -1,3 +1,5 @@
+#define PERL_EXT_POSIX
+
 #ifdef WIN32
 #define _POSIX_
 #endif
@@ -168,6 +170,8 @@ char *tzname[] = { "" , "" };
 #  define sigfillset(a)                not_here("sigfillset")
 #  define sigismember(a,b)     not_here("sigismember")
 #ifndef NETWARE
+#  undef setuid
+#  undef setgid
 #  define setuid(a)            not_here("setuid")
 #  define setgid(a)            not_here("setgid")
 #endif /* NETWARE */
@@ -226,9 +230,11 @@ typedef struct termios* POSIX__Termios;
 
 /* Possibly needed prototypes */
 char *cuserid (char *);
+#ifndef WIN32
 double strtod (const char *, char **);
 long strtol (const char *, char **, int);
 unsigned long strtoul (const char *, char **, int);
+#endif
 
 #ifndef HAS_CUSERID
 #define cuserid(a) (char *) not_here("cuserid")
index 830025f..6bbd2f2 100644 (file)
@@ -493,6 +493,10 @@ EXTERN_C _CRTIMP ioinfo* __pioinfo[];
 #endif
 #endif
 
+/* IO.xs and POSIX.xs define PERLIO_NOT_STDIO to 1 */ 
+#if defined(PERL_EXT_IO) || defined(PERL_EXT_POSIX)
+#undef  PERLIO_NOT_STDIO
+#endif
 #define PERLIO_NOT_STDIO 0
 
 #include "perlio.h"