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>
51 extern uid_t getuid(void);
52 extern gid_t getgid(void);
53 extern uid_t geteuid(void);
54 extern gid_t getegid(void);
55 extern int setuid(uid_t uid);
56 extern int setgid(gid_t gid);
58 extern int kill(int pid, int sig);
60 extern char *staticlinkmodules[];
62 /* if USE_WIN32_RTL_ENV is not defined, Perl uses direct Win32 calls
63 * to read the environment, bypassing the runtime's (usually broken)
64 * facilities for accessing the same. See note in util.c/my_setenv().
66 /*#define USE_WIN32_RTL_ENV */
68 #ifndef USE_WIN32_RTL_ENV
70 #define getenv win32_getenv
73 #define USE_SOCKETS_AS_HANDLES
74 #ifndef USE_SOCKETS_AS_HANDLES
75 extern FILE *myfdopen(int, char *);
78 #define fdopen myfdopen
79 #endif /* USE_SOCKETS_AS_HANDLES */
81 #define STANDARD_C 1 /* Perl5 likes standard C. */
82 #define DOSISH 1 /* Take advantage of DOSish code in Perl5. */
84 #define OP_BINARY O_BINARY /* Mistake in in pp_sys.c. */
87 #define pipe(fd) win32_pipe((fd), 512, O_BINARY) /* the pipe call is a bit different */
90 #define pause() sleep((32767L << 16) + 32767)
106 unsigned int sleep(unsigned int);
107 char *win32PerlLibPath(void);
108 char *win32SiteLibPath(void);
109 int mytimes(struct tms *timebuf);
110 unsigned int myalarm(unsigned int sec);
111 int do_aspawn(void* really, void** mark, void** arglast);
112 int do_spawn(char *cmd);
113 char do_exec(char *cmd);
115 typedef char * caddr_t; /* In malloc.c (core address). */
118 * Extension Library, only good for VC
121 #define DllExport __declspec(dllexport)
122 #define DllImport __declspec(dllimport)
125 * handle socket stuff, assuming socket is always available
128 #include <sys/socket.h>
132 #pragma warning(disable: 4018 4035 4101 4102 4244 4245 4761)
138 #ifndef VER_PLATFORM_WIN32_WINDOWS /* VC-2.0 headers dont have this */
139 #define VER_PLATFORM_WIN32_WINDOWS 1
142 #endif /* _INC_WIN32_PERL5 */