X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fwin32.h;h=a6a2f9d5c5f7013f9e8ce50084edc8989e54310d;hb=3e83fff7485ec2aa4f013e05fa43596a76f92102;hp=a50297820152e9daf9c0bd96b4b53a5855defe01;hpb=fbbbcc485c1d03c76a91f998e1e4492c8ad56b38;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/win32.h b/win32/win32.h index a502978..a6a2f9d 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -10,18 +10,21 @@ #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 */ @@ -43,7 +46,8 @@ typedef long long __int64; #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 @@ -54,7 +58,6 @@ typedef long long __int64; #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 @@ -133,6 +136,13 @@ struct tms { #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++ */ @@ -151,6 +161,20 @@ typedef long gid_t; #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 */ @@ -189,7 +213,8 @@ extern int do_aspawn(void *really, void **mark, void **sp); 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); @@ -223,6 +248,28 @@ EXT void win32_strip_return(struct sv *sv); #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 */ @@ -236,6 +283,10 @@ struct thread_intern { 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