diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-03-27 20:20:03 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-03-27 20:20:03 +0000 |
commit | 21d892ea46b4eaa5d8ae1c8cd325d9940deef5b3 (patch) | |
tree | 47c38e54be61660494150c86347a519fbdb3634d /Configure | |
parent | 63f2c1e106a2635d888c6b582f4c59b5c0ecc7ee (diff) | |
download | perl-21d892ea46b4eaa5d8ae1c8cd325d9940deef5b3.tar.gz |
perl 3.0 patch #16 (combined patch)
There is now support for compiling perl under the Microsoft C
compiler on MSDOS. Special thanks go to Diomidis Spinellis
<dds@cc.ic.ac.uk> for this. To compile under MSDOS, look at the
readme file in the msdos subdirectory.
As a part of this, six files will be renamed when you run
Configure. These are config.h.SH, perl.man.[1-4] and t/op.subst.
Suns (and perhaps other machines) can't cast negative floating
point numbers to unsigned ints reasonably. Configure now detects
this and takes appropriate action.
Configure looked for optional libraries but then didn't ever use
them, even if there was no config.sh value to override.
System V Release 4 provides us with yet another nm format for
Configure to parse. No doubt it's "better". Sigh.
MIPS CPUs running under Ultrix were getting configured for volatile
support, but they don't like volatile when applied to a type generated
by a typedef. Configure now tests for this.
I've added two new perl library routines: ctime.pl from
Waldemar Kebsch and Marion Hakanson, and syslog.pl from Tom
Christiansen and me.
In subroutines, non-terminal blocks should never have arrays
requested of them, even if the subroutine call's context is
looking for an array.
Formats didn't work inside eval. Now they do.
Any $foo++ that doesn't return a value is now optimized to ++$foo
since the latter doesn't require generation of a temporary to hold
the old value.
A self-referential printf pattern such as sprintf($s,...,$s,...)
would end up with a null as the first character of the next field.
On machines that don't support executing scripts in the kernel,
perl has to emulate that when an exec fails. In this case,
the do_exec() routine can lose arguments passed to the script.
A memory leakage in pattern matching triggered by use of $`, $& or $'
has been fixed.
A splice that pulls up the front of an array such as splice(@array,0,$n)
can cause a duplicate free error.
The grep operator blew up on undefined array values. It now handles
them reasonably, setting $_ to undef.
The .. operator in an array context is used to generate number
ranges. This has been generalized to allow any string ranges that
can be generated with the magical increment code of ++. So
you can say 'a' .. 'f', '000'..'999', etc.
The ioctl function didn't return non-zero values correctly.
Associative array slices from dbm files like @dbmvalues{'foo','bar'}
could use the same cache entry for multiple values, causing loss of
some of the values of the slice. Cache values are now not flushed
until the end of a statement.
The do FILE operator blew up when used inside an eval, due to trying
to free the eval code it was still executing.
If you did s/^prefix// on a string, and subsequently assigned a
value that didn't contain a string value to the string, you could
get a bad free error.
One of the taint checks blew up on undefined array elements, which
showed up only when taintperl was run.
The final semicolon in program is supposed to be optional now.
Unfortunately this wasn't true when -p or -n added extra code
around your code. Now it's true all the time.
A tail anchored pattern such as /foo$/ could cause grief if you
searched a string that was shorter than that.
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 158 |
1 files changed, 102 insertions, 56 deletions
@@ -8,7 +8,16 @@ # and edit it to reflect your system. Some packages may include samples # of config.h for certain machines, so you might look for one of those.) # -# $Header: Configure,v 3.0.1.6 90/03/12 16:10:23 lwall Locked $ +# $Header: Configure,v 3.0.1.7 90/03/28 09:14:53 lwall Locked $ + +: make sure these files are renamed +test -f config_h.SH || mv -f config.h.SH config_h.SH +test -f perl_man.1 || mv -f perl.man.1 perl_man.1 +test -f perl_man.2 || mv -f perl.man.2 perl_man.2 +test -f perl_man.3 || mv -f perl.man.3 perl_man.3 +test -f perl_man.4 || mv -f perl.man.4 perl_man.4 +test -f t/op.s || mv -f t/op.subst t/op.s + # # Yes, you may rip this off to use in other distribution packages. # (Note: this Configure script was generated automatically. Rather than @@ -102,6 +111,7 @@ cppminus='' d_bcmp='' d_bcopy='' d_bzero='' +d_castneg='' d_charsprf='' d_crypt='' cryptlib='' @@ -1110,6 +1120,7 @@ rmlist="$rmlist pdp11" echo " " echo "Checking for optional libraries..." +dflt='' case "$libswanted" in '') libswanted='c_s';; esac @@ -1153,6 +1164,7 @@ set X $dflt shift dflt="$*" case "$libs" in +'') dflt="$dflt";; *) dflt="$libs";; esac case "$dflt" in @@ -1437,6 +1449,8 @@ if $contains '^printf$' libc.list >/dev/null 2>&1; then else $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list $contains '^printf$' libc.list >/dev/null 2>&1 || \ + $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list + $contains '^printf$' libc.list >/dev/null 2>&1 || \ $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list $contains '^printf$' libc.list >/dev/null 2>&1 || \ $sed -n -e 's/^_//' \ @@ -1492,6 +1506,35 @@ eval $inlibc set bzero d_bzero eval $inlibc +: check for ability to cast negative floats to unsigned +echo " " +echo 'Checking to see if your C compiler can cast negative float to unsigned' +$cat >try.c <<'EOCP' +main() +{ + double f = -123; + unsigned long along; + unsigned int aint; + unsigned short ashort; + + along = (unsigned long)f; + aint = (unsigned int)f; + ashort = (unsigned short)f; + if (along == 0L || aint == 0 || ashort == 0) + exit(1); + else + exit(0); +} +EOCP +if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then + d_castneg="$define" + echo "Yup, it does." +else + d_castneg="$undef" + echo "Nope, it doesn't." +fi +$rm -f try.* + : see if sprintf is declared as int or pointer to char echo " " cat >.ucbsprf.c <<'EOF' @@ -1756,6 +1799,61 @@ else echo "dbm.h not found." fi +socketlib='' +: see whether socket exists +echo " " +if $contains socket libc.list >/dev/null 2>&1; then + echo "Looks like you have Berkeley networking support." + d_socket="$define" + : now check for advanced features + if $contains setsockopt libc.list >/dev/null 2>&1; then + d_oldsock="$undef" + else + echo "...but it uses the old 4.1c interface, rather than 4.2" + d_oldsock="$define" + fi +else + : hpux, for one, puts all the socket stuff in socklib.o + if $contains socklib libc.list >/dev/null 2>&1; then + echo "Looks like you have Berkeley networking support." + d_socket="$define" + : we will have to assume that it supports the 4.2 BSD interface + d_oldsock="$undef" + else + echo "Hmmm...you don't have Berkeley networking in libc.a..." + : look for an optional networking library + if test -f /usr/lib/libnet.a; then + (ar t /usr/lib/libnet.a || + nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list + if $contains socket libc.list >/dev/null 2>&1; then + echo "but the Wollongong group seems to have hacked it in." + socketlib="-lnet" + d_socket="$define" + : now check for advanced features + if $contains setsockopt libc.list >/dev/null 2>&1; then + d_oldsock="$undef" + else + echo "...using the old 4.1c interface, rather than 4.2" + d_oldsock="$define" + fi + else + echo "or even in libnet.a, which is peculiar." + d_socket="$undef" + d_oldsock="$undef" + fi + else + echo "or anywhere else I see." + d_socket="$undef" + d_oldsock="$undef" + fi + fi +fi +if $contains socketpair libc.list >/dev/null 2>&1; then + d_sockpair="$define" +else + d_sockpair="$undef" +fi + : see if this is a pwd system echo " " if $test -r /usr/include/pwd.h ; then @@ -1850,61 +1948,6 @@ eval $inlibc set setruid d_setruid eval $inlibc -socketlib='' -: see whether socket exists -echo " " -if $contains socket libc.list >/dev/null 2>&1; then - echo "Looks like you have Berkeley networking support." - d_socket="$define" - : now check for advanced features - if $contains setsockopt libc.list >/dev/null 2>&1; then - d_oldsock="$undef" - else - echo "...but it uses the old 4.1c interface, rather than 4.2" - d_oldsock="$define" - fi -else - : hpux, for one, puts all the socket stuff in socklib.o - if $contains socklib libc.list >/dev/null 2>&1; then - echo "Looks like you have Berkeley networking support." - d_socket="$define" - : we will have to assume that it supports the 4.2 BSD interface - d_oldsock="$undef" - else - echo "Hmmm...you don't have Berkeley networking in libc.a..." - : look for an optional networking library - if test -f /usr/lib/libnet.a; then - (ar t /usr/lib/libnet.a || - nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list - if $contains socket libc.list >/dev/null 2>&1; then - echo "but the Wollongong group seems to have hacked it in." - socketlib="-lnet" - d_socket="$define" - : now check for advanced features - if $contains setsockopt libc.list >/dev/null 2>&1; then - d_oldsock="$undef" - else - echo "...using the old 4.1c interface, rather than 4.2" - d_oldsock="$define" - fi - else - echo "or even in libnet.a, which is peculiar." - d_socket="$undef" - d_oldsock="$undef" - fi - else - echo "or anywhere else I see." - d_socket="$undef" - d_oldsock="$undef" - fi - fi -fi -if $contains socketpair libc.list >/dev/null 2>&1; then - d_sockpair="$define" -else - d_sockpair="$undef" -fi - : see if stat knows about block sizes echo " " if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then @@ -2067,8 +2110,10 @@ echo 'Checking to see if your C compiler knows about "volatile"...' $cat >try.c <<'EOCP' main() { + typedef unsigned short foo_t; char *volatile foo; volatile int bar; + volatile foo_t blech; foo = foo; } EOCP @@ -2560,6 +2605,7 @@ cppminus='$cppminus' d_bcmp='$d_bcmp' d_bcopy='$d_bcopy' d_bzero='$d_bzero' +d_castneg='$d_castneg' d_charsprf='$d_charsprf' d_crypt='$d_crypt' cryptlib='$cryptlib' |