diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-06 16:11:09 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-06 16:11:09 +0000 |
commit | e852ed17d905386f3bbad057fda2f07926227f89 (patch) | |
tree | 9c602984a369e27373c3cd3b71bd8c8e791393f2 /gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs | |
parent | 9cfdf10e50d1f9e72606c75c7b7a0e18940c80aa (diff) |
virgin perl 5.6.0
Diffstat (limited to 'gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs')
-rw-r--r-- | gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs b/gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs index 4cc07ec4c3c..7d27901e657 100644 --- a/gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs +++ b/gnu/usr.bin/perl/ext/DynaLoader/dl_mpeix.xs @@ -33,16 +33,16 @@ typedef struct { static AV *dl_resolve_using = Nullav; static void -dl_private_init() +dl_private_init(pTHX) { - (void)dl_generic_private_init(); - dl_resolve_using = perl_get_av("DynaLoader::dl_resolve_using", 0x4); + (void)dl_generic_private_init(aTHX); + dl_resolve_using = get_av("DynaLoader::dl_resolve_using", GV_ADDMULTI); } MODULE = DynaLoader PACKAGE = DynaLoader BOOT: - (void)dl_private_init(); + (void)dl_private_init(aTHX); void * dl_load_file(filename, flags=0) @@ -53,10 +53,10 @@ dl_load_file(filename, flags=0) p_mpe_dld obj = NULL; int i; CODE: - DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "dl_load_file(%s,%x):\n", filename, + DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename, flags)); if (flags & 0x01) - warn("Can't make loaded symbols global on this platform while loading %s + Perl_warn(aTHX_ "Can't make loaded symbols global on this platform while loading %s ",filename); obj = (p_mpe_dld) safemalloc(sizeof(t_mpe_dld)); memzero(obj, sizeof(t_mpe_dld)); @@ -68,13 +68,13 @@ flags)); else sprintf(obj->filename," %s ",filename); - DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," libref=%x\n", obj)); + DLDEBUG(2,PerlIO_printf(Perl_debug_log," libref=%x\n", obj)); ST(0) = sv_newmortal() ; if (obj == NULL) - SaveError("%s",Strerror(errno)); + SaveError(aTHX_"%s",Strerror(errno)); else - sv_setiv( ST(0), (IV)obj); + sv_setiv( ST(0), PTR2IV(obj) ); void * dl_find_symbol(libhandle, symbolname) @@ -86,7 +86,7 @@ dl_find_symbol(libhandle, symbolname) char symname[PATH_MAX + 3]; void * symaddr = NULL; int status; - DLDEBUG(2,PerlIO_printf(PerlIO_stderr(),"dl_find_symbol(handle=%x, symbol=%s)\n", + DLDEBUG(2,PerlIO_printf(Perl_debug_log,"dl_find_symbol(handle=%x, symbol=%s)\n", libhandle, symbolname)); ST(0) = sv_newmortal() ; errno = 0; @@ -95,12 +95,12 @@ dl_find_symbol(libhandle, symbolname) HPGETPROCPLABEL(8, symname, &symaddr, &status, obj->filename, 1, 0, &datalen, 1, 0, 0); - DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," symbolref(PROCEDURE) = %x, status=%x\n", symaddr, status)); + DLDEBUG(2,PerlIO_printf(Perl_debug_log," symbolref(PROCEDURE) = %x, status=%x\n", symaddr, status)); if (status != 0) { - SaveError("%s",(errno) ? Strerror(errno) : "Symbol not found") ; + SaveError(aTHX_"%s",(errno) ? Strerror(errno) : "Symbol not found") ; } else { - sv_setiv( ST(0), (IV)symaddr); + sv_setiv( ST(0), PTR2IV(symaddr) ); } void @@ -115,9 +115,11 @@ dl_install_xsub(perl_name, symref, filename="$Package") void * symref char * filename CODE: - DLDEBUG(2,PerlIO_printf(PerlIO_stderr(),"dl_install_xsub(name=%s, symref=%x)\n", + 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(*)())symref, filename))); + ST(0) = sv_2mortal(newRV((SV*)newXS(perl_name, + (void(*)(pTHX_ CV *))symref, + filename))); char * dl_error() |