diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2001-08-31 20:58:38 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2001-08-31 20:58:38 +0000 |
commit | acfe0abcedaf592fb4b9cb69ce3468308ae99d91 (patch) | |
tree | a2ca08c77d2b63d1777d0b228ff53362895c1624 /wince | |
parent | 25f58aea15b072f74afcee1b9074d33e8e7348b5 (diff) | |
download | perl-acfe0abcedaf592fb4b9cb69ce3468308ae99d91.tar.gz |
remove deprecated PERL_OBJECT cruft, it has long since stopped
working in 5.7.x
p4raw-id: //depot/perl@11803
Diffstat (limited to 'wince')
-rw-r--r-- | wince/Makefile.ce | 24 | ||||
-rw-r--r-- | wince/config_h.PL | 3 | ||||
-rw-r--r-- | wince/dl_win32.xs | 22 | ||||
-rw-r--r-- | wince/perllib.c | 132 | ||||
-rw-r--r-- | wince/win32.h | 55 | ||||
-rw-r--r-- | wince/win32thread.c | 6 | ||||
-rw-r--r-- | wince/wince.c | 37 | ||||
-rw-r--r-- | wince/wincesck.c | 39 |
8 files changed, 43 insertions, 275 deletions
diff --git a/wince/Makefile.ce b/wince/Makefile.ce index dd2dbd66e7..36cbbb2e94 100644 --- a/wince/Makefile.ce +++ b/wince/Makefile.ce @@ -338,13 +338,6 @@ D_CRYPT = define CRYPT_FLAG = -DHAVE_DES_FCRYPT !ENDIF -!IF "$(USE_OBJECT)" == "define" -PERL_MALLOC = undef -USE_5005THREADS = undef -USE_MULTI = undef -USE_IMP_SYS = define -!ENDIF - !IF "$(PERL_MALLOC)" == "" PERL_MALLOC = undef !ENDIF @@ -365,10 +358,6 @@ PERL_MALLOC = undef USE_MULTI = undef !ENDIF -!IF "$(USE_OBJECT)" == "" -USE_OBJECT = undef -!ENDIF - !IF "$(USE_ITHREADS)" == "" USE_ITHREADS = undef !ENDIF @@ -381,16 +370,16 @@ USE_IMP_SYS = undef USE_PERLCRT = undef !ENDIF -!IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef" +!IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef" USE_MULTI = define !ENDIF -!IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef" +!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" USE_MULTI = define USE_5005THREADS = undef !ENDIF -!IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef" +!IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef" BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT !ENDIF @@ -424,11 +413,6 @@ CXX_FLAG = -TP -GX PERLEXE_RES = perl.res PERLDLL_RES = -!IF "$(USE_OBJECT)" == "define" -OPTIMIZE = $(OPTIMIZE) $(CXX_FLAG) -BUILDOPT = $(BUILDOPT) -DPERL_OBJECT -!ENDIF - !if "$(CFG)" == "RELEASE" CELIB = celib.lib !endif @@ -545,9 +529,7 @@ EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c !ENDIF -!IF "$(USE_OBJECT)" != "define" EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c -!ENDIF WIN32_SRC = \ .\wince.c \ diff --git a/wince/config_h.PL b/wince/config_h.PL index b5f5e38c89..d78a62ea59 100644 --- a/wince/config_h.PL +++ b/wince/config_h.PL @@ -2,7 +2,6 @@ use Config; use File::Compare qw(compare); use File::Copy qw(copy); -my $OBJ = 1 if $Config{'ccflags'} =~ /PERL_OBJECT/i; my $name = $0; $name =~ s#^(.*)\.PL$#../$1.SH#; my %opt; @@ -73,7 +72,7 @@ chmod(0666,"config.h"); copy("$file.new","config.h") || die "Cannot copy:$!"; chmod(0444,"config.h"); -if (!$OBJ && compare("$file.new",$file)) +if (compare("$file.new",$file)) { warn "$file has changed\n"; chmod(0666,$file); diff --git a/wince/dl_win32.xs b/wince/dl_win32.xs index 15962a6772..d93d9dda64 100644 --- a/wince/dl_win32.xs +++ b/wince/dl_win32.xs @@ -30,16 +30,12 @@ calls. #include "perl.h" #include "win32.h" -#ifdef PERL_OBJECT -#define NO_XSLOCKS -#endif /* PERL_OBJECT */ - #include "XSUB.h" static SV *error_sv; static char * -OS_Error_String(pTHXo) +OS_Error_String(pTHX) { DWORD err = GetLastError(); STRLEN len; @@ -52,9 +48,9 @@ OS_Error_String(pTHXo) #include "dlutils.c" /* SaveError() etc */ static void -dl_private_init(pTHXo) +dl_private_init(pTHX) { - (void)dl_generic_private_init(aTHXo); + (void)dl_generic_private_init(aTHX); } /* @@ -96,7 +92,7 @@ dl_static_linked(char *filename) MODULE = DynaLoader PACKAGE = DynaLoader BOOT: - (void)dl_private_init(aTHXo); + (void)dl_private_init(aTHX); void * dl_load_file(filename,flags=0) @@ -114,8 +110,8 @@ dl_load_file(filename,flags=0) DLDEBUG(2,PerlIO_printf(Perl_debug_log," libref=%x\n", RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) - SaveError(aTHXo_ "load_file:%s", - OS_Error_String(aTHXo)) ; + SaveError(aTHX_ "load_file:%s", + OS_Error_String(aTHX)) ; else sv_setiv( ST(0), (IV)RETVAL); } @@ -131,8 +127,8 @@ dl_find_symbol(libhandle, symbolname) DLDEBUG(2,PerlIO_printf(Perl_debug_log," symbolref = %x\n", RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) - SaveError(aTHXo_ "find_symbol:%s", - OS_Error_String(aTHXo)) ; + SaveError(aTHX_ "find_symbol:%s", + OS_Error_String(aTHX)) ; else sv_setiv( ST(0), (IV)RETVAL); @@ -154,7 +150,7 @@ dl_install_xsub(perl_name, symref, filename="$Package") DLDEBUG(2,PerlIO_printf(Perl_debug_log,"dl_install_xsub(name=%s, symref=%x)\n", perl_name, symref)); ST(0) = sv_2mortal(newRV((SV*)newXS(perl_name, - (void(*)(pTHXo_ CV *))symref, + (void(*)(pTHX_ CV *))symref, filename))); diff --git a/wince/perllib.c b/wince/perllib.c index 931a362a4e..3d4d37e500 100644 --- a/wince/perllib.c +++ b/wince/perllib.c @@ -3,10 +3,6 @@ #include "EXTERN.h" #include "perl.h" -#ifdef PERL_OBJECT -#define NO_XSLOCKS -#endif - #include "XSUB.h" #ifdef PERL_IMPLICIT_SYS @@ -21,10 +17,10 @@ char *staticlinkmodules[] = { NULL, }; -EXTERN_C void boot_DynaLoader (pTHXo_ CV* cv); +EXTERN_C void boot_DynaLoader (pTHX_ CV* cv); static void -xs_init(pTHXo) +xs_init(pTHX) { char *file = __FILE__; dXSUB_SYS; @@ -106,9 +102,6 @@ perl_alloc_override(struct IPerlMem** ppMem, struct IPerlMem** ppMemShared, pHost->m_pHostperlSock, pHost->m_pHostperlProc); if (my_perl) { -#ifdef PERL_OBJECT - CPerlObj* pPerl = (CPerlObj*)my_perl; -#endif w32_internal_host = pHost; } } @@ -131,9 +124,6 @@ perl_alloc(void) pHost->m_pHostperlSock, pHost->m_pHostperlProc); if (my_perl) { -#ifdef PERL_OBJECT - CPerlObj* pPerl = (CPerlObj*)my_perl; -#endif w32_internal_host = pHost; } } @@ -147,108 +137,6 @@ win32_delete_internal_host(void *h) delete host; } -#ifdef PERL_OBJECT - -EXTERN_C void -perl_construct(PerlInterpreter* my_perl) -{ - CPerlObj* pPerl = (CPerlObj*)my_perl; - try - { - Perl_construct(); - } - catch(...) - { - win32_fprintf(stderr, "%s\n", - "Error: Unable to construct data structures"); - perl_free(my_perl); - } -} - -EXTERN_C void -perl_destruct(PerlInterpreter* my_perl) -{ - CPerlObj* pPerl = (CPerlObj*)my_perl; -#ifdef DEBUGGING - Perl_destruct(); -#else - try - { - Perl_destruct(); - } - catch(...) - { - } -#endif -} - -EXTERN_C void -perl_free(PerlInterpreter* my_perl) -{ - CPerlObj* pPerl = (CPerlObj*)my_perl; - void *host = w32_internal_host; -#ifdef DEBUGGING - Perl_free(); -#else - try - { - Perl_free(); - } - catch(...) - { - } -#endif - win32_delete_internal_host(host); - PERL_SET_THX(NULL); -} - -EXTERN_C int -perl_run(PerlInterpreter* my_perl) -{ - CPerlObj* pPerl = (CPerlObj*)my_perl; - int retVal; -#ifdef DEBUGGING - retVal = Perl_run(); -#else - try - { - retVal = Perl_run(); - } - catch(...) - { - win32_fprintf(stderr, "Error: Runtime exception\n"); - retVal = -1; - } -#endif - return retVal; -} - -EXTERN_C int -perl_parse(PerlInterpreter* my_perl, void (*xsinit)(CPerlObj*), int argc, char** argv, char** env) -{ - int retVal; - CPerlObj* pPerl = (CPerlObj*)my_perl; -#ifdef DEBUGGING - retVal = Perl_parse(xsinit, argc, argv, env); -#else - try - { - retVal = Perl_parse(xsinit, argc, argv, env); - } - catch(...) - { - win32_fprintf(stderr, "Error: Parse exception\n"); - retVal = -1; - } -#endif - *win32_errno() = 0; - return retVal; -} - -#undef PL_perl_destruct_level -#define PL_perl_destruct_level int dummy - -#endif /* PERL_OBJECT */ #endif /* PERL_IMPLICIT_SYS */ EXTERN_C HANDLE w32_perldll_handle; @@ -293,23 +181,7 @@ RunPerl(int argc, char **argv, char **env) exitstatus = perl_parse(my_perl, xs_init, argc, argv, env); if (!exitstatus) { #if defined(TOP_CLONE) && defined(USE_ITHREADS) /* XXXXXX testing */ -# ifdef PERL_OBJECT - CPerlHost *h = new CPerlHost(); - new_perl = perl_clone_using(my_perl, 1, - h->m_pHostperlMem, - h->m_pHostperlMemShared, - h->m_pHostperlMemParse, - h->m_pHostperlEnv, - h->m_pHostperlStdIO, - h->m_pHostperlLIO, - h->m_pHostperlDir, - h->m_pHostperlSock, - h->m_pHostperlProc - ); - CPerlObj *pPerl = (CPerlObj*)new_perl; -# else new_perl = perl_clone(my_perl, 1); -# endif exitstatus = perl_run(new_perl); PERL_SET_THX(my_perl); #else diff --git a/wince/win32.h b/wince/win32.h index a6544c6c93..c9c3a037f1 100644 --- a/wince/win32.h +++ b/wince/win32.h @@ -16,7 +16,7 @@ # define _WIN32_WINNT 0x0400 /* needed for TryEnterCriticalSection() etc. */ #endif -#if defined(PERL_OBJECT) || defined(PERL_IMPLICIT_SYS) || defined(PERL_CAPI) +#if defined(PERL_IMPLICIT_SYS) # define DYNAMIC_ENV_FETCH # define ENV_HV_NAME "___ENV_HV_NAME___" # define HAS_GETENV_LEN @@ -46,16 +46,12 @@ /* now even GCC supports __declspec() */ -#if defined(PERL_OBJECT) -#define DllExport -#else #if defined(PERLDLL) || defined(WIN95FIX) #define DllExport /*#define DllExport __declspec(dllexport)*/ /* noises with VC5+sp3 */ #else #define DllExport __declspec(dllimport) #endif -#endif #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -186,11 +182,6 @@ struct utsname { #pragma warn -pro /* "call to function with no prototype" */ #pragma warn -stu /* "undefined structure 'foo'" */ -/* Borland is picky about a bare member function name used as its ptr */ -#ifdef PERL_OBJECT -# define MEMBER_TO_FPTR(name) &(name) -#endif - /* Borland C thinks that a pointer to a member variable is 12 bytes in size. */ #define PERL_MEMBER_PTR_SIZE 12 @@ -220,10 +211,6 @@ typedef long gid_t; #define flushall _flushall #define fcloseall _fcloseall -#ifdef PERL_OBJECT -# define MEMBER_TO_FPTR(name) &(name) -#endif - #ifndef _O_NOINHERIT # define _O_NOINHERIT 0x0080 # ifndef _NO_OLDNAMES @@ -240,46 +227,6 @@ typedef long gid_t; /* compatibility stuff for other compilers goes here */ - -#if !defined(PERL_OBJECT) && defined(PERL_CAPI) && defined(PERL_MEMBER_PTR_SIZE) -# define STRUCT_MGVTBL_DEFINITION \ -struct mgvtbl { \ - union { \ - int (CPERLscope(*svt_get))(pTHX_ SV *sv, MAGIC* mg); \ - char handle_VC_problem1[PERL_MEMBER_PTR_SIZE]; \ - }; \ - union { \ - int (CPERLscope(*svt_set))(pTHX_ SV *sv, MAGIC* mg); \ - char handle_VC_problem2[PERL_MEMBER_PTR_SIZE]; \ - }; \ - union { \ - U32 (CPERLscope(*svt_len))(pTHX_ SV *sv, MAGIC* mg); \ - char handle_VC_problem3[PERL_MEMBER_PTR_SIZE]; \ - }; \ - union { \ - int (CPERLscope(*svt_clear))(pTHX_ SV *sv, MAGIC* mg); \ - char handle_VC_problem4[PERL_MEMBER_PTR_SIZE]; \ - }; \ - union { \ - int (CPERLscope(*svt_free))(pTHX_ SV *sv, MAGIC* mg); \ - char handle_VC_problem5[PERL_MEMBER_PTR_SIZE]; \ - }; \ -} - -# define BASEOP_DEFINITION \ - OP* op_next; \ - OP* op_sibling; \ - OP* (CPERLscope(*op_ppaddr))(pTHX); \ - char handle_VC_problem[PERL_MEMBER_PTR_SIZE-sizeof(OP*)]; \ - PADOFFSET op_targ; \ - OPCODE op_type; \ - U16 op_seq; \ - U8 op_flags; \ - U8 op_private; - -#endif /* !PERL_OBJECT && PERL_CAPI && PERL_MEMBER_PTR_SIZE */ - - START_EXTERN_C #undef Stat diff --git a/wince/win32thread.c b/wince/win32thread.c index 51b33d59eb..a94ffa4234 100644 --- a/wince/win32thread.c +++ b/wince/win32thread.c @@ -3,12 +3,6 @@ #include "EXTERN.h" #include "perl.h" -#if defined(PERL_OBJECT) -#define NO_XSLOCKS -extern CPerlObj* pPerl; -#include "XSUB.h" -#endif - #ifdef USE_DECLSPEC_THREAD __declspec(thread) void *PL_current_context = NULL; #endif diff --git a/wince/wince.c b/wince/wince.c index c2cda81ffe..e9c9c8c3b3 100644 --- a/wince/wince.c +++ b/wince/wince.c @@ -60,13 +60,6 @@ # define getlogin g_getlogin #endif -#if defined(PERL_OBJECT) -# undef do_aspawn -# define do_aspawn g_do_aspawn -# undef Perl_do_exec -# define Perl_do_exec g_do_exec -#endif - static long filetime_to_clock(PFILETIME ft); static BOOL filetime_from_time(PFILETIME ft, time_t t); static char * get_emd_part(SV **leading, char *trailing, ...); @@ -132,7 +125,7 @@ get_regstr_from(HKEY hkey, const char *valuename, SV **svp) DWORD datalen; retval = XCERegQueryValueExA(handle, valuename, 0, &type, NULL, &datalen); if (retval == ERROR_SUCCESS && type == REG_SZ) { - dTHXo; + dTHX; if (!*svp) *svp = sv_2mortal(newSVpvn("",0)); SvGROW(*svp, datalen); @@ -212,7 +205,7 @@ get_emd_part(SV **prev_pathp, char *trailing_path, ...) /* only add directory if it exists */ if (XCEGetFileAttributesA(mod_name) != (DWORD) -1) { /* directory exists */ - dTHXo; + dTHX; if (!*prev_pathp) *prev_pathp = sv_2mortal(newSVpvn("",0)); sv_catpvn(*prev_pathp, ";", 1); @@ -226,7 +219,7 @@ get_emd_part(SV **prev_pathp, char *trailing_path, ...) char * win32_get_privlib(const char *pl) { - dTHXo; + dTHX; char *stdlib = "lib"; char buffer[MAX_PATH+1]; SV *sv = Nullsv; @@ -243,7 +236,7 @@ win32_get_privlib(const char *pl) static char * win32_get_xlib(const char *pl, const char *xlib, const char *libname) { - dTHXo; + dTHX; char regstr[40]; char pathstr[MAX_PATH+1]; DWORD datalen; @@ -589,23 +582,19 @@ win32_uname(struct utsname *name) return 0; } -#ifndef PERL_OBJECT - static UINT timerid = 0; static VOID CALLBACK TimerProc(HWND win, UINT msg, UINT id, DWORD time) { - dTHXo; + dTHX; KillTimer(NULL,timerid); timerid=0; sighandler(14); } -#endif /* !PERL_OBJECT */ DllExport unsigned int win32_alarm(unsigned int sec) { -#ifndef PERL_OBJECT /* * the 'obvious' implentation is SetTimer() with a callback * which does whatever receiving SIGALRM would do @@ -615,7 +604,7 @@ win32_alarm(unsigned int sec) * Snag is unless something is looking at the message queue * nothing happens :-( */ - dTHXo; + dTHX; if (sec) { timerid = SetTimer(NULL,timerid,sec*1000,(TIMERPROC)TimerProc); @@ -630,7 +619,6 @@ win32_alarm(unsigned int sec) timerid=0; } } -#endif /* !PERL_OBJECT */ return 0; } @@ -641,7 +629,7 @@ extern char * des_fcrypt(const char *txt, const char *salt, char *cbuf); DllExport char * win32_crypt(const char *txt, const char *salt) { - dTHXo; + dTHX; #ifdef HAVE_DES_FCRYPT dTHR; return des_fcrypt(txt, salt, w32_crypt_buffer); @@ -756,7 +744,7 @@ win32_strerror(int e) DllExport void win32_str_os_error(void *sv, DWORD dwErr) { - dTHXo; + dTHX; sv_setpvn((SV*)sv, "Error", 5); } @@ -1237,7 +1225,7 @@ win32_execvp(const char *cmdname, const char *const *argv) DllExport void* win32_dynaload(const char* filename) { - dTHXo; + dTHX; HMODULE hModule; hModule = XCELoadLibraryA(filename); @@ -1466,7 +1454,7 @@ XS(w32_ShellEx) void Perl_init_os_extras(void) { - dTHXo; + dTHX; char *file = __FILE__; dXSUB_SYS; @@ -1571,11 +1559,6 @@ wce_hitreturn() ////////////////////////////////////////////////////////////////////// -#ifdef PERL_OBJECT -# undef this -# define this pPerl -#endif - void win32_argv2utf8(int argc, char** argv) { diff --git a/wince/wincesck.c b/wince/wincesck.c index 64a1cab0c5..beb7489e4f 100644 --- a/wince/wincesck.c +++ b/wince/wincesck.c @@ -28,11 +28,6 @@ #include "EXTERN.h" #include "perl.h" -#if defined(PERL_OBJECT) -#define NO_XSLOCKS -#include "XSUB.h" -#endif - #include "Win32iop.h" #include <sys/socket.h> @@ -103,7 +98,7 @@ static int wsock_started = 0; void start_sockets(void) { - dTHXo; + dTHX; unsigned short version; WSADATA retdata; int ret; @@ -329,7 +324,7 @@ win32_getprotobynumber(int num) struct servent * win32_getservbyname(const char *name, const char *proto) { - dTHXo; + dTHX; struct servent *r; SOCKET_TEST(r = getservbyname(name, proto), NULL); @@ -342,7 +337,7 @@ win32_getservbyname(const char *name, const char *proto) struct servent * win32_getservbyport(int port, const char *proto) { - dTHXo; + dTHX; struct servent *r; SOCKET_TEST(r = getservbyport(port, proto), NULL); @@ -355,7 +350,7 @@ win32_getservbyport(int port, const char *proto) int win32_ioctl(int i, unsigned int u, char *data) { - dTHXo; + dTHX; u_long argp = (u_long)data; int retval; @@ -396,28 +391,28 @@ win32_inet_addr(const char FAR *cp) void win32_endhostent() { - dTHXo; + dTHX; Perl_croak_nocontext("endhostent not implemented!\n"); } void win32_endnetent() { - dTHXo; + dTHX; Perl_croak_nocontext("endnetent not implemented!\n"); } void win32_endprotoent() { - dTHXo; + dTHX; Perl_croak_nocontext("endprotoent not implemented!\n"); } void win32_endservent() { - dTHXo; + dTHX; Perl_croak_nocontext("endservent not implemented!\n"); } @@ -425,7 +420,7 @@ win32_endservent() struct netent * win32_getnetent(void) { - dTHXo; + dTHX; Perl_croak_nocontext("getnetent not implemented!\n"); return (struct netent *) NULL; } @@ -433,7 +428,7 @@ win32_getnetent(void) struct netent * win32_getnetbyname(char *name) { - dTHXo; + dTHX; Perl_croak_nocontext("getnetbyname not implemented!\n"); return (struct netent *)NULL; } @@ -441,7 +436,7 @@ win32_getnetbyname(char *name) struct netent * win32_getnetbyaddr(long net, int type) { - dTHXo; + dTHX; Perl_croak_nocontext("getnetbyaddr not implemented!\n"); return (struct netent *)NULL; } @@ -449,7 +444,7 @@ win32_getnetbyaddr(long net, int type) struct protoent * win32_getprotoent(void) { - dTHXo; + dTHX; Perl_croak_nocontext("getprotoent not implemented!\n"); return (struct protoent *) NULL; } @@ -457,7 +452,7 @@ win32_getprotoent(void) struct servent * win32_getservent(void) { - dTHXo; + dTHX; Perl_croak_nocontext("getservent not implemented!\n"); return (struct servent *) NULL; } @@ -465,7 +460,7 @@ win32_getservent(void) void win32_sethostent(int stayopen) { - dTHXo; + dTHX; Perl_croak_nocontext("sethostent not implemented!\n"); } @@ -473,7 +468,7 @@ win32_sethostent(int stayopen) void win32_setnetent(int stayopen) { - dTHXo; + dTHX; Perl_croak_nocontext("setnetent not implemented!\n"); } @@ -481,7 +476,7 @@ win32_setnetent(int stayopen) void win32_setprotoent(int stayopen) { - dTHXo; + dTHX; Perl_croak_nocontext("setprotoent not implemented!\n"); } @@ -489,7 +484,7 @@ win32_setprotoent(int stayopen) void win32_setservent(int stayopen) { - dTHXo; + dTHX; Perl_croak_nocontext("setservent not implemented!\n"); } |