diff options
author | Larry Wall <lwall@netlabs.com> | 1994-10-17 23:00:00 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1994-10-17 23:00:00 +0000 |
commit | a0d0e21ea6ea90a22318550944fe6cb09ae10cda (patch) | |
tree | faca1018149b736b1142f487e44d1ff2de5cc1fa /ext/dl/dl.c | |
parent | 85e6fe838fb25b257a1b363debf8691c0992ef71 (diff) | |
download | perl-a0d0e21ea6ea90a22318550944fe6cb09ae10cda.tar.gz |
perl 5.000perl-5.000
[editor's note: this commit combines approximate 4 months of furious
releases of Andy Dougherty and Larry Wall - see pod/perlhist.pod for
details. Andy notes that;
Alas neither my "Irwin AccuTrack" nor my DC 600A quarter-inch cartridge
backup tapes from that era seem to be readable anymore. I guess 13 years
exceeds the shelf life for that backup technology :-(.
]
Diffstat (limited to 'ext/dl/dl.c')
-rw-r--r-- | ext/dl/dl.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c deleted file mode 100644 index d514f81897..0000000000 --- a/ext/dl/dl.c +++ /dev/null @@ -1,54 +0,0 @@ -#include <dlfcn.h> - -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" - -static int -XS_DynamicLoader_bootstrap(ix, ax, items) -register int ix; -register int ax; -register int items; -{ - if (items < 1 || items > 1) { - croak("Usage: DynamicLoader::bootstrap(package)"); - } - { - char* package = SvPV(ST(1),na); - void* obj = 0; - int (*bootproc)(); - char tmpbuf[1024]; - char tmpbuf2[128]; - AV *av = GvAVn(incgv); - I32 i; - - for (i = 0; i <= AvFILL(av); i++) { - (void)sprintf(tmpbuf, "%s/auto/%s/%s.so", - SvPVx(*av_fetch(av, i, TRUE), na), package, package); - if (obj = dlopen(tmpbuf,1)) - break; - } - if (!obj) - croak("Can't find loadable object for package %s in @INC", package); - - sprintf(tmpbuf2, "boot_%s", package); - bootproc = (int (*)())dlsym(obj, tmpbuf2); - if (!bootproc) - croak("Shared object %s contains no %s function", tmpbuf, tmpbuf2); - bootproc(); - - ST(0) = sv_mortalcopy(&sv_yes); - } - return ax; -} - -int -boot_DynamicLoader(ix,sp,items) -int ix; -int sp; -int items; -{ - char* file = __FILE__; - - newXSUB("DynamicLoader::bootstrap", 0, XS_DynamicLoader_bootstrap, file); -} |