#define _INC_WIN32_PERL5
#ifdef PERL_OBJECT
-#define ENV_HV_NAME "ENV_HV_NAME"
-#define DYNAMIC_ENV_FETCH
-#define prime_env_iter()
-#ifdef PERL_GLOBAL_STRUCT
-#error PERL_GLOBAL_STRUCT cannot be defined with PERL_OBJECT
-#endif
-#define win32_perllib_path PerlEnv_lib_path
+# define WIN32IO_IS_STDIO /* don't pull in custom stdio layer */
+# ifdef PERL_GLOBAL_STRUCT
+# error PERL_GLOBAL_STRUCT cannot be defined with PERL_OBJECT
+# endif
+# define win32_get_privlib PerlEnv_lib_path
+# define win32_get_sitelib PerlEnv_sitelib_path
#endif
#ifdef __GNUC__
typedef long long __int64;
#define Win32_Winsock
+# ifdef __cplusplus
+#undef __attribute__ /* seems broken in 2.8.0 */
+#define __attribute__(p)
+# endif
/* GCC does not do __declspec() - render it a nop
* and turn on options to avoid importing data
*/
#define DllExport
#else
#if defined(PERLDLL) || defined(WIN95FIX)
-#define DllExport __declspec(dllexport)
+#define DllExport
+/*#define DllExport __declspec(dllexport)*/ /* noises with VC5+sp3 */
#else
#define DllExport __declspec(dllimport)
#endif
#ifdef WIN32_LEAN_AND_MEAN /* C file is NOT a Perl5 original. */
#define CONTEXT PERL_CONTEXT /* Avoid conflict of CONTEXT defs. */
-#define index strchr /* Why 'index'? */
#endif /*WIN32_LEAN_AND_MEAN */
#include <dirent.h>
#pragma warn -csu /* "comparing signed and unsigned values" */
#pragma warn -pro /* "call to function with no prototype" */
+#define USE_RTL_WAIT /* Borland has a working wait() */
+
+/* Borland is picky about a bare member function name used as its ptr */
+#ifdef PERL_OBJECT
+#define FUNC_NAME_TO_PTR(name) &(name)
+#endif
+
#endif
#ifdef _MSC_VER /* Microsoft Visual C++ */
#define flushall _flushall
#define fcloseall _fcloseall
+#ifndef _O_NOINHERIT
+# define _O_NOINHERIT 0x0080
+# ifndef _NO_OLDNAMES
+# define O_NOINHERIT _O_NOINHERIT
+# endif
+#endif
+
+#ifndef _O_NOINHERIT
+# define _O_NOINHERIT 0x0080
+# ifndef _NO_OLDNAMES
+# define O_NOINHERIT _O_NOINHERIT
+# endif
+#endif
+
#endif /* __MINGW32__ */
/* compatibility stuff for other compilers goes here */
extern int do_spawn(char *cmd);
extern int do_spawn_nowait(char *cmd);
extern char do_exec(char *cmd);
-extern char * win32_perllib_path(char *sfx,...);
+extern char * win32_get_privlib(char *pl);
+extern char * win32_get_sitelib(char *pl);
extern int IsWin95(void);
extern int IsWinNT(void);
#define win32_strip_return(sv) NOOP
#endif
+#define HAVE_INTERP_INTERN
+struct interp_intern {
+ char * w32_perlshell_tokens;
+ char ** w32_perlshell_vec;
+ long w32_perlshell_items;
+ struct av * w32_fdpid;
+#ifndef USE_RTL_WAIT
+ long w32_num_children;
+ HANDLE w32_child_pids[MAXIMUM_WAIT_OBJECTS];
+#endif
+};
+
+#define w32_perlshell_tokens (sys_intern.w32_perlshell_tokens)
+#define w32_perlshell_vec (sys_intern.w32_perlshell_vec)
+#define w32_perlshell_items (sys_intern.w32_perlshell_items)
+#define w32_fdpid (sys_intern.w32_fdpid)
+
+#ifndef USE_RTL_WAIT
+# define w32_num_children (sys_intern.w32_num_children)
+# define w32_child_pids (sys_intern.w32_child_pids)
+#endif
+
/*
* Now Win32 specific per-thread data stuff
*/
char Wstrerror_buffer[512];
struct servent Wservent;
char Wgetlogin_buffer[128];
+ char Ww32_perllib_root[MAX_PATH+1];
+# ifdef USE_SOCKETS_AS_HANDLES
+ int Winit_socktype;
+# endif
# ifdef HAVE_DES_FCRYPT
char Wcrypt_buffer[30];
# endif