From: Andy Dougherty Date: Sat, 2 Dec 1995 03:25:17 +0000 (+0000) Subject: This is patch.2b1d to perl5.002beta1. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25f94b330371810ad4761e17a4e200e6752044c5;p=p5sagit%2Fp5-mst-13.2.git This is patch.2b1d to perl5.002beta1. cd to your perl source directory and type patch -p1 -N < patch.2b1a This patch includes patches for the following items: NETaa14710: Included bsdi_bsdos.sh hint file. pod/perlre.pod: Mention 32bit limit. Configure Updates. Update Socket.xs to version 1.5. This handles systems that might not have . Fix missing quotes in h2ph.PL These are each described in detail below, after the corresponding index line. Patch and enjoy, Andy Dougherty doughera@lafcol.lafayette.edu Dept. of Physics Lafayette College, Easton PA 18042 --- diff --git a/Configure b/Configure index 432398c..76b4e6d 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.8 1995/07/25 13:40:02 ram Exp $ # -# Generated on Mon Nov 20 09:55:37 EST 1995 [metaconfig 3.0 PL58] +# Generated on Sat Dec 2 15:29:39 EST 1995 [metaconfig 3.0 PL58] cat >/tmp/c1$$ <&4 + echo "Go find a public domain implementation or fix your PATH setting!" >&4 exit 1 ;; esac @@ -2486,24 +2495,6 @@ else installbin="$binexp" fi -: determine where manual pages are on this system -echo " " -case "$sysman" in -'') - syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1' - syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1" - syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1" - syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" - syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1" - sysman=`./loc . /usr/man/man1 $syspath` - ;; -esac -if $test -d "$sysman"; then - echo "System manual is in $sysman." >&4 -else - echo "Could not find manual pages in source form." >&4 -fi - : determine where manual pages go set man1dir man1dir none eval $prefixit @@ -2521,18 +2512,28 @@ esac echo "If you don't want the manual sources installed, answer 'none'." case "$man1dir" in '') - lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1" - lookpath="$lookpath $prefixexp/man/l_man/man1" - lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl" - lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1" - lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" - lookpath="$lookpath /usr/man/man.L" - man1dir=`./loc . $prefixexp/man/man1 $lookpath` - if $test -d "$man1dir"; then - dflt="$man1dir" - else - dflt="$sysman" - fi + lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1" + lookpath="$lookpath $prefixexp/man/p_man/man1" + lookpath="$lookpath $prefixexp/man/u_man/man1" + : If prefix contains 'perl' then we want to keep the man pages + : under the prefix directory. Otherwise, look in a variety of + : other possible places. This is debatable, but probably a + : good compromise. + case "$prefix" in + *perl*) ;; + *) lookpath="$lookpath /usr/local/man/man1" + lookpath="$lookpath /opt/local/man/man1" + lookpath="$lookpath /usr/local/man/man.1" + lookpath="$lookpath /opt/local/man/man.1" + lookpath="$lookpath /usr/man/local/man1" + lookpath="$lookpath /usr/man/l_man/man1" + lookpath="$lookpath /usr/man/p_man/man1" + lookpath="$lookpath /usr/man/u_man/man1" + lookpath="$lookpath /usr/man/man.L" + lookpath="$lookpath /usr/man/man.l" + ;; + esac + dflt=`./loc . $prefixexp/man/man1 $lookpath` set dflt eval $prefixup ;; @@ -2544,7 +2545,7 @@ echo " " fn=dn+~ rp="Where do the main $spackage manual pages (source) go?" . ./getfile -if test "X$man1direxp" != "X$ansexp"; then +if $test "X$man1direxp" != "X$ansexp"; then installman1dir='' fi man1dir="$ans" @@ -2801,6 +2802,45 @@ else installscript="$scriptdirexp" fi +: determine where site specific libraries go. +set dflt sitelib lib/site_perl +eval $prefixit +$cat <&4 +else + echo "Could not find manual pages in source form." >&4 +fi + : see what memory models we can support case "$models" in '') @@ -3390,8 +3448,10 @@ case "$optimize" in esac dflt='' -case "$ccflags" in -'') +: We will not override a previous value, but we might want to +: augment a hint file +case "$hint" in +none|recommended) case "$gccversion" in 1*) dflt='-fpcc-struct-return' ;; esac @@ -3446,13 +3506,14 @@ fi set signal.h NO_PROTOTYPE; eval $inctest set signal.h _NO_PROTO; eval $inctest -case "$dflt" in -'') dflt=none;; -esac -case "$ccflags" in -'') ;; +case "$hint" in +none|recommended) dflt="$ccflags $dflt" ;; *) dflt="$ccflags";; esac + +case "$dflt" in +''|' ') dflt=none;; +esac $cat </dev/null; 2>&1; then + if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then echo "./try >try.out 2>try.ret 3>try.err || exit 4" >mtry chmod +x mtry ./mtry >/dev/null 2>&1 @@ -6696,16 +6757,39 @@ case "$myhostname" in ;; *) case "$mydomain" in '') - $hostcat >hosts - dflt=.`$awk "/[0-9].*$myhostname/ {for(i=2; i<=NF;i++) print \\\$i}" \ + { + : If we use NIS, try ypmatch. + : Is there some reason why this was not done before? + test "X$hostcat" = "Xypcat hosts" && + ypmatch "$myhostname" hosts 2>/dev/null |\ + $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \ + $test -s hosts + } || { + : Extract only the relevant hosts, reducing file size, + : remove comments, insert trailing space for later use. + $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ / + /[ ]$myhostname[ . ]/p" > hosts + } + tmp_re="[ . ]" + $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ } + END { print sum }" hosts` = x1 || tmp_re="[ ]" + dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \ hosts | $sort | $uniq | \ - $sed -n -e "s/$myhostname\.\([a-zA-Z_.]\)/\1/p"` - case "$dflt" in + $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"` + case `$echo X$dflt` in + X*\ *) echo "(Several hosts in /etc/hosts matched hostname)" + dflt=. + ;; .) echo "(You do not have fully-qualified names in /etc/hosts)" + ;; + esac + case "$dflt" in + .) tans=`./loc resolv.conf X /etc /usr/etc` if $test -f "$tans"; then echo "(Attempting domain name extraction from $tans)" - dflt=.`egrep '^domain' $tans | $sed 's/domain[ ]*\(.*\)/\1/' \ + : Why was there an Egrep here, when Sed works? + dflt=.`$sed -n -e 's/^domain[ ]*\(.*\)/\1/p' $tans \ | ./tr '[A-Z]' '[a-z]' 2>/dev/null` fi ;; @@ -6986,16 +7070,22 @@ rp="Doubles must be aligned on a how-many-byte boundary?" alignbytes="$ans" $rm -f try.c try -: Define several unixisms. These can be overridden in hint files. -ar='ar' -exe_ext='' -lib_ext='.a' -obj_ext='.o' -path_sep='/' -: Extra object files needed on this platform. -archobjs='' +case "$ar" in +'') ar='ar';; +esac +case "$lib_ext" in +'') lib_ext='.a';; +esac +case "$obj_ext" in +'') obj_ext='.o';; +esac +case "$path_sep" in +'') path_sep=':';; +esac : Which makefile gets called first. This is used by make depend. -firstmakefile='makefile' +case "$firstmakefile" in +'') firstmakefile='makefile';; +esac : check for ordering of bytes in a long case "$byteorder" in @@ -8371,6 +8461,10 @@ eval $inhdr set sys/types.h i_systypes eval $inhdr +: see if this is a sys/un.h system +set sys/un.h i_sysun +eval $inhdr + : see if this is a unistd.h system set unistd.h i_unistd eval $inhdr @@ -8966,6 +9060,7 @@ i_systime='$i_systime' i_systimek='$i_systimek' i_systimes='$i_systimes' i_systypes='$i_systypes' +i_sysun='$i_sysun' i_termio='$i_termio' i_termios='$i_termios' i_time='$i_time' @@ -8983,6 +9078,7 @@ installman3dir='$installman3dir' installprivlib='$installprivlib' installscript='$installscript' installsitearch='$installsitearch' +installsitelib='$installsitelib' intsize='$intsize' known_extensions='$known_extensions' ksh='$ksh' @@ -9081,6 +9177,8 @@ sig_num='$sig_num' signal_t='$signal_t' sitearch='$sitearch' sitearchexp='$sitearchexp' +sitelib='$sitelib' +sitelibexp='$sitelibexp' sizetype='$sizetype' sleep='$sleep' smail='$smail' diff --git a/INSTALL b/INSTALL index de7ca20..f34fb0f 100644 --- a/INSTALL +++ b/INSTALL @@ -60,7 +60,7 @@ the default installation directory, when Configure prompts you or by using the Configure command line option -Dprefix='/some/directory', e.g. - Configure -Dprefix=/opt/perl + sh Configure -Dprefix=/opt/perl If your prefix contains the string "perl", then the directories are simplified. For example, if you use prefix=/opt/perl, @@ -263,7 +263,7 @@ directory of your choice): Then, you can Configure and install in the usual way: - sh ./Configure -des + sh Configure -des make make test make install @@ -276,7 +276,7 @@ installed on multiple systems. Here's one way to do that: # Set up config.over to install perl into a different directory, # e.g. /tmp/perl5 (see previous part). - sh ./Configure -des + sh Configure -des make make test make install @@ -290,6 +290,21 @@ installed on multiple systems. Here's one way to do that: =over 4 +=item Running Configure Interactively + +If Configure runs into trouble, remember that you can always run +Configure interactively so that you can check (and correct) its +guesses. + +All the installation questions have been moved to the top, so you don't +have to wait for them. Once you've handled them (and your C compiler & +flags) you can type '&-d' at the next Configure prompt and Configure +will use the defaults from then on. + +If you find yourself trying obscure command line incantations and +config.over tricks, I recommend you run Configure interactively +instead. You'll probably save yourself time in the long run. + =item Hint files. The perl distribution includes a number of system-specific hints files @@ -314,7 +329,7 @@ B, you should almost always remove your old config.sh. =item Propagating your changes If you later make any changes to F, you should propagate -them to all the .SH files by running B. +them to all the .SH files by running B. =item config.over @@ -344,7 +359,7 @@ lost the next time you run B. To change the C flags for all the files, edit F and change either C<$ccflags> or C<$optimize>, -and then re-run B. +and then re-run B. =item No sh. diff --git a/MANIFEST b/MANIFEST index fde2483..7bdf7a2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -178,7 +178,7 @@ hints/aix.sh Hints for named architecture hints/altos486.sh Hints for named architecture hints/apollo.sh Hints for named architecture hints/aux.sh Hints for named architecture -hints/bsd386.sh Hints for named architecture +hints/bsdi_bsdos.sh Hints for named architecture hints/convexos.sh Hints for named architecture hints/cxux.sh Hints for named architecture hints/dec_osf.sh Hints for named architecture diff --git a/config_h.SH b/config_h.SH index 1d17167..c15dfd4 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1183,6 +1183,12 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$i_systypes I_SYS_TYPES /**/ +/* I_SYS_UN: + * This symbol, if defined, indicates to the C program that it should + * include to get UNIX domain socket definitions. + */ +#$i_sysun I_SYS_UN /**/ + /* I_TERMIO: * This symbol, if defined, indicates that the program should include * rather than . There are also differences in @@ -1515,6 +1521,12 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #define SITEARCH_EXP "$sitearchexp" /**/ +/* SITELIB_EXP: + * This symbol contains the ~name expanded version of SITELIB, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +#define SITELIB_EXP "$sitelibexp" /**/ + /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this * compiler. What various bits mean: diff --git a/ext/Socket/Makefile.PL b/ext/Socket/Makefile.PL index 2b3b083..a12c339 100644 --- a/ext/Socket/Makefile.PL +++ b/ext/Socket/Makefile.PL @@ -1,2 +1,2 @@ use ExtUtils::MakeMaker; -WriteMakefile(VERSION => 1.3); +WriteMakefile(VERSION => 1.5); diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 9c0f04b..f96fbec 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -1,5 +1,5 @@ package Socket; -$VERSION = 1.3; +$VERSION = 1.5; =head1 NAME @@ -117,6 +117,7 @@ In an array context, unpacks its SOCKADDR_UN argument and returns an array consisting of (PATHNAME). In a scalar context, packs its PATHANE arguments as a SOCKADDR_UN and returns it. If this is confusing, use pack_sockaddr_un() and unpack_sockaddr_un() explicitly. +These are only supported if your system has . =item pack_sockaddr_un PATH diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index e799c81..191afa6 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -7,7 +7,9 @@ # include # endif #include +#ifdef I_SYS_UN #include +#endif # ifdef I_NETINET_IN # include # endif @@ -632,11 +634,16 @@ pack_sockaddr_un(pathname) char * pathname CODE: { +#ifdef I_SYS_UN struct sockaddr_un sun_ad; /* fear using sun */ Zero( &sun_ad, sizeof sun_ad, char ); sun_ad.sun_family = AF_UNIX; Copy( pathname, sun_ad.sun_path, sizeof sun_ad.sun_path, char ); ST(0) = sv_2mortal(newSVpv((char *)&sun_ad, sizeof sun_ad)); +#else + ST(0) = (SV *) not_here("pack_sockaddr_un"); +#endif + } void @@ -644,6 +651,7 @@ unpack_sockaddr_un(sun_sv) SV * sun_sv PPCODE: { +#ifdef I_SYS_UN STRLEN sockaddrlen; struct sockaddr_un addr; char * sun_ad = SvPV(sun_sv,sockaddrlen); @@ -663,6 +671,9 @@ unpack_sockaddr_un(sun_sv) AF_UNIX); } ST(0) = sv_2mortal(newSVpv(addr.sun_path, strlen(addr.sun_path))); +#else + ST(0) = (SV *) not_here("unpack_sockaddr_un"); +#endif } void diff --git a/h2ph.PL b/h2ph.PL index 115afe0..58ef8d5 100644 --- a/h2ph.PL +++ b/h2ph.PL @@ -35,7 +35,7 @@ $Config{'startperl'} 'ds 00 \"'; 'ig 00 '; -\$perlincl = $Config{archlibexp}; +\$perlincl = "$Config{archlibexp}"; !GROK!THIS! diff --git a/hints/bsd386.sh b/hints/bsd386.sh deleted file mode 100644 index 6a1b8bc..0000000 --- a/hints/bsd386.sh +++ /dev/null @@ -1,31 +0,0 @@ -# hints file for BSD/386 1.x -# Original by Neil Bowers -# Tue Oct 4 12:01:34 EDT 1994 -# -# filename extension for shared libraries -so='o' - -d_voidsig='define' -sig_name='ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH INFO USR1 USR2 ' -signal_t='void' - -# we don't want to use -lnm, since exp() is busted in there (in 1.1 anyway) -set `echo X "$libswanted "| sed -e 's/ nm / /'` -shift -libswanted="$*" - -# Avoid telldir prototype conflict in pp_sys.c (BSD/386 uses const DIR *) -pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"' - -# Avoid problems with HUGE_VAL in POSIX in 1.0's cc. -# Use gcc2 (2.5.8) if available in 1.1. -case "$osvers" in -1.0*) - POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"' - ;; -1.1*) - case "$cc" in - '') cc=gcc2 ;; - esac - ;; -esac diff --git a/hints/bsdi_bsdos.sh b/hints/bsdi_bsdos.sh new file mode 100644 index 0000000..2ee178c --- /dev/null +++ b/hints/bsdi_bsdos.sh @@ -0,0 +1,61 @@ +# hints/bsdi_bsdos.sh +# +# hints file for BSD/OS 2.x (adapted from bsd386.sh) +# Original by Neil Bowers +# Tue Oct 4 12:01:34 EDT 1994 +# Updated by Tony Sanders +# Mon Mar 13 12:17:24 CST 1995 +# +# You can override the compiler and loader on the Configure command line: +# ./Configure -Dcc=gcc -Dld=ld + +# filename extension for shared library objects +so='o' + +d_voidsig='define' +signal_t='void' + +# If Configure's signal detection fails, uncomment this line. +# sig_name='ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH INFO USR1 USR2 ' + +d_dosuid='define' + +# we don't want to use -lnm, since exp() is busted in there (in 1.1 anyway) +set `echo X "$libswanted "| sed -e 's/ nm / /'` +shift +libswanted="$*" + +# Avoid telldir prototype conflict in pp_sys.c (BSD/386 uses const DIR *) +pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"' + +case "$osvers" in +1.0*) + # Avoid problems with HUGE_VAL in POSIX in 1.0's cc. + POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"' + ;; +1.1*) + # Use gcc2 (2.5.8) if available in 1.1. + case "$cc" in + '') cc=gcc2 ;; + esac + ;; +2.*) + # Use 2.X's gcc2 + case "$cc" in + '') cc=gcc2 ;; + esac + + # Link with shared libraries in 2.X + case "$ld" in + '') ld='shlicc' ;; + esac + + # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS stuff + # in 4.4BSD-based systems (including BSD/OS 2.0 and later). + # See http://www.bsdi.com/bsdi-man?setuid(2) + d_setregid='undef' + d_setreuid='undef' + d_setrgid='undef' + d_setruid='undef' + ;; +esac diff --git a/pod/perlre.pod b/pod/perlre.pod index 2f2d79b..7f63501 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -75,8 +75,8 @@ The following standard quantifiers are recognized: (If a curly bracket occurs in any other context, it is treated as a regular character.) The "*" modifier is equivalent to C<{0,}>, the "+" -modifier to C<{1,}>, and the "?" modifier to C<{0,1}>. There is no limit to the -size of n or m, but large numbers will chew up more memory. +modifier to C<{1,}>, and the "?" modifier to C<{0,1}>. n and m are limited +to integral values less than 65536. By default, a quantified subpattern is "greedy", that is, it will match as many times as possible without causing the rest pattern not to match. The