3 // (c) 1995 Microsoft Corporation. All rights reserved.
4 // Developed by hip communications inc., http://info.hip.com/info/
6 // You may distribute under the terms of either the GNU General Public
7 // License or the Artistic License, as specified in the README file.
9 #ifndef _INC_WIN32_PERL5
10 #define _INC_WIN32_PERL5
12 #define WIN32_LEAN_AND_MEAN
15 #ifdef WIN32_LEAN_AND_MEAN // C file is NOT a Perl5 original.
16 #define CONTEXT PERL_CONTEXT // Avoid conflict of CONTEXT defs.
17 #define index strchr // Why 'index'?
18 #endif //WIN32_LEAN_AND_MEAN
26 // For UNIX compatibility.
31 extern char *staticlinkmodules[];
33 extern uid_t getuid(void);
34 extern gid_t getgid(void);
35 extern uid_t geteuid(void);
36 extern gid_t getegid(void);
38 extern int setuid(uid_t uid);
39 extern int setgid(gid_t gid);
40 extern int kill(int pid, int sig);
42 #define USE_SOCKETS_AS_HANDLES
43 #ifndef USE_SOCKETS_AS_HANDLES
44 extern FILE *myfdopen(int, char *);
47 #define fdopen myfdopen
48 #endif // USE_SOCKETS_AS_HANDLES
50 #define STANDARD_C 1 // Perl5 likes standard C.
51 #define DOSISH 1 // Take advantage of DOSish code in Perl5.
53 #define OP_BINARY _O_BINARY // Mistake in in pp_sys.c.
56 #define mkdir(nm, md) _mkdir(nm) // For UNIX compatibility.
59 #define chdir(nm) _chdir(nm)
62 #define rmdir(nm) _rmdir(nm)
65 #define pipe(fd) win32_pipe((fd), 512, _O_BINARY) // the pipe call is a bit different
68 #define pause() sleep((32767L << 16) + 32767)
84 unsigned int sleep(unsigned int);
85 char *win32PerlLibPath();
86 int mytimes(struct tms *timebuf);
87 unsigned int myalarm(unsigned int sec);
88 int do_aspawn(void* really, void** mark, void** arglast);
89 int do_spawn(char *cmd);
91 typedef char * caddr_t; // In malloc.c (core address).
94 // Extension Library, only good for VC
97 #define DllExport __declspec(dllexport)
101 // handle socket stuff, assuming socket is always available
104 #include <sys/socket.h>
107 #pragma warning(disable: 4018 4035 4101 4102 4244 4245 4761)
109 #endif // _INC_NT_PERL5