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. */
30 #define _access access
32 #include <sys/types.h>
35 #define DllMain DllEntryPoint
59 extern uid_t getuid(void);
60 extern gid_t getgid(void);
61 extern uid_t geteuid(void);
62 extern gid_t getegid(void);
63 extern int setuid(uid_t uid);
64 extern int setgid(gid_t gid);
66 extern int kill(int pid, int sig);
73 extern char *staticlinkmodules[];
75 /* if USE_WIN32_RTL_ENV is not defined, Perl uses direct Win32 calls
76 * to read the environment, bypassing the runtime's (usually broken)
77 * facilities for accessing the same. See note in util.c/my_setenv().
79 /*#define USE_WIN32_RTL_ENV */
81 #ifndef USE_WIN32_RTL_ENV
87 #define getenv win32_getenv
88 EXT char *win32_getenv(const char *name);
96 EXT void Perl_win32_init(int *argcp, char ***argvp);
98 #define USE_SOCKETS_AS_HANDLES
99 #ifndef USE_SOCKETS_AS_HANDLES
101 extern FILE *myfdopen(int, char *);
104 #define fdopen myfdopen
105 #endif /* USE_SOCKETS_AS_HANDLES */
107 #define STANDARD_C 1 /* Perl5 likes standard C. */
108 #define DOSISH 1 /* Take advantage of DOSish code in Perl5. */
110 #define OP_BINARY O_BINARY /* Mistake in in pp_sys.c. */
113 #define pipe(fd) win32_pipe((fd), 512, O_BINARY) /* the pipe call is a bit different */
116 #define pause() sleep((32767L << 16) + 32767)
120 #define times mytimes
123 #define alarm myalarm
132 unsigned int sleep(unsigned int);
133 char *win32PerlLibPath(void);
134 char *win32SiteLibPath(void);
135 int mytimes(struct tms *timebuf);
136 unsigned int myalarm(unsigned int sec);
137 int do_aspawn(void* really, void ** mark, void ** arglast);
138 int do_spawn(char *cmd);
139 char do_exec(char *cmd);
140 void init_os_extras(void);
146 typedef char * caddr_t; /* In malloc.c (core address). */
149 * Extension Library, only good for VC
152 #define DllExport __declspec(dllexport)
153 #define DllImport __declspec(dllimport)
156 * handle socket stuff, assuming socket is always available
159 #include <sys/socket.h>
163 #pragma warning(disable: 4018 4035 4101 4102 4244 4245 4761)
178 #ifndef VER_PLATFORM_WIN32_WINDOWS /* VC-2.0 headers dont have this */
179 #define VER_PLATFORM_WIN32_WINDOWS 1
182 #endif /* _INC_WIN32_PERL5 */