diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-03-10 23:34:12 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-03-10 23:34:12 +0000 |
commit | fec02dd38faf8f83471b031857d89cb76fea1ca0 (patch) | |
tree | 08cf20e0c29e7a13cc3953d509bf2477ac643908 | |
parent | 1fc4cb5503ed4e568f4cafd2aff20f315226e3bd (diff) | |
download | perl-fec02dd38faf8f83471b031857d89cb76fea1ca0.tar.gz |
perl5.000 patch.0o: [address] a few more Configure and build nits.perl-5.000o
This patch addresses a few more Configure and build nits. Full
details are given below, but the main hightligths are (slightly)
better support for nested extensions and DLD and AIX MakeMaker fixes.
Configure
Detect MachTen. Thanks to Mark Pease <peasem@primenet.com>.
Delete some tabs that caused a MachTen /bin/sh core dump!
Detect extensions nested 1 level deep, e.g. Devel/DProf/DProf.xs
MANIFEST
MANIFEST.new
Include new hints/machten.sh hint file.
Makefile.SH
Document why we use ./makedir instead of mkdir.
U/Extensions.U
Detect extensions nested 1 level deep, e.g. Devel/DProf/DProf.xs
U/dist3_051.pat
Include MachTen patches.
configpm
Convert nested extension names from filesytem-dependent Devel/DProf
to perl5's internal naming scheme Devel::DProf.
doio.c
A dup-related buglet fix from Hallvard B. Furuseth
<h.b.furuseth@usit.uio.no>.
ext/DB_File/DB_File.pm
ext/DynaLoader/DynaLoader.pm
ext/Fcntl/Fcntl.pm
ext/GDBM_File/GDBM_File.pm
ext/POSIX/POSIX.pm
ext/Socket/Socket.pm
Throw a qw() around @ISA elements to show "good style".
hints/machten.sh
new file.
lib/ExtUtils/MakeMaker.pm
Bump version number to 4.086.
Fix AIX buglet -- needed to specify NAME.
Linux/DLD/gcc-2.6.2: We no longer load .sa libraries (except
libm.sa, which is apparently still o.k.
util.c
Another dup-related buglet fix.
-rwxr-xr-x | Configure | 25 | ||||
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | MANIFEST.new | 1 | ||||
-rw-r--r-- | Makefile.SH | 3 | ||||
-rw-r--r-- | U/Extensions.U | 20 | ||||
-rw-r--r-- | U/dist3_051.pat | 67 | ||||
-rwxr-xr-x | configpm | 8 | ||||
-rw-r--r-- | doio.c | 3 | ||||
-rw-r--r-- | ext/DB_File/DB_File.pm | 2 | ||||
-rw-r--r-- | ext/DynaLoader/DynaLoader.pm | 2 | ||||
-rw-r--r-- | ext/Fcntl/Fcntl.pm | 2 | ||||
-rw-r--r-- | ext/GDBM_File/GDBM_File.pm | 2 | ||||
-rw-r--r-- | ext/POSIX/POSIX.pm | 2 | ||||
-rw-r--r-- | ext/Socket/Socket.pm | 2 | ||||
-rw-r--r-- | hints/machten.sh | 27 | ||||
-rw-r--r-- | lib/ExtUtils/MakeMaker.pm | 17 | ||||
-rw-r--r-- | util.c | 10 |
17 files changed, 172 insertions, 22 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.6 1994/10/29 15:54:19 ram Exp $ # -# Generated on Mon Mar 6 11:00:02 EST 1995 [metaconfig 3.0 PL51] +# Generated on Fri Mar 10 09:48:55 EST 1995 [metaconfig 3.0 PL51] cat >/tmp/c1$$ <<EOF ARGGGHHHH!!!!! @@ -1479,6 +1479,9 @@ EOM $test -d /usr/apollo/bin && osname=apollo $test -f /etc/saf/_sactab && osname=svr4 $test -d /usr/include/minix && osname=minix + $test -d /MachTen && osname=machten && \ + osvers=`/usr/etc/version | $awk '{print $2}' | \ + $sed -e 's/[A-Za-z]$//'` if $test -f $uname; then set X $myuname shift @@ -4016,10 +4019,10 @@ while $test "$cont"; do var=$2; eval "was=\$$2"; if $test "$xxx" && $test -r "$xxx"; then eval $xxf; - eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td"; + eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td"; cont=""; else eval $xxnf; - eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi; + eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi; set $yyy; shift; shift; yyy=$@; case $# in 0) cont="";; 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; @@ -6314,10 +6317,26 @@ eval $setvar echo " " echo "Looking for extensions..." >&4 cd ../ext +: If we are using the old config.sh, known_extensions may contain +: old or inaccurate or duplicate values. known_extensions='' +: We do not use find because it might not be available. +: We do not just use MANIFEST because the user may have dropped +: some additional extensions into the source tree and expect them +: to be built. for xxx in * ; do if $test -f $xxx/$xxx.xs; then known_extensions="$known_extensions $xxx" + else + if $test -d $xxx; then + cd $xxx + for yyy in * ; do + if $test -f $yyy/$yyy.xs; then + known_extensions="$known_extensions $xxx/$yyy" + fi + done + cd .. + fi fi done set X $known_extensions @@ -201,6 +201,7 @@ hints/irix_6.sh Hints for named architecture hints/isc.sh Hints for named architecture hints/isc_2.sh Hints for named architecture hints/linux.sh Hints for named architecture +hints/machten.sh Hints for named architecture hints/mips.sh Hints for named architecture hints/mpc.sh Hints for named architecture hints/mpeix.sh Hints for named architecture diff --git a/MANIFEST.new b/MANIFEST.new index fcb1ec3024..9df21550a1 100644 --- a/MANIFEST.new +++ b/MANIFEST.new @@ -201,6 +201,7 @@ hints/irix_6.sh Hints for named architecture hints/isc.sh Hints for named architecture hints/isc_2.sh Hints for named architecture hints/linux.sh Hints for named architecture +hints/machten.sh Hints for named architecture hints/mips.sh Hints for named architecture hints/mpc.sh Hints for named architecture hints/mpeix.sh Hints for named architecture diff --git a/Makefile.SH b/Makefile.SH index 6bbd7fe884..9de1de763a 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -254,6 +254,9 @@ opcode.h: opcode.pl embed.h: embed_h.sh global.sym interp.sym sh embed_h.sh +# We have to call our ./makedir because Ultrix 4.3 make can't handle the line +# test -d lib/auto || mkdir lib/auto +# preplibrary: miniperl lib/Config.pm @./makedir lib/auto @echo " AutoSplitting perl library" diff --git a/U/Extensions.U b/U/Extensions.U index bcaffc0c52..2cba199929 100644 --- a/U/Extensions.U +++ b/U/Extensions.U @@ -36,18 +36,32 @@ ?S: for hints files to indicate that POSIX will not compile ?S: on a particular system. ?S:. -?T:xxx avail_ext +?T:xxx yyy avail_ext ?INIT:: set useposix=false in your hint file to disable the POSIX extension. ?INIT:useposix=true echo " " echo "Looking for extensions..." >&4 cd ../ext -?X: If we're using the old config.sh, known_extensions may contain -?X: old or inaccurate (or duplicate) values. +: If we are using the old config.sh, known_extensions may contain +: old or inaccurate or duplicate values. known_extensions='' +: We do not use find because it might not be available. +: We do not just use MANIFEST because the user may have dropped +: some additional extensions into the source tree and expect them +: to be built. for xxx in * ; do if $test -f $xxx/$xxx.xs; then known_extensions="$known_extensions $xxx" + else + if $test -d $xxx; then + cd $xxx + for yyy in * ; do + if $test -f $yyy/$yyy.xs; then + known_extensions="$known_extensions $xxx/$yyy" + fi + done + cd .. + fi fi done set X $known_extensions diff --git a/U/dist3_051.pat b/U/dist3_051.pat index 1a671d8bb0..c1c877db7c 100644 --- a/U/dist3_051.pat +++ b/U/dist3_051.pat @@ -5,8 +5,11 @@ These patches do the following: Oldconfig.U Clean up and extend the $osvers detection for DEC OSF/1 on the Alpha. + Add MachTen detection (requires adding awk to ?MAKE line). archname.U Protect against spaces in the output of uname -m. +Inhdr.U + Delete tabs that caused /bin/sh to core dump on Mach Ten 2.1.1. libc.U Pick up Linux nm output with leading __IO. sig_name.U @@ -18,10 +21,70 @@ usrinc.U Dept. of Physics Lafayette College, Easton, PA 18042 USA +Index: Inhdr.U +Prereq: 3.0.1.1 +*** mcon/U/Inhdr.U Sat Oct 29 15:28:15 1994 +--- /home2/doughera/lib/dist/U/Inhdr.U Wed Mar 8 15:52:13 1995 +*************** +*** 52,61 **** + var=$2; eval "was=\$$2"; + if $test "$xxx" && $test -r "$xxx"; + then eval $xxf; +! eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td"; + cont=""; + else eval $xxnf; +! eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi; + set $yyy; shift; shift; yyy=$@; + case $# in 0) cont="";; + 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; +--- 52,65 ---- + var=$2; eval "was=\$$2"; + if $test "$xxx" && $test -r "$xxx"; + then eval $xxf; +! ?X: This line deliberately shifted left 1 tabstop to avoid /bin/sh core dump +! ?X: on MachTen 2.1.1. --AD March 8, 1995 +! eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td"; + cont=""; + else eval $xxnf; +! ?X: This line deliberately shifted left 1 tabstop to avoid /bin/sh core dump +! ?X: on MachTen 2.1.1. --AD March 8, 1995 +! eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi; + set $yyy; shift; shift; yyy=$@; + case $# in 0) cont="";; + 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; Index: Oldconfig.U Prereq: 3.0.1.7 *** mcon/U/Oldconfig.U Thu Feb 16 09:52:38 1995 ---- /home2/doughera/lib/dist/U/Oldconfig.U Thu Feb 16 16:26:25 1995 +--- /home2/doughera/lib/dist/U/Oldconfig.U Fri Mar 10 09:43:30 1995 +*************** +*** 45,51 **** + ?X: for the sake of setting defaults. + ?X: + ?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \ +! sed test cat rm lns n c contains Loc Options Tr + ?MAKE: -pick wipe $@ %< + ?S:myuname: + ?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix, +--- 45,51 ---- + ?X: for the sake of setting defaults. + ?X: + ?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \ +! awk sed test cat rm lns n c contains Loc Options Tr + ?MAKE: -pick wipe $@ %< + ?S:myuname: + ?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix, +*************** +*** 150,155 **** +--- 150,158 ---- + $test -d /usr/apollo/bin && osname=apollo + $test -f /etc/saf/_sactab && osname=svr4 + $test -d /usr/include/minix && osname=minix ++ $test -d /MachTen && osname=machten && \ ++ osvers=`/usr/etc/version | $awk '{print $2}' | \ ++ $sed -e 's/[A-Za-z]$//'` + ?X: If we have uname, we already computed a suitable uname -a output, correctly + ?X: formatted for Xenix, and it lies in $myuname. + if $test -f $uname; then *************** *** 264,275 **** osvers="$3" @@ -36,7 +99,7 @@ Prereq: 3.0.1.7 ;; hp*) osname=hp_osf1 ;; mips) osname=mips_osf1 ;; ---- 264,274 ---- +--- 267,277 ---- osvers="$3" ;; osf1) case "$5" in @@ -9,6 +9,9 @@ $config_pm = $ARGV[0] || 'lib/Config.pm'; dynamic_ext static_ext extensions dl_src sig_name ccflags cppflags intsize); +# names of things which may need to have slashes changed to double-colons +@extensions = qw(dynamic_ext static_ext extensions known_extensions); + open CONFIG, ">$config_pm" or die "Can't open $config_pm: $!\n"; $myver = sprintf("%.3f", $]); @@ -27,6 +30,7 @@ require Exporter; ENDOFBEG @fast{@fast} = @fast; +@extensions{@extensions} = @extensions; @non_v=(); @v_fast=(); @v_others=(); @@ -39,7 +43,9 @@ while (<>) { push(@non_v, "#$_"); # not a name='value' line next; } - if (!$fast{$1}){ push(@v_others, $_); next; } + $name = $1; + if ($extensions{$name}) { s,/,::,g } + if (!$fast{$name}){ push(@v_others, $_); next; } push(@v_fast,$_); } @@ -168,7 +168,8 @@ FILE *supplied_fp; if (dodup) fd = dup(fd); if (!(fp = fdopen(fd,mode))) - close(fd); + if (dodup) + close(fd); } } else { diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index af56cc0548..4cff8da4a9 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -179,7 +179,7 @@ require TieHash; require Exporter; require AutoLoader; require DynaLoader; -@ISA = (TieHash, Exporter, DynaLoader); +@ISA = qw(TieHash Exporter DynaLoader); @EXPORT = qw( $DB_BTREE $DB_HASH $DB_RECNO BTREEMAGIC diff --git a/ext/DynaLoader/DynaLoader.pm b/ext/DynaLoader/DynaLoader.pm index 9a21dfd40b..2c375d0fd5 100644 --- a/ext/DynaLoader/DynaLoader.pm +++ b/ext/DynaLoader/DynaLoader.pm @@ -18,7 +18,7 @@ use Config; use Carp; use AutoLoader; -@ISA=(AutoLoader); +@ISA=qw(AutoLoader); # enable messages from DynaLoader perl code diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index d55d4e30bd..b18d1365e5 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -3,7 +3,7 @@ package Fcntl; require Exporter; require AutoLoader; require DynaLoader; -@ISA = (Exporter, DynaLoader); +@ISA = qw(Exporter DynaLoader); # Items to export into callers namespace by default # (move infrequently used names to @EXPORT_OK below) @EXPORT = diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm index 99b6390e80..cf260b51fa 100644 --- a/ext/GDBM_File/GDBM_File.pm +++ b/ext/GDBM_File/GDBM_File.pm @@ -5,7 +5,7 @@ require TieHash; require Exporter; require AutoLoader; require DynaLoader; -@ISA = (TieHash, Exporter, DynaLoader); +@ISA = qw(TieHash Exporter DynaLoader); @EXPORT = qw( GDBM_CACHESIZE GDBM_FAST diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index f59b4c393a..24e09fc3eb 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -5,7 +5,7 @@ require Exporter; require AutoLoader; require DynaLoader; require Config; -@ISA = (Exporter, DynaLoader); +@ISA = qw(Exporter DynaLoader); $H{assert_h} = [qw(assert NDEBUG)]; diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index a129ec694e..8e6e097c0c 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -4,7 +4,7 @@ use Carp; require Exporter; require AutoLoader; require DynaLoader; -@ISA = (Exporter, DynaLoader); +@ISA = qw(Exporter DynaLoader); @EXPORT = qw( AF_802 AF_APPLETALK diff --git a/hints/machten.sh b/hints/machten.sh new file mode 100644 index 0000000000..cbf634ab67 --- /dev/null +++ b/hints/machten.sh @@ -0,0 +1,27 @@ +# machten.sh +# This file has been put together by Mark Pease <peasem@primenet.com> +# Comments, questions, and improvements welcome! +# +# MachTen does not support dynamic loading. If you wish to, you +# can get <ftp://tsx-11.mit.edu/pub/linux/sources/libs/dld-src-3.2.4.tar.gz> +# compile and install. This is the version of DLD that works with the +# ext/DynaLoader/dl_dld.xs in the perl5 package. Have fun! +# +# Original version was for MachTen 2.1.1. +# Last modified by Andy Dougherty <doughera@lafcol.lafayette.edu> +# Wed Mar 8 15:58:05 EST 1995 + +# I don't know why this is needed. It might be similar to NeXT's +# problem. See hints/next_3_2.sh. +usemymalloc='n' + +so='none' +# These are useful only if you have DLD, but harmless otherwise. +lddlflags='-r' +dlext='o' + +# MachTen does not support POSIX enough to compile the POSIX module. +useposix=false + +#MachTen might have an incomplete Berkeley DB implementation. +i_db=$undef diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index dbb877eccc..f619108341 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker; -$Version = 4.085; # Last edited 21st Feb 1995 by Andreas Koenig +$Version = 4.086; # Last edited 9 Mar 1995 by Andy Dougherty use Config; check_hints(); @@ -1374,7 +1374,7 @@ $att{BASEEXT}.exp: Makefile.PL ",' $(PERL) $(I_PERL_LIBS) -e \'use ExtUtils::MakeMaker; \\ mksymlists(DL_FUNCS => ', %$funcs ? neatvalue($funcs) : '""',', DL_VARS => ', - @$vars ? neatvalue($vars) : '""',")' + @$vars ? neatvalue($vars) : '""', ", NAME => \"$att{NAME}\")' "); join('',@m); @@ -1977,9 +1977,16 @@ sub extliblist{ my($found_lib)=0; foreach $thispth (@searchpath, @libpath){ + # Try to find the full name of the library. We need this to + # determine whether it's a dynamically-loadable library or not. + # This tends to be subject to various os-specific quirks. + # For gcc-2.6.2 on linux (March 1995), DLD can not load + # .sa libraries, with the exception of libm.sa, so we + # deliberately skip them. if (@fullname=<${thispth}/lib${thislib}.${so}.[0-9]*>){ $fullname=$fullname[-1]; #ATTN: 10 looses against 9! - } elsif (-f ($fullname="$thispth/lib$thislib.$so")){ + } elsif (-f ($fullname="$thispth/lib$thislib.$so") + && (($Config{'dlsrc'} ne "dl_dld") || ($thislib eq "m"))){ } elsif (-f ($fullname="$thispth/lib${thislib}_s.a") && ($thislib .= "_s") ){ # we must explicitly ask for _s version } elsif (-f ($fullname="$thispth/lib$thislib.a")){ @@ -2258,6 +2265,10 @@ Fixed a bug that didn't allow lib/ directory work as documented. Allowed C<make test TEST_VERBOSE=1> +v4.086 March 9 1995 by Andy Dougherty + +Fixed some AIX buglets. Fixed DLD support for Linux with gcc 2.6.2. + =head1 NOTES MakeMaker development work still to be done: @@ -1322,25 +1322,29 @@ char *s; #endif #ifndef HAS_DUP2 +int dup2(oldfd,newfd) int oldfd; int newfd; { #if defined(HAS_FCNTL) && defined(F_DUPFD) + if (oldfd == newfd) + return oldfd; close(newfd); - fcntl(oldfd, F_DUPFD, newfd); + return fcntl(oldfd, F_DUPFD, newfd); #else int fdtmp[256]; I32 fdx = 0; int fd; if (oldfd == newfd) - return 0; + return oldfd; close(newfd); - while ((fd = dup(oldfd)) != newfd) /* good enough for low fd's */ + while ((fd = dup(oldfd)) != newfd && fd >= 0) /* good enough for low fd's */ fdtmp[fdx++] = fd; while (fdx > 0) close(fdtmp[--fdx]); + return fd; #endif } #endif |