From: Jarkko Hietaniemi Date: Sun, 25 Nov 2001 19:38:50 +0000 (+0000) Subject: Win32 compilation tweaks for Blair Zajac. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e22d04617c44509b8a480505826f9b13b2f0dd6;p=p5sagit%2Fp5-mst-13.2.git Win32 compilation tweaks for Blair Zajac. p4raw-id: //depot/perl@13267 --- diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index 92a51b6..a798813 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -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) diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 60469a3..21f69db 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -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") diff --git a/win32/win32.h b/win32/win32.h index 830025f..6bbd2f2 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -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"