* 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
{
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)
+#define PERL_EXT_POSIX
+
#ifdef WIN32
#define _POSIX_
#endif
# 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 */
/* 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")
#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"