From: Andy Dougherty Date: Mon, 27 Feb 1995 22:35:59 +0000 (+0000) Subject: perl5.000 patch.0m: [various fixes, hint file updates and documentation] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=94b6baf514e11d40f0215cb928074cb7980c3082;p=p5sagit%2Fp5-mst-13.2.git perl5.000 patch.0m: [various fixes, hint file updates and documentation] This is my patch patch.0m for perl5.000. This patch fixes all remaining problems that I am aware of, and for which I have a solution. It also updates some hint files and documentation. Here's what's new: Configure Protect against spaces in uname -m output (unicos). Look in for malloctype and freetype. Check if user has void free() or int free(). Look in linux/signal.h for signal names. MANIFEST MANIFEST.new Two new hint files: cxux.sh and PowerUNIX.sh. Sorted. README Indicate what gets installed and where it usually goes. Thanks to Hallvard B. Furuseth for suggesting this. U/Myinit.U Update extliblist comment. U/dist3_051.pat This file contains patches to dist 3 (PL 51) that I used to generate Configure for perl. U/mallocsrc.U Look in for malloctype and freetype. Check if user has void free() or int free(). config_h.SH config.H Add Free_t to handle void free() vs. int free(). ext/DynaLoader/README Updated comment. ext/POSIX/POSIX.pm creat() has 2 arguments, not 3 (thanks, Paul). ext/POSIX/POSIX.xs Fix return type of lseek. ext/SDBM_File/sdbm/sdbm.h Add I_STDLIB guard on #include ext/util/extliblist Add note indicating this is obsolete. Don't remove it because people might be using it for their own private extensions. hints/PowerUNIX.sh hints/cxux.sh New files. Written by Tom.Horsley@mail.hcsc.com hints/linux.sh Simplified. lib/ExtUtils/MakeMaker.pm Typo fixed, only affected aix? malloc.c Allow for possible int free(). perl.h pp_sys.c util.c If the user is not using vfork, move the #define vfork fork util after various #include files. Since vfork() and fork() might have different prototypes, the #define could cause a conflict in system header files. (Reported for 386bsd.) Makefile.SH make realclean will remove h2xs and makeaperl (but leave behind the .SH versions, of course). --- diff --git a/Configure b/Configure index 2b3796d..86f28eb 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.6 1994/10/29 15:54:19 ram Exp $ # -# Generated on Tue Feb 21 11:46:04 EST 1995 [metaconfig 3.0 PL51] +# Generated on Tue Feb 28 10:00:27 EST 1995 [metaconfig 3.0 PL51] cat >/tmp/c1$$ < tmparch 2>&1 ; then - tarch=`$cat tmparch`"-$osname" + tarch=`$sed -e 's/ /_/g' -e 's/$/'"-$osname/" tmparch` else tarch="$osname" fi @@ -4918,6 +4919,10 @@ eval $setvar set malloc.h i_malloc eval $inhdr +: see if stdlib is available +set stdlib.h i_stdlib +eval $inhdr + : determine which malloc to compile in echo " " case "$usemymalloc" in @@ -4953,29 +4958,48 @@ y*|true) ;; esac -: compute the type returned by malloc +: compute the return types of malloc and free echo " " -case "$malloctype" in -'') - $cat >malloc.c <malloc.c < #include #ifdef I_MALLOC #include #endif +#ifdef I_STDLIB +#include +#endif +#ifdef TRY_MALLOC void *malloc(); +#endif +#ifdef TRY_FREE +void free(); +#endif END - if $cc $ccflags -c malloc.c >/dev/null 2>&1; then +case "$malloctype" in +'') + if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then malloctype='void *' else malloctype='char *' fi - $rm -f malloc.[co] ;; esac echo "Your system wants malloc to return '$malloctype', it would seem." >&4 +case "$freetype" in +'') + if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then + freetype='void' + else + freetype='int' + fi + ;; +esac +echo "Your system uses $freetype free(), it would seem." >&4 +$rm -f malloc.[co] : see if nice exists set nice d_nice eval $inlibc @@ -6970,7 +6994,7 @@ echo " " case "$sig_name" in '') echo "Generating a list of signal names..." >&4 - xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h` + xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`" "`./findhdr linux/signal.h` set X `cat $xxx 2>&1 | $awk ' $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ { sig[$3] = substr($2,4,20) @@ -7495,10 +7519,6 @@ $rm -f varargs* set stddef.h i_stddef eval $inhdr -: see if stdlib is available -set stdlib.h i_stdlib -eval $inhdr - : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl set sys/filio.h i_sysfilio eval $inhdr @@ -7835,6 +7855,7 @@ extensions='$extensions' find='$find' flex='$flex' fpostype='$fpostype' +freetype='$freetype' full_csh='$full_csh' full_sed='$full_sed' gcc='$gcc' diff --git a/MANIFEST b/MANIFEST index c9ec65a..fcb1ec3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -175,13 +175,15 @@ h2xs.SH Program to make .xs files from C header files handy.h Handy definitions hints/3b1.sh Hints for named architecture hints/3b1cc Hints for named architecture -hints/README.hints Hints for named architecture +hints/PowerUNIX.sh Hints for named architecture +hints/README.hints Notes about hints. 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/convexos.sh Hints for named architecture +hints/cxux.sh Hints for named architecture hints/dec_osf.sh Hints for named architecture hints/dgux.sh Hints for named architecture hints/dnix.sh Hints for named architecture @@ -312,12 +314,12 @@ lib/tainted.pl Old code for tainting lib/termcap.pl Perl library supporting termcap usage lib/timelocal.pl Perl library supporting inverse of localtime, gmtime lib/validate.pl Perl library supporting wholesale file mode validation +makeaperl.SH perl script that produces a new perl binary makedepend.SH Precursor to makedepend makedir.SH Precursor to makedir malloc.c A version of malloc you might not want mg.c Magic code mg.h Magic header -makeaperl.SH perl script that produces a new perl binary minimod.PL Writes lib/ExtUtils/Miniperl.pm miniperlmain.c Basic perl w/o dynamic loading or extensions mv-if-diff Script to mv a file if it changed diff --git a/MANIFEST.new b/MANIFEST.new index c9ec65a..fcb1ec3 100644 --- a/MANIFEST.new +++ b/MANIFEST.new @@ -175,13 +175,15 @@ h2xs.SH Program to make .xs files from C header files handy.h Handy definitions hints/3b1.sh Hints for named architecture hints/3b1cc Hints for named architecture -hints/README.hints Hints for named architecture +hints/PowerUNIX.sh Hints for named architecture +hints/README.hints Notes about hints. 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/convexos.sh Hints for named architecture +hints/cxux.sh Hints for named architecture hints/dec_osf.sh Hints for named architecture hints/dgux.sh Hints for named architecture hints/dnix.sh Hints for named architecture @@ -312,12 +314,12 @@ lib/tainted.pl Old code for tainting lib/termcap.pl Perl library supporting termcap usage lib/timelocal.pl Perl library supporting inverse of localtime, gmtime lib/validate.pl Perl library supporting wholesale file mode validation +makeaperl.SH perl script that produces a new perl binary makedepend.SH Precursor to makedepend makedir.SH Precursor to makedir malloc.c A version of malloc you might not want mg.c Magic code mg.h Magic header -makeaperl.SH perl script that produces a new perl binary minimod.PL Writes lib/ExtUtils/Miniperl.pm miniperlmain.c Basic perl w/o dynamic loading or extensions mv-if-diff Script to mv a file if it changed diff --git a/Makefile.SH b/Makefile.SH index e98c9d6..6bbd7fe 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -346,7 +346,7 @@ realclean: clean rm -f config.h makefile makefile.old rm -f $(private) rm -rf lib/auto - rm -f h2ph h2ph.man c2ph pstruct + rm -f h2ph h2ph.man c2ph pstruct h2xs makeaperl rm -rf .config @echo "Note that make realclean does not delete config.sh" diff --git a/README b/README index 7e0b951..6f96515 100644 --- a/README +++ b/README @@ -172,6 +172,31 @@ Installation you are not root, you must own the directories in question and you should ignore any messages about chown not working. + make install will also install the following: + perl, + perl5.nnn where nnn is the current release number. This + will be a link to perl. + suidperl, + sperl5.nnn If you requested setuid emulation. + a2p awk-to-perl translator + cppstdin This is used by perl -P, if your cc -E can't + read from stdin. + c2ph, pstruct Scripts for handling C structures in header files. + s2p sed-to-perl translator + find2perl find-to-perl translator + h2xs Converts C .h header files to Perl extensions. + + library files in $privlib and $archlib specified to + Configure, usually under /usr/local/lib/perl5/. + man pages in the location specified to Configure, usually + something like /usr/local/man/man1. + + Perl's *.h header files and the libperl.a library are also + installed under $archlib so that you may later build new + extensions even if the Perl source is no longer available. + + make install may also offer to install perl in a "standard" location. + Most of the documentation in the pod/ directory is also available in HTML format. Type cd pod; make html; cd .. diff --git a/U/Myinit.U b/U/Myinit.U index 15c757c..2f69835 100644 --- a/U/Myinit.U +++ b/U/Myinit.U @@ -34,7 +34,7 @@ libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" libswanted="$libswanted ucb bsd BSD PW x" : We probably want to search /usr/shlib before most other libraries. -: This is only used by ext/util/extliblist +: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` glibpth="/usr/shlib $glibpth" : Do not use vfork unless overridden by a hint file. diff --git a/U/dist3_051.pat b/U/dist3_051.pat new file mode 100644 index 0000000..fd2ea67 --- /dev/null +++ b/U/dist3_051.pat @@ -0,0 +1,139 @@ +This file contains patches to dist 3 (PL 51) that I used to generate +Configure for perl. + +These patches do the following: + +Oldconfig.U + Clean up and extend the $osvers detection for DEC OSF/1 on the Alpha. +archname.U + Protect against spaces in the output of uname -m. +sig_name.U + Look in too. +usrinc.U + Ensure that the ./mips file exists. libpth.U calls it. + + Andy Dougherty doughera@lafcol.lafayette.edu + Dept. of Physics + Lafayette College, Easton, PA 18042 USA + +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 +*************** +*** 264,275 **** + osvers="$3" + ;; + osf1) case "$5" in +! alpha) osname=dec_osf +! case "$3" in +! [vt]1\.*) osvers=1 ;; +! [vt]2\.*) osvers=2 ;; +! [vt]3\.*) osvers=3 ;; +! esac + ;; + hp*) osname=hp_osf1 ;; + mips) osname=mips_osf1 ;; +--- 264,274 ---- + osvers="$3" + ;; + osf1) case "$5" in +! alpha) +! ?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha +! ?X: where the version number can be either vn.n or tn.n. +! osname=dec_osf +! osvers=`echo "$3" | sed 's/^[vt]//'` + ;; + hp*) osname=hp_osf1 ;; + mips) osname=mips_osf1 ;; +Index: archname.U +Prereq: 3.0.1.1 +*** mcon/U/archname.U Thu Feb 16 09:52:31 1995 +--- /home2/doughera/lib/dist/U/archname.U Mon Feb 27 15:24:22 1995 +*************** +*** 12,18 **** + ?RCS: Revision 3.0.1.1 1995/02/15 14:14:21 ram + ?RCS: patch51: created + ?RCS: +! ?MAKE:archname myarchname: cat Loc Myread Oldconfig osname test rm + ?MAKE: -pick add $@ %< + ?S:archname: + ?S: This variable is a short name to characterize the current +--- 12,18 ---- + ?RCS: Revision 3.0.1.1 1995/02/15 14:14:21 ram + ?RCS: patch51: created + ?RCS: +! ?MAKE:archname myarchname: sed Loc Myread Oldconfig osname test rm + ?MAKE: -pick add $@ %< + ?S:archname: + ?S: This variable is a short name to characterize the current +*************** +*** 43,49 **** + tarch=`arch`"-$osname" + elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then + if uname -m > tmparch 2>&1 ; then +! tarch=`$cat tmparch`"-$osname" + else + tarch="$osname" + fi +--- 43,49 ---- + tarch=`arch`"-$osname" + elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then + if uname -m > tmparch 2>&1 ; then +! tarch=`$sed -e 's/ /_/g' -e 's/$/'"-$osname/" tmparch` + else + tarch="$osname" + fi +Index: sig_name.U +Prereq: 3.0.1.2 +*** mcon/U/sig_name.U Wed Jun 22 01:20:22 1994 +--- /home2/doughera/lib/dist/U/sig_name.U Mon Feb 27 14:54:05 1995 +*************** +*** 40,46 **** + case "$sig_name" in + '') + echo "Generating a list of signal names..." >&4 +! xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h` + set X `cat $xxx 2>&1 | $awk ' + $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ { + sig[$3] = substr($2,4,20) +--- 40,46 ---- + case "$sig_name" in + '') + echo "Generating a list of signal names..." >&4 +! xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`" "`./findhdr linux/signal.h` + set X `cat $xxx 2>&1 | $awk ' + $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ { + sig[$3] = substr($2,4,20) +Index: usrinc.U +Prereq: 3.0.1.1 +*** mcon/U/usrinc.U Sun May 8 22:14:36 1994 +--- /home2/doughera/lib/dist/U/usrinc.U Tue Feb 21 11:00:10 1995 +*************** +*** 60,71 **** + fi + $rm -f usr.c usr.out + echo "and you're compiling with the $mips_type compiler and libraries." + else + echo "Doesn't look like a MIPS system." + echo "exit 1" >mips +- chmod +x mips +- $eunicefix mips + fi + echo " " + case "$usrinc" in + '') ;; +--- 60,72 ---- + fi + $rm -f usr.c usr.out + echo "and you're compiling with the $mips_type compiler and libraries." ++ echo "exit 0" >mips + else + echo "Doesn't look like a MIPS system." + echo "exit 1" >mips + fi ++ chmod +x mips ++ $eunicefix mips + echo " " + case "$usrinc" in + '') ;; diff --git a/U/dist3_051.patches b/U/dist3_051.patches deleted file mode 100644 index 8df367c..0000000 --- a/U/dist3_051.patches +++ /dev/null @@ -1,75 +0,0 @@ - -This file contains 2 patches to dist 3 (PL 51) that I used to generate -Configure for perl. - -The first patch just cleans up and extends the $osvers detection for -DEC OSF/1 on the Alpha. - -The second patch ensures that the ./mips file exists. libpth.U calls -it. - - Andy Dougherty doughera@lafcol.lafayette.edu - - -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 -*************** -*** 264,275 **** - osvers="$3" - ;; - osf1) case "$5" in -! alpha) osname=dec_osf -! case "$3" in -! [vt]1\.*) osvers=1 ;; -! [vt]2\.*) osvers=2 ;; -! [vt]3\.*) osvers=3 ;; -! esac - ;; - hp*) osname=hp_osf1 ;; - mips) osname=mips_osf1 ;; ---- 264,274 ---- - osvers="$3" - ;; - osf1) case "$5" in -! alpha) -! ?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha -! ?X: where the version number can be either vn.n or tn.n. -! osname=dec_osf -! osvers=`echo "$3" | sed 's/^[vt]//'` - ;; - hp*) osname=hp_osf1 ;; - mips) osname=mips_osf1 ;; -Index: usrinc.U -Prereq: 3.0.1.1 -*** mcon/U/usrinc.U Sun May 8 22:14:36 1994 ---- /home2/doughera/lib/dist/U/usrinc.U Tue Feb 21 11:00:10 1995 -*************** -*** 60,71 **** - fi - $rm -f usr.c usr.out - echo "and you're compiling with the $mips_type compiler and libraries." - else - echo "Doesn't look like a MIPS system." - echo "exit 1" >mips -- chmod +x mips -- $eunicefix mips - fi - echo " " - case "$usrinc" in - '') ;; ---- 60,72 ---- - fi - $rm -f usr.c usr.out - echo "and you're compiling with the $mips_type compiler and libraries." -+ echo "exit 0" >mips - else - echo "Doesn't look like a MIPS system." - echo "exit 1" >mips - fi -+ chmod +x mips -+ $eunicefix mips - echo " " - case "$usrinc" in - '') ;; diff --git a/U/mallocsrc.U b/U/mallocsrc.U index 83560e8..6762f90 100644 --- a/U/mallocsrc.U +++ b/U/mallocsrc.U @@ -15,9 +15,10 @@ ?RCS: Revision 3.0 1993/08/18 12:09:12 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:mallocsrc mallocobj usemymalloc malloctype d_mymalloc: Myread \ +?MAKE:mallocsrc mallocobj usemymalloc malloctype d_mymalloc \ + freetype: Myread \ Oldconfig package Guess Setvar rm cat +cc +ccflags Findhdr \ - i_malloc sed libs + i_malloc i_stdlib sed libs ?MAKE: -pick add $@ %< ?S:usemymalloc: ?S: This variable contains y if the malloc that comes with this package @@ -43,13 +44,22 @@ ?S: Otherwise the value is null. This variable is intended for generating ?S: Makefiles. See mallocsrc. ?S:. +?S:freetype: +?S: This variable contains the return type of free(). It is usually +?S: void, but occasionally int. +?S:. ?S:malloctype: ?S: This variable contains the kind of ptr returned by malloc and realloc. ?S:. +?C:Free_t: +?C: This variable contains the return type of free(). It is usually +?C: void, but occasionally int. +?C:. ?C:Malloc_t (MALLOCPTRTYPE): ?C: This symbol is the type of pointer returned by malloc and realloc. ?C:. ?H:#define Malloc_t $malloctype /**/ +?H:#define Free_t $freetype /**/ ?H:. ?C:MYMALLOC: ?C: This symbol, if defined, indicates that we're using our own malloc. @@ -99,28 +109,51 @@ y*|true) esac @end -@if MALLOCPTRTYPE || Malloc_t -: compute the type returned by malloc +@if MALLOCPTRTYPE || Malloc_t || Free_t +: compute the return types of malloc and free echo " " -case "$malloctype" in -'') - $cat >malloc.c <malloc.c < #include #ifdef I_MALLOC #include #endif +#ifdef I_STDLIB +#include +#endif +#ifdef TRY_MALLOC void *malloc(); +#endif +#ifdef TRY_FREE +void free(); +#endif END - if $cc $ccflags -c malloc.c >/dev/null 2>&1; then +@if MALLOCPTRTYPE || Malloc_t +case "$malloctype" in +'') + if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then malloctype='void *' else malloctype='char *' fi - $rm -f malloc.[co] ;; esac echo "Your system wants malloc to return '$malloctype', it would seem." >&4 +@end +@if Free_t +case "$freetype" in +'') + if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then + freetype='void' + else + freetype='int' + fi + ;; +esac +echo "Your system uses $freetype free(), it would seem." >&4 +@end +$rm -f malloc.[co] @end diff --git a/config.H b/config.H index fd370bd..9f6cb26 100644 --- a/config.H +++ b/config.H @@ -14,7 +14,7 @@ * $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $ */ -/* Configuration time: Tue Feb 21 12:13:04 EST 1995 +/* Configuration time: Mon Feb 27 17:21:15 EST 1995 * Configured by: andy * Target system: crystal crystal 3.2 2 i386 */ @@ -1398,10 +1398,15 @@ */ #define I_SYS_STAT /**/ +/* Free_t: + * This variable contains the return type of free(). It is usually + * void, but occasionally int. + */ /* Malloc_t: * This symbol is the type of pointer returned by malloc and realloc. */ #define Malloc_t char * /**/ +#define Free_t void /**/ /* MYMALLOC: * This symbol, if defined, indicates that we're using our own malloc. diff --git a/config_h.SH b/config_h.SH index 33aad34..ac53373 100755 --- a/config_h.SH +++ b/config_h.SH @@ -1412,10 +1412,15 @@ sed <config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!' */ #$i_sysstat I_SYS_STAT /**/ +/* Free_t: + * This variable contains the return type of free(). It is usually + * void, but occasionally int. + */ /* Malloc_t: * This symbol is the type of pointer returned by malloc and realloc. */ #define Malloc_t $malloctype /**/ +#define Free_t $freetype /**/ /* MYMALLOC: * This symbol, if defined, indicates that we're using our own malloc. diff --git a/ext/DynaLoader/README b/ext/DynaLoader/README index 19dd8e7..c4602d3 100644 --- a/ext/DynaLoader/README +++ b/ext/DynaLoader/README @@ -46,7 +46,7 @@ After the initial implementation of a new DynaLoader dl_*.xs file you may need to edit or create ext/MODULE/MODULE.bs files to reflect the needs of your platform and linking software. -Refer to DynaLoader.doc, ext/utils/mkbootstrap and any existing +Refer to DynaLoader.doc, lib/ExtUtils/MakeMaker.pm and any existing ext/MODULE/MODULE.bs files for more information. Tim Bunce. diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index 4ccc5ce..f59b4c3 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -366,7 +366,7 @@ sub errno { sub creat { usage "creat(filename, mode)" if @_ != 2; - &open($_[0], &O_WRONLY | &O_CREAT | &O_TRUNC, $_[2]); + &open($_[0], &O_WRONLY | &O_CREAT | &O_TRUNC, $_[1]); } sub fcntl { diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 1a900f0..fbd21c8 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -2841,7 +2841,7 @@ dup2(fd1, fd2) int fd1 int fd2 -SysRet +SysRetLong lseek(fd, offset, whence) int fd Off_t offset diff --git a/ext/SDBM_File/sdbm/sdbm.h b/ext/SDBM_File/sdbm/sdbm.h index 6f54bd0..4d6c844 100644 --- a/ext/SDBM_File/sdbm/sdbm.h +++ b/ext/SDBM_File/sdbm/sdbm.h @@ -155,7 +155,7 @@ extern long sdbm_hash proto((char *, int)); #endif /* Use all the "standard" definitions? */ -#ifdef STANDARD_C +#if defined(STANDARD_C) && defined(I_STDLIB) # include #endif /* STANDARD_C */ diff --git a/ext/util/extliblist b/ext/util/extliblist index 2b8938f..2351ddf 100755 --- a/ext/util/extliblist +++ b/ext/util/extliblist @@ -15,6 +15,10 @@ esac : : Author: Andy Dougherty doughera@lafcol.lafayette.edu : +: This utility was only used by the old Makefile.SH extension +: mechanism. It is now obsolete and may be removed in a future +: release. +: : This utility takes a list of libraries in the form : -llib1 -llib2 -llib3 : and prints out lines suitable for inclusion in an extension diff --git a/hints/PowerUNIX.sh b/hints/PowerUNIX.sh new file mode 100644 index 0000000..f21e6ae --- /dev/null +++ b/hints/PowerUNIX.sh @@ -0,0 +1,75 @@ +# Hints for the Power UNIX operating system running on Harris NightHawk +# machines. Written by Tom.Horsley@mail.hcsc.com +# +# This config uses dynamic linking and the Harris C compiler. It has been +# tested on a Harris 5800 running Power UNIX as well as a (prototype) Harris +# 6800 running Power UNIX. + +# Internally at Harris, we use a source management tool which winds up +# giving us read-only copies of source trees that are mostly symbolic links. +# That upsets the perl build process when it tries to edit opcode.h and +# embed.h or touch perly.c or perly.h, so turn those files into "real" files +# when Configure runs. (If you already have "real" source files, this won't +# do anything). +# +if [ -x /usr/local/mkreal ] +then + for i in '.' '..' + do + for j in embed.h opcode.h perly.h perly.c + do + if [ -h $i/$j ] + then + ( cd $i ; /usr/local/mkreal $j ; chmod 666 $j ) + fi + done + done +fi + +# We DO NOT want -lmalloc or -lPW, we DO need -lgen to follow -lnsl, so +# fixup libswanted to reflect that desire. +# +libswanted=`echo ' '$libswanted' ' | sed -e 's/ malloc / /' -e 's/ PW / /' -e 's/ nsl / nsl gen /'` + +# We DO NOT want /usr/ucblib in glibpth +# +glibpth=`echo ' '$glibpth' ' | sed -e 's@ /usr/ucblib @ @'` + +# Yes, csh exists, but doesn't work worth beans, if perl tries to use it, +# the glob test fails, so just pretend it isn't there... +# +d_csh='undef' + +# Need to use Harris cc for most of these options to be meaningful (if you +# want to get this to work with gcc, you're on your own :-). Passing +# -Bexport to the linker when linking perl is important because it leaves +# the interpreter internal symbols visible to the shared libs that will be +# loaded on demand (and will try to reference those symbols). +# +cc='/bin/cc' +cccdlflags='-Zpic' +ccdlflags='-Zlink=dynamic -Wl,-Bexport' +lddlflags='-G' + +# Configure imagines that stdio.h is "standard", but it really isn't. +# Things like the -T and -B file test operators (on file handles) fail when +# it tries to treat it as "standard" +# +d_stdstdio='undef' + +# Configure sometime finds what it believes to be ndbm header files on the +# system and imagines that we have the NDBM library, but we really don't. +# There is something there that once resembled ndbm, but it is purely +# for internal use in some tool and has been hacked beyond recognition +# (or even function :-) +# +i_ndbm='undef' + +# Misc other flags that might be able to change, but I know these work right. +# +d_suidsafe='define' +d_isascii='define' +d_mymalloc='undef' +usemymalloc='n' +ssizetype='ssize_t' +usevfork='false' diff --git a/hints/cxux.sh b/hints/cxux.sh new file mode 100644 index 0000000..a4f397c --- /dev/null +++ b/hints/cxux.sh @@ -0,0 +1,118 @@ +# Hints for the CX/UX 7.1 operating system running on Harris NightHawk +# machines. written by Tom.Horsley@mail.hcsc.com +# +# This config is setup for dynamic linking and the Harris C compiler. + +# Check some things and print warnings if this isn't going to work... +# +case ${SDE_TARGET:-ELF} in + [Cc][Oo][Ff][Ff]|[Oo][Cc][Ss]) echo '' + echo '' + echo WARNING: Do not build perl 5 with the SDE_TARGET set to + echo generate coff object - perl 5 must be built in the ELF + echo environment. + echo '' + echo '';; + [Ee][Ll][Ff]) : ;; + *) echo '' + echo 'Unknown SDE_TARGET value: '$SDE_TARGET + echo '';; +esac + +case `uname -r` in + [789]*) : ;; + *) echo '' + echo '' + echo WARNING: Perl 5 requires shared library support, it cannot + echo be built on releases of CX/UX prior to 7.0 with this hints + echo file. You\'ll have to do a separate port for the statically + echo linked COFF environment. + echo '' + echo '';; +esac + +# Internally at Harris, we use a source management tool which winds up +# giving us read-only copies of source trees that are mostly symbolic links. +# That upsets the perl build process when it tries to edit opcode.h and +# embed.h or touch perly.c or perly.h, so turn those files into "real" files +# when Configure runs. (If you already have "real" source files, this won't +# do anything). +# +if [ -x /usr/local/mkreal ] +then + for i in '.' '..' + do + for j in embed.h opcode.h perly.h perly.c + do + if [ -h $i/$j ] + then + ( cd $i ; /usr/local/mkreal $j ; chmod 666 $j ) + fi + done + done +fi + +# We DO NOT want -lmalloc +# +libswanted=`echo ' '$libswanted' ' | sed -e 's/ malloc / /'` + +# Stick the low-level elf library path in first. +# +glibpth="/usr/sde/elf/usr/lib $glibpth" + +# Need to use Harris cc for most of these options to be meaningful (if you +# want to get this to work with gcc, you're on your own :-). Passing +# -Bexport to the linker when linking perl is important because it leaves +# the interpreter internal symbols visible to the shared libs that will be +# loaded on demand (and will try to reference those symbols). The -u +# option to drag 'sigaction' into the perl main program is to make sure +# it gets defined for the posix shared library (for some reason sigaction +# is static, rather than being defined in libc.so.1). +# +cc='/bin/cc -Xa' +cccdlflags='-Zelf -Zpic' +ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction' +lddlflags='-G' + +# Configure imagines that stdio.h is "standard", but it really isn't. +# Things like the -T and -B file test operators (on file handles) fail when +# it tries to treat it as "standard" +# +d_stdstdio='undef' + +# Configure imagines that it sees a pw_quota field, but it is really in a +# different structure than the one it thinks it is looking at. WARNING: +# Setting this here in the hints file doesn't help. You need to fix this by +# editing config.sh after Configure asks you to fix things with a shell +# escape! (Maybe Configure should actually try to compile a routine to +# test each field, but what a pain that would be...). +# +# Perhaps I should create a config.over file and add this to it now? +# +d_pwquota='undef' +echo '' +echo '' +echo WARNING: Edit config.sh when Configure offers to let you do so at the +echo end of the configuration process and manually change d_pwquota from +echo define to undef \(or you may want to create a config.over file now\). +echo '' +echo '' + +# The following silly shell variable is set just so it will be printed out +# immediately prior to asking the user to edit config.sh :-). +# +dont_forget_to_fix_d_pwquota_in_config_to_be_undef="really" + + +# Configure sometime finds what it believes to be ndbm header files on the +# system and imagines that we have the NDBM library, but we really don't. +# There is something there that once resembled ndbm, but it is purely +# for internal use in some tool and has been hacked beyond recognition +# (or even function :-) +# +i_ndbm='undef' + +# Don't use the perl malloc +# +d_mymalloc='undef' +usemymalloc='n' diff --git a/hints/linux.sh b/hints/linux.sh index bd2fd67..cde47b1 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -6,20 +6,11 @@ # Fri Feb 3 14:05:00 EST 1995 # Use sh Configure -Dcc=gcc-elf to try using gcc-elf. It might work. # -# I don't understand several things in here. Clarifications are welcome. - -# Why is this needed? -bin='/usr/bin' ccflags='-I/usr/include/bsd' cppflags=' -I/usr/include/bsd' d_dosuid='define' -# Why are these needed? -gidtype='gid_t' -groupstype='gid_t' -uidtype='uid_t' - malloctype='void *' usemymalloc='n' @@ -27,12 +18,6 @@ case "$optimize" in '') optimize='-O2' ;; esac -# Why is this needed? -nm_opt='' - -sig_name='ZERO HUP INT QUIT ILL TRAP IOT UNUSED FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH' -signal_t='void' - case "$cc" in *cc-elf*) so='so' diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index ec17f1b..dbb877e 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -2135,7 +2135,7 @@ sub mksymlists { return '' unless $Config{'osname'} eq 'aix'; init_main(@ARGV) unless defined $att{'BASEEXT'}; - if (! %{$att{DL_FUNCS}}) { + if (! $att{DL_FUNCS}) { my($bootfunc); ($bootfunc = $att{NAME}) =~ s/\W/_/g; $att{DL_FUNCS} = {$att{BASEEXT} => ["boot_$bootfunc"]}; diff --git a/malloc.c b/malloc.c index ef095c5..6e664fc 100644 --- a/malloc.c +++ b/malloc.c @@ -253,7 +253,7 @@ morecore(bucket) } } -void +Free_t free(mp) Malloc_t mp; { diff --git a/perl.h b/perl.h index be45089..94d2779 100644 --- a/perl.h +++ b/perl.h @@ -72,10 +72,6 @@ EXT char Error[1]; #define TAINT_PROPER(s) if (tainting) taint_proper(no_security, s) #define TAINT_ENV() if (tainting) taint_env() -#ifndef HAS_VFORK -# define vfork fork -#endif - #ifdef HAS_GETPGRP2 # ifndef HAS_GETPGRP # define HAS_GETPGRP diff --git a/pp_sys.c b/pp_sys.c index d25d156..1e8ede8 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -23,6 +23,13 @@ #endif */ +/* Put this after #includes because fork and vfork prototypes may + conflict. +*/ +#ifndef HAS_VFORK +# define vfork fork +#endif + #if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */ # include # include diff --git a/util.c b/util.c index d4920eb..2c2cba8 100644 --- a/util.c +++ b/util.c @@ -29,6 +29,13 @@ # include #endif +/* Put this after #includes because fork and vfork prototypes may + conflict. +*/ +#ifndef HAS_VFORK +# define vfork fork +#endif + #ifdef I_FCNTL # include #endif