diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-06-05 02:03:44 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-06-05 02:03:44 +0000 |
commit | c296029969658ed2c8d9a223d4b09026463ca970 (patch) | |
tree | aa1524c2a7ae100bfbfcb083cf37a7626aeab87b /ext | |
parent | 16d20bd98cd29be76029ebf04027a7edd34d817b (diff) | |
download | perl-c296029969658ed2c8d9a223d4b09026463ca970.tar.gz |
This is my patch patch.1j for perl5.001.
To apply, change to your perl directory and apply with
patch -p1 -N < thispatch.
After you apply this patch, I would recommend:
rm config.sh
sh Configure [whatever options you use]
make depend
make
make test
Here are the highlights:
Linux fixes: Now correctly sets & uses stdio _ptr and _cnt
tricks only when feasible (Configure, config_h.SH, config_H,
doio.c, sv.c x2p/str.c)
#!path-to-perl fixed to use $binexp instead of $bin. This should
really be fixed to do the correct perl start-up stuff. Volunteers?
(c2ph.SH, h2ph.SH, h2xs.SH, makeaperl.SH, perldoc.SH,
pod/pod2*.SH, x2p/find2perl.SH, x2p/s2p.SH)
hint updates: hints/apollo.sh, hints/linux.sh, hints/freebsd.sh,
hints/sco_3.sh.
xsubpp version 1.7. (includes CASE support)
pod/perlbot updates.
my lib/AutoLoader patch (to use @INC).
[ON]DBM_File/Makefile.PL now have a few hint files.
Other sundry small things.
Patch and enjoy,
Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College Easton, PA 18042
Here's the file-by-file breakdown of what's included:
Configure
Checks if File_ptr(fp) and File_cnt(fp) can be assigned to.
Fix typo: s/sytem/system/
MANIFEST
Include new extension hint files.
README
Some clarifications, thanks to John Stoeffel. Tell users how to
not use dynamic loading.
c2ph.SH
Use $binexp instead of $bin.
config_H
Updated to match config_h.SH.
config_h.SH
Include defines for whether File_ptr(fp) and File_cnt(fp)
can be assigned to.
doio.c
Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
ext/DynaLoader/DynaLoader.pm
Improve error messages and a little documentation.
ext/NDBM_File/hints/solaris.pl
New hint file.
ext/ODBM_File/Makefile.PL
Removed -ldbm.nfs, since it's now in the sco hint file.
ext/ODBM_File/hints/sco.pl
ext/ODBM_File/hints/solaris.pl
ext/ODBM_File/hints/svr4.pl
New hint files.
h2ph.SH
h2xs.SH
Use $binexp instead of $bin.
hints/apollo.sh
hints/freebsd.sh
hints/linux.sh
hints/sco_3.sh
Updated.
lib/AutoLoader.pm
Eliminate else clause in sub import.
Handle case where @INC contains relative paths.
lib/ExtUtils/xsubpp
Update to version 1.7. This includes CASE support.
lib/I18N/Collate.pm
Updated documentation.
lib/ftp.pl
Look for socket.ph or sys/socket.ph
lib/getcwd.pl
Use defined().
makeaperl.SH
Use $binexp instead of $bin.
perl.c
fputs("\tUnofficial patchlevel 1j.\n",stdout);
perldoc.SH
Use $binexp instead of $bin.
Turn off debugging messages.
pod/perlbot.pod
Updated.
pod/pod2html.SH
pod/pod2latex.SH
pod/pod2man.SH
Use $binexp instead of $bin.
sv.c
Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
toke.c
Fix spelling of ambiguous.
x2p/find2perl.SH
x2p/s2p.SH
Use $binexp instead of $bin.
x2p/str.c
Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/DynaLoader/DynaLoader.pm | 47 | ||||
-rw-r--r-- | ext/NDBM_File/hints/solaris.pl | 3 | ||||
-rw-r--r-- | ext/ODBM_File/Makefile.PL | 2 | ||||
-rw-r--r-- | ext/ODBM_File/hints/sco.pl | 4 | ||||
-rw-r--r-- | ext/ODBM_File/hints/solaris.pl | 3 | ||||
-rw-r--r-- | ext/ODBM_File/hints/svr4.pl | 4 |
6 files changed, 41 insertions, 22 deletions
diff --git a/ext/DynaLoader/DynaLoader.pm b/ext/DynaLoader/DynaLoader.pm index 82721d1936..00466c3f2a 100644 --- a/ext/DynaLoader/DynaLoader.pm +++ b/ext/DynaLoader/DynaLoader.pm @@ -9,25 +9,25 @@ dl_error(), dl_findfile(), dl_expandspec(), dl_load_file(), dl_find_symbol(), dl =head1 SYNOPSIS require DynaLoader; - push (@ISA, 'DynaLoader'); + @ISA = qw(... DynaLoader ...); =head1 DESCRIPTION -This specification defines a standard generic interface to the dynamic +This document defines a standard generic interface to the dynamic linking mechanisms available on many platforms. Its primary purpose is to implement automatic dynamic loading of Perl modules. +This document serves as both a specification for anyone wishing to +implement the DynaLoader for a new platform and as a guide for +anyone wishing to use the DynaLoader directly in an application. + The DynaLoader is designed to be a very simple high-level interface that is sufficiently general to cover the requirements of SunOS, HP-UX, NeXT, Linux, VMS and other platforms. -It is also hoped that the interface will cover the needs of OS/2, -NT etc and allow pseudo-dynamic linking (using C<ld -A> at runtime). - -This document serves as both a specification for anyone wishing to -implement the DynaLoader for a new platform and as a guide for -anyone wishing to use the DynaLoader directly in an application. +It is also hoped that the interface will cover the needs of OS/2, NT +etc and also allow pseudo-dynamic linking (using C<ld -A> at runtime). It must be stressed that the DynaLoader, by itself, is practically useless for accessing non-Perl libraries because it provides almost no @@ -153,8 +153,8 @@ prefix and suffix appropriate to the platform: "$name.o", "lib$name.*" and "$name". If any directories are included in @names they are searched before -@dl_library_path. Directories may be specified as B<-Ldir>. Any other names -are treated as filenames to be searched for. +@dl_library_path. Directories may be specified as B<-Ldir>. Any other +names are treated as filenames to be searched for. Using arguments of the form C<-Ldir> and C<-lname> is recommended. @@ -174,8 +174,8 @@ order to deal with symbolic names for files (i.e., VMS's Logical Names). To support these systems a dl_expandspec() function can be implemented either in the F<dl_*.xs> file or code can be added to the autoloadable -dl_expandspec(0 function in F<DynaLoader.pm>). See F<DynaLoader.pm> for more -information. +dl_expandspec() function in F<DynaLoader.pm>. See F<DynaLoader.pm> for +more information. =item dl_load_file() @@ -232,7 +232,8 @@ Example Return a list of symbol names which remain undefined after load_file(). Returns C<()> if not known. Don't worry if your platform does not provide -a mechanism for this. Most do not need it and hence do not provide it. +a mechanism for this. Most do not need it and hence do not provide it, +they just return an empty list. =item dl_install_xsub() @@ -308,15 +309,15 @@ calls &{"${module}::bootstrap"} to bootstrap the module =head1 AUTHOR +Tim Bunce, 11 August 1994. + This interface is based on the work and comments of (in no particular order): Larry Wall, Robert Sanders, Dean Roehrich, Jeff Okamoto, Anno -Siegel, Thomas Neumann, Paul Marquess, Charles Bailey, and others. +Siegel, Thomas Neumann, Paul Marquess, Charles Bailey, myself and others. Larry Wall designed the elegant inherited bootstrap mechanism and implemented the first Perl 5 dynamic loader using it. -Tim Bunce, 11 August 1994. - =cut # @@ -328,8 +329,7 @@ Tim Bunce, 11 August 1994. # Quote from Tolkien sugested by Anno Siegel. # -# Read ext/DynaLoader/README and DynaLoader.doc for -# detailed information. +# Read ext/DynaLoader/README for detailed information. # # Tim.Bunce@ig.co.uk, August 1994 @@ -394,10 +394,13 @@ sub bootstrap { local($module) = $args[0]; local(@dirs, $file); - croak "Usage: DynaLoader::bootstrap(module)" - unless ($module); + confess "Usage: DynaLoader::bootstrap(module)" unless $module; - croak "Can't load module $module, dynamic loading not available in this perl" + # A common error on platforms which don't support dynamic loading. + # Since it's fatal and potentially confusing we give a detailed message. + croak("Can't load module $module, dynamic loading not available in this perl.\n". + " (You may need to build a new perl executable which either supports\n". + " dynamic loading or has the $module module statically linked into it.)\n") unless defined(&dl_load_file); print STDERR "DynaLoader::bootstrap($module)\n" if $dl_debug; @@ -496,9 +499,11 @@ sub dl_findfile { # Deal with directories first: # Using a -L prefix is the preferred option (faster and more robust) if (m:^-L:){ s/^-L//; push(@dirs, $_); next; } + # Otherwise we try to try to spot directories by a heuristic # (this is a more complicated issue than it first appears) if (m:/: && -d $_){ push(@dirs, $_); next; } + # VMS: we may be using native VMS directry syntax instead of # Unix emulation, so check this as well if ($vms && /[:>\]]/ && -d $_){ push(@dirs, $_); next; } diff --git a/ext/NDBM_File/hints/solaris.pl b/ext/NDBM_File/hints/solaris.pl new file mode 100644 index 0000000000..8d2fe1289e --- /dev/null +++ b/ext/NDBM_File/hints/solaris.pl @@ -0,0 +1,3 @@ +# -lucb has been reported to be fatal for perl5 on Solaris. +# Thus we deliberately don't include it here. +$att{LIBS} = ["-L/usr/local/lib -lndbm", "-ldbm"]; diff --git a/ext/ODBM_File/Makefile.PL b/ext/ODBM_File/Makefile.PL index 7a80882863..10eef6faf4 100644 --- a/ext/ODBM_File/Makefile.PL +++ b/ext/ODBM_File/Makefile.PL @@ -1,2 +1,2 @@ use ExtUtils::MakeMaker; -WriteMakefile(LIBS => ["-ldbm.nfs", "-ldbm -lucb"]); +WriteMakefile(LIBS => ["-ldbm -lucb"]); diff --git a/ext/ODBM_File/hints/sco.pl b/ext/ODBM_File/hints/sco.pl new file mode 100644 index 0000000000..42a4d99171 --- /dev/null +++ b/ext/ODBM_File/hints/sco.pl @@ -0,0 +1,4 @@ +# Some versions of SCO contain a broken -ldbm library that is missing +# dbmclose. Some of those might have a fixed library installed as +# -ldbm.nfs. +$att{LIBS} = ['-ldbm.nfs', '-ldbm']; diff --git a/ext/ODBM_File/hints/solaris.pl b/ext/ODBM_File/hints/solaris.pl new file mode 100644 index 0000000000..0dd124021f --- /dev/null +++ b/ext/ODBM_File/hints/solaris.pl @@ -0,0 +1,3 @@ +# -lucb has been reported to be fatal for perl5 on Solaris. +# Thus we deliberately don't include it here. +$att{LIBS} = ['-ldbm']; diff --git a/ext/ODBM_File/hints/svr4.pl b/ext/ODBM_File/hints/svr4.pl new file mode 100644 index 0000000000..04d40e045a --- /dev/null +++ b/ext/ODBM_File/hints/svr4.pl @@ -0,0 +1,4 @@ +# Some SVR4 systems may need to link against routines in -lucb for +# odbm. Some may also need to link against -lc to pick up things like +# ecvt. +$att{LIBS} = ['-ldbm -lucb -lc']; |