diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-27 14:28:49 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-27 14:28:49 +0000 |
commit | 0cb9638729211ea71a75ae8756c03ba21553bd53 (patch) | |
tree | f00e767824d620a63a26a857b6a37fcb6945f89d /win32/win32.h | |
parent | 4f4e629e089f1120f8e94984281df06ac4f885c5 (diff) | |
download | perl-0cb9638729211ea71a75ae8756c03ba21553bd53.tar.gz |
somewhat untested PERL_OBJECT cleanups (C++isms mostly
gone from the public API); PERL_OBJECT builds again on
windows
TODO: namespace-clean the typedefs in iperlsys.h and
elsewhere; remove C++ remnants from public headers
p4raw-id: //depot/perl@3553
Diffstat (limited to 'win32/win32.h')
-rw-r--r-- | win32/win32.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/win32/win32.h b/win32/win32.h index c688ee9f16..ee25b5afce 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -188,7 +188,10 @@ typedef long gid_t; typedef unsigned short mode_t; #pragma warning(disable: 4018 4035 4101 4102 4244 4245 4761) -#ifndef PERL_OBJECT +#ifdef PERL_OBJECT +extern CPerlObj* GetPerlInter(void); +#define dPERLOBJ CPerlObj* pPerl = GetPerlInter() +#else /* PERL_OBJECT */ /* Visual C thinks that a pointer to a member variable is 16 bytes in size. */ #define STRUCT_MGVTBL_DEFINITION \ @@ -235,6 +238,8 @@ struct mgvtbl { \ char handle_VC_problem[16]; \ } + +#define dPERLOBJ #endif /* PERL_OBJECT */ #endif /* _MSC_VER */ @@ -345,6 +350,12 @@ typedef struct { DWORD pids[MAXIMUM_WAIT_OBJECTS]; } child_tab; +struct host_link { + char * nameId; + void * host_data; + struct host_link * next; +}; + struct interp_intern { char * perlshell_tokens; char ** perlshell_vec; @@ -352,6 +363,7 @@ struct interp_intern { struct av * fdpid; child_tab * children; HANDLE child_handles[MAXIMUM_WAIT_OBJECTS]; + struct host_link * hostlist; }; @@ -363,6 +375,7 @@ struct interp_intern { #define w32_num_children (w32_children->num) #define w32_child_pids (w32_children->pids) #define w32_child_handles (PL_sys_intern.child_handles) +#define w32_host_link (PL_sys_intern.hostlist) /* * Now Win32 specific per-thread data stuff @@ -395,15 +408,13 @@ struct thread_intern { /* Use CP_ACP when mode is ANSI */ /* Use CP_UTF8 when mode is UTF8 */ -#define A2WHELPER(lpa, lpw, nChars, acp)\ - lpw[0] = 0, MultiByteToWideChar(acp, 0, lpa, -1, lpw, nChars) +#define A2WHELPER(lpa, lpw, nChars)\ + lpw[0] = 0, MultiByteToWideChar((IN_UTF8) ? CP_UTF8 : CP_ACP, 0, lpa, -1, lpw, nChars) -#define W2AHELPER(lpw, lpa, nChars, acp)\ - lpa[0] = '\0', WideCharToMultiByte(acp, 0, lpw, -1, lpa, nChars, NULL, NULL) +#define W2AHELPER(lpw, lpa, nChars)\ + lpa[0] = '\0', WideCharToMultiByte((IN_UTF8) ? CP_UTF8 : CP_ACP, 0, lpw, -1, (LPSTR)lpa, nChars, NULL, NULL) -/* place holders for now */ -#define USING_WIDE() (IsWinNT()) -#define GETINTERPMODE() (IN_UTF8) +#define USING_WIDE() (PerlEnv_os_id() == VER_PLATFORM_WIN32_NT) /* * This provides a layer of functions and macros to ensure extensions will |