From 6e22d04617c44509b8a480505826f9b13b2f0dd6 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 25 Nov 2001 19:38:50 +0000 Subject: [PATCH] Win32 compilation tweaks for Blair Zajac. p4raw-id: //depot/perl@13267 --- ext/IO/IO.xs | 4 +++- ext/POSIX/POSIX.xs | 6 ++++++ win32/win32.h | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) 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" -- 2.7.4