diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-27 12:50:08 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-27 12:50:08 +0000 |
commit | 9a4da9311d34e77ffdec7b888a8a3f66535ff14e (patch) | |
tree | 306e54b76281cdc1bb0f902098124fd1a52c95ed | |
parent | 901b18f1f40355e1c6bf8f01f58203410eb7eabb (diff) | |
parent | 80d06f2dff03a52147744439d4888c6bef091986 (diff) | |
download | perl-9a4da9311d34e77ffdec7b888a8a3f66535ff14e.tar.gz |
integrate cfgperl changes into mainline
p4raw-id: //depot/perl@2318
-rwxr-xr-x | Configure | 278 | ||||
-rw-r--r-- | Porting/Glossary | 66 | ||||
-rw-r--r-- | Porting/config.sh | 22 | ||||
-rw-r--r-- | Porting/config_H | 85 | ||||
-rw-r--r-- | config_h.SH | 85 | ||||
-rw-r--r-- | ext/DB_File/Changes | 8 | ||||
-rw-r--r-- | ext/DB_File/DB_File.pm | 6 | ||||
-rw-r--r-- | ext/DB_File/DB_File.xs | 28 | ||||
-rw-r--r-- | ext/DB_File/hints/dynixptx.pl | 3 | ||||
-rw-r--r-- | ext/DynaLoader/dl_mpeix.xs | 11 | ||||
-rw-r--r-- | ext/POSIX/hints/dynixptx.pl | 4 | ||||
-rw-r--r-- | ext/Socket/Socket.pm | 20 | ||||
-rw-r--r-- | ext/Socket/Socket.xs | 112 | ||||
-rw-r--r-- | hints/dynixptx.sh | 49 | ||||
-rwxr-xr-x | installperl | 5 | ||||
-rw-r--r-- | iperlsys.h | 17 | ||||
-rw-r--r-- | lib/Benchmark.pm | 14 | ||||
-rw-r--r-- | lib/filetest.pm | 13 | ||||
-rw-r--r-- | malloc.c | 8 | ||||
-rwxr-xr-x | myconfig | 9 | ||||
-rw-r--r-- | perl.h | 47 | ||||
-rw-r--r-- | pod/perlfaq3.pod | 2 | ||||
-rw-r--r-- | pod/perlfaq4.pod | 6 | ||||
-rw-r--r-- | pod/perlfaq5.pod | 6 | ||||
-rw-r--r-- | pod/perlfaq7.pod | 2 | ||||
-rw-r--r-- | pod/perlfaq8.pod | 4 | ||||
-rw-r--r-- | pod/perlfunc.pod | 2 | ||||
-rw-r--r-- | pod/perlhist.pod | 10 | ||||
-rw-r--r-- | pod/pod2man.PL | 1 | ||||
-rw-r--r-- | pp.c | 14 | ||||
-rwxr-xr-x | t/op/filetest.t | 21 | ||||
-rwxr-xr-x | t/op/grent.t | 6 | ||||
-rwxr-xr-x | t/op/pwent.t | 5 |
33 files changed, 802 insertions, 167 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Thu Nov 5 14:26:57 EET 1998 [metaconfig 3.0 PL70] +# Generated on Sun Nov 22 19:12:18 EET 1998 [metaconfig 3.0 PL70] # (with additional metaconfig patches by jhi@iki.fi) cat >/tmp/c1$$ <<EOF @@ -419,6 +419,7 @@ d_rewinddir='' d_seekdir='' d_telldir='' d_readlink='' +d_readv='' d_rename='' d_rmdir='' d_safebcpy='' @@ -464,7 +465,17 @@ d_shmdt='' d_shmget='' d_sigaction='' d_sigsetjmp='' +d_cmsghdr_s='' +d_msg_ctrunc='' +d_msg_dontroute='' +d_msg_oob='' +d_msg_peek='' +d_msg_proxy='' +d_msghdr_s='' d_oldsock='' +d_recvmsg='' +d_scm_rights='' +d_sendmsg='' d_socket='' d_sockpair='' sockethdr='' @@ -518,6 +529,7 @@ d_wait4='' d_waitpid='' d_wcstombs='' d_wctomb='' +d_writev='' d_dbmclose64='' d_dbminit64='' d_delete64='' @@ -598,6 +610,8 @@ i_sysselct='' i_sysstat='' i_systimes='' i_systypes='' +d_iovec_s='' +i_sysuio='' i_sysun='' i_syswait='' i_sgtty='' @@ -617,8 +631,8 @@ i_vfork='' intsize='' longsize='' shortsize='' -d_dirent64s='' -d_flock64s='' +d_dirent64_s='' +d_flock64_s='' d_fstat64='' d_ftruncate64='' d_ino64t='' @@ -6734,6 +6748,146 @@ eval $inlibc set chsize d_chsize eval $inlibc +hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift; +while $test $# -ge 2; do + case "$1" in + $define) echo "#include <$2>";; + esac ; + shift 2; +done > try.c; +echo "int main () { struct $struct foo; foo.$field = 0; }" >> try.c; +if eval $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then + val="$define"; +else + val="$undef"; +fi; +set $varname; +eval $setvar; +$rm -f try.c try.o' + +: see if this is a sys/uio.h system +set sys/uio.h i_sysuio +eval $inhdr + +echo "Checking to see if your system supports struct iovec..." >&4 +set d_iovec_s iovec iov_base $i_sysuio sys/uio.h +eval $hasfield +case "$d_iovec_s" in +"$define") echo "Yup, it does." >&4 + ;; +*) echo "Nope, it doesn't." >&4 + ;; +esac + +socketlib='' +sockethdr='' +: see whether socket exists +echo " " +$echo $n "Hmm... $c" >&4 +if set socket val -f d_socket; eval $csym; $val; then + echo "Looks like you have Berkeley networking support." >&4 + d_socket="$define" + if set setsockopt val -f; eval $csym; $val; then + d_oldsock="$undef" + else + echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4 + d_oldsock="$define" + fi +else + if $contains socklib libc.list >/dev/null 2>&1; then + echo "Looks like you have Berkeley networking support." >&4 + d_socket="$define" + : we will have to assume that it supports the 4.2 BSD interface + d_oldsock="$undef" + else + echo "You don't have Berkeley networking in libc$_a..." >&4 + if test "X$d_socket" = "X$define"; then + echo "...but you seem to believe that you have sockets." >&4 + else + for net in net socket + do + if test -f /usr/lib/lib$net$_a; then + ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \ + $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list + if $contains socket libc.list >/dev/null 2>&1; then + d_socket="$define" + socketlib="-l$net" + case "$net" in + net) + echo "...but the Wollongong group seems to have hacked it in." >&4 + sockethdr="-I/usr/netinclude" + ;; + esac + echo "Found Berkeley sockets interface in lib$net." >& 4 + if $contains setsockopt libc.list >/dev/null 2>&1; then + d_oldsock="$undef" + else + echo "...using the old BSD 4.1c interface, rather than 4.2." >&4 + d_oldsock="$define" + fi + break + fi + fi + done + if test "X$d_socket" != "X$define"; then + echo "or anywhere else I see." >&4 + d_socket="$undef" + d_oldsock="$undef" + fi + fi + fi +fi + +: see if socketpair exists +set socketpair d_sockpair +eval $inlibc + + +echo "Checking the availability of certain socket constants..." >& 4 +for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do + enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'` + $cat >try.c <<EOF +#include <sys/types.h> +#include <sys/socket.h> +int main() { + int i = $ENUM; +} +EOF + val="$undef" + set try; if eval $compile; then + val="$define" + fi + set d_${enum}; eval $setvar + $rm -f try.c try +done + +set sendmsg d_sendmsg +eval $inlibc + +set recvmsg d_recvmsg +eval $inlibc + +echo " " +$echo $n "Checking to see if your system supports struct msghdr...$c" >&4 +set d_msghdr_s msghdr msg_name define sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h +eval $hasfield +case "$d_msghdr_s" in +"$define") echo "Yup, it does." >&4 + ;; +*) echo "Nope, it doesn't." >&4 + ;; +esac + +$echo $n "Checking to see if your system supports struct cmsghdr...$c" >&4 +set d_cmsghdr_s cmsghdr cmsg_len define sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h +eval $hasfield +case "$d_cmsghdr_s" in +"$define") echo "Yup, it does." >&4 + ;; +*) echo "Nope, it doesn't." >&4 + ;; +esac + : check for const keyword echo " " echo 'Checking to see if your C compiler knows about "const"...' >&4 @@ -6953,23 +7107,6 @@ set d_dirnamlen eval $setvar $rm -f try.c -hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift; -while $test $# -ge 2; do - case "$1" in - $define) echo "#include <$2>";; - esac ; - shift 2; -done > try.c; -echo "int main () { struct $struct foo; foo.$field = 0; }" >> try.c; -if eval $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then - val="$define"; -else - val="$undef"; -fi; -set $varname; -eval $setvar; -$rm -f try.c try.o' - if $test X"$use64bits" = X"$define"; then : see if fstat64 exists @@ -7067,14 +7204,14 @@ EOCP echo " " echo "Checking to see if your system supports struct flock64..." >&4 if $h_fcntl; then - set d_flock64s flock64 l_len define fcntl.h + set d_flock64_s flock64 l_len define fcntl.h eval $hasfield else val="$undef" - set d_flock64s + set d_flock64_s eval $setvar fi - case "$d_flock64s" in + case "$d_flock64_s" in "$define") echo "Yup, it does." >&4 ;; *) echo "Nope, it doesn't." >&4 @@ -7084,9 +7221,9 @@ EOCP : check for struct dirent64 echo " " echo "Checking to see if your system supports struct dirent64..." >&4 - set d_dirent64s dirent64 d_off $i_dirent dirent.h + set d_dirent64_s dirent64 d_off $i_dirent dirent.h eval $hasfield - case "$d_flock64s" in + case "$d_dirent64_s" in "$define") echo "Yup, it does." >&4 ;; *) echo "Nope, it doesn't." >&4 @@ -7095,7 +7232,7 @@ EOCP else val="$undef" - for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64t d_ino64t d_flock64s d_dirent64s + for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64t d_ino64t d_flock64_s d_dirent64_s do set $xxx eval $setvar @@ -7513,64 +7650,6 @@ eval $inlibc set fcntl d_fcntl eval $inlibc -socketlib='' -sockethdr='' -: see whether socket exists -echo " " -$echo $n "Hmm... $c" >&4 -if set socket val -f d_socket; eval $csym; $val; then - echo "Looks like you have Berkeley networking support." >&4 - d_socket="$define" - if set setsockopt val -f; eval $csym; $val; then - d_oldsock="$undef" - else - echo "...but it uses the old 4.1c interface, rather than 4.2" >&4 - d_oldsock="$define" - fi -else - if $contains socklib libc.list >/dev/null 2>&1; then - echo "Looks like you have Berkeley networking support." >&4 - d_socket="$define" - : we will have to assume that it supports the 4.2 BSD interface - d_oldsock="$undef" - else - echo "You don't have Berkeley networking in libc$_a..." >&4 - for net in net socket - do - if test -f /usr/lib/lib$net$_a; then - ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \ - $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list - if $contains socket libc.list >/dev/null 2>&1; then - d_socket="$define" - case "$net" in - net) - echo "...but the Wollongong group seems to have hacked it in." >&4 - socketlib="-lnet" - sockethdr="-I/usr/netinclude" - ;; - esac - 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" >&4 - d_oldsock="$define" - fi - break - fi - fi - done - if test "X$d_socket" != "X$define"; then - echo "or anywhere else I see." >&4 - d_socket="$undef" - d_oldsock="$undef" - fi - fi -fi - -: see if socketpair exists -set socketpair d_sockpair -eval $inlibc - : see if sys/select.h has to be included set sys/select.h i_sysselct eval $inhdr @@ -8730,6 +8809,10 @@ eval $inlibc set readlink d_readlink eval $inlibc +: see if readv exists +set readv d_readv +eval $inlibc + : see if rename exists set rename d_rename eval $inlibc @@ -9984,6 +10067,10 @@ eval $inlibc set wctomb d_wctomb eval $inlibc +: see if writev exists +set writev d_writev +eval $inlibc + : preserve RCS keywords in files with variable substitution, grrr Date='$Date' Id='$Id' @@ -10379,6 +10466,7 @@ $rm -f try.* .out : How can we generate normalized random numbers ? echo " " +echo "Looking for a random number function..." >&4 case "$randfunc" in '') if set drand48 val -f; eval $csym; $val; then @@ -10421,7 +10509,7 @@ while $test "$cont"; do cont='' else dflt=n - rp="Function $ans does not exists. Use that name anyway?" + rp="Function $ans does not exist. Use that name anyway?" . ./myread dflt=rand case "$ans" in @@ -10526,7 +10614,7 @@ if eval $compile_ok; then echo "Nope, no EBCDIC. Assuming ASCII or some ISO Latin." >&4 fi else - echo "$me: I'm unable to compile the test program." >&4 + echo "I'm unable to compile the test program." >&4 echo "I'll assume ASCII or some ISO Latin." >&4 fi $rm -f tebcdic.c tebcdic @@ -12291,6 +12379,7 @@ d_chown='$d_chown' d_chroot='$d_chroot' d_chsize='$d_chsize' d_closedir='$d_closedir' +d_cmsghdr_s='$d_cmsghdr_s' d_const='$d_const' d_crypt='$d_crypt' d_csh='$d_csh' @@ -12300,7 +12389,7 @@ d_dbmclose64='$d_dbmclose64' d_dbminit64='$d_dbminit64' d_delete64='$d_delete64' d_difftime='$d_difftime' -d_dirent64s='$d_dirent64s' +d_dirent64_s='$d_dirent64_s' d_dirnamlen='$d_dirnamlen' d_dlerror='$d_dlerror' d_dlopen='$d_dlopen' @@ -12328,7 +12417,7 @@ d_fgetpos64='$d_fgetpos64' d_fgetpos='$d_fgetpos' d_firstkey64='$d_firstkey64' d_flexfnam='$d_flexfnam' -d_flock64s='$d_flock64s' +d_flock64_s='$d_flock64_s' d_flock='$d_flock' d_fopen64='$d_fopen64' d_fork='$d_fork' @@ -12379,6 +12468,7 @@ d_index='$d_index' d_inetaton='$d_inetaton' d_ino64t='$d_ino64t' d_int64t='$d_int64t' +d_iovec_s='$d_iovec_s' d_isascii='$d_isascii' d_killpg='$d_killpg' d_lchown='$d_lchown' @@ -12402,8 +12492,14 @@ d_mkdir='$d_mkdir' d_mkfifo='$d_mkfifo' d_mktime='$d_mktime' d_msg='$d_msg' +d_msg_ctrunc='$d_msg_ctrunc' +d_msg_dontroute='$d_msg_dontroute' +d_msg_oob='$d_msg_oob' +d_msg_peek='$d_msg_peek' +d_msg_proxy='$d_msg_proxy' d_msgctl='$d_msgctl' d_msgget='$d_msgget' +d_msghdr_s='$d_msghdr_s' d_msgrcv='$d_msgrcv' d_msgsnd='$d_msgsnd' d_mymalloc='$d_mymalloc' @@ -12434,6 +12530,8 @@ d_pwquota='$d_pwquota' d_readdir64='$d_readdir64' d_readdir='$d_readdir' d_readlink='$d_readlink' +d_readv='$d_readv' +d_recvmsg='$d_recvmsg' d_rename='$d_rename' d_rewinddir='$d_rewinddir' d_rmdir='$d_rmdir' @@ -12441,6 +12539,7 @@ d_safebcpy='$d_safebcpy' d_safemcpy='$d_safemcpy' d_sanemcmp='$d_sanemcmp' d_sched_yield='$d_sched_yield' +d_scm_rights='$d_scm_rights' d_seekdir64='$d_seekdir64' d_seekdir='$d_seekdir' d_select='$d_select' @@ -12450,6 +12549,7 @@ d_semctl_semid_ds='$d_semctl_semid_ds' d_semctl_semun='$d_semctl_semun' d_semget='$d_semget' d_semop='$d_semop' +d_sendmsg='$d_sendmsg' d_setegid='$d_setegid' d_seteuid='$d_seteuid' d_setgrent='$d_setgrent' @@ -12530,6 +12630,7 @@ d_wait4='$d_wait4' d_waitpid='$d_waitpid' d_wcstombs='$d_wcstombs' d_wctomb='$d_wctomb' +d_writev='$d_writev' d_xenix='$d_xenix' date='$date' db_hashtype='$db_hashtype' @@ -12616,6 +12717,7 @@ i_systime='$i_systime' i_systimek='$i_systimek' i_systimes='$i_systimes' i_systypes='$i_systypes' +i_sysuio='$i_sysuio' i_sysun='$i_sysun' i_syswait='$i_syswait' i_termio='$i_termio' diff --git a/Porting/Glossary b/Porting/Glossary index d19328c064..8159c04aea 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -329,6 +329,10 @@ d_closedir (d_closedir.U): This variable conditionally defines HAS_CLOSEDIR if closedir() is available. +d_cmsghdr_s (d_socket.U): + This variable conditionally defines the HAS_STRUCT_CMSGHDR symbol, + which indicates that the the struct cmsghdr is supported. + d_const (d_const.U): This variable conditionally defines the HASCONST symbol, which indicates to the C program that this C compiler knows about the @@ -369,7 +373,7 @@ d_difftime (d_difftime.U): This variable conditionally defines the HAS_DIFFTIME symbol, which indicates to the C program that the difftime() routine is available. -d_dirent64s (io64.U): +d_dirent64_s (io64.U): This symbol will be defined if the C compiler supports struct dirent64. d_dirnamlen (i_dirent.U): @@ -493,7 +497,7 @@ d_flexfnam (d_flexfnam.U): This variable conditionally defines the FLEXFILENAMES symbol, which indicates that the system supports filenames longer than 14 characters. -d_flock64s (io64.U): +d_flock64_s (io64.U): This symbol will be defined if the C compiler supports struct flock64. d_flock (d_flock.U): @@ -735,6 +739,10 @@ d_ino64t (io64.U): d_int64t (i_inttypes.U): This symbol will be defined if the C compiler supports int64_t. +d_iovec_s (i_sysuio.U): + This variable conditionally defines the HAS_STRUCT_IOVEC symbol, + which indicates that the struct iovec is supported. + d_isascii (d_isascii.U): This variable conditionally defines the HAS_ISASCII constant, which indicates to the C program that isascii() is available. @@ -837,6 +845,31 @@ d_msg (d_msg.U): This variable conditionally defines the HAS_MSG symbol, which indicates that the entire msg*(2) library is present. +d_msg_ctrunc (d_socket.U): + This variable conditionally defines the HAS_MSG_CTRUNC symbol, + which indicates that the MSG_CTRUNC is available. #ifdef is + not enough because it may be an enum, glibc has been known to do this. + +d_msg_dontroute (d_socket.U): + This variable conditionally defines the HAS_MSG_DONTROUTE symbol, + which indicates that the MSG_DONTROUTE is available. #ifdef is + not enough because it may be an enum, glibc has been known to do this. + +d_msg_oob (d_socket.U): + This variable conditionally defines the HAS_MSG_OOB symbol, + which indicates that the MSG_OOB is available. #ifdef is + not enough because it may be an enum, glibc has been known to do this. + +d_msg_peek (d_socket.U): + This variable conditionally defines the HAS_MSG_PEEK symbol, + which indicates that the MSG_PEEK is available. #ifdef is + not enough because it may be an enum, glibc has been known to do this. + +d_msg_proxy (d_socket.U): + This variable conditionally defines the HAS_MSG_PROXY symbol, + which indicates that the MSG_PROXY is available. #ifdef is + not enough because it may be an enum, glibc has been known to do this. + d_msgctl (d_msgctl.U): This variable conditionally defines the HAS_MSGCTL symbol, which indicates to the C program that the msgctl() routine is available. @@ -845,6 +878,10 @@ d_msgget (d_msgget.U): This variable conditionally defines the HAS_MSGGET symbol, which indicates to the C program that the msgget() routine is available. +d_msghdr_s (d_socket.U): + This variable conditionally defines the HAS_STRUCT_MSGHDR symbol, + which indicates that the struct msghdr is supported. + d_msgrcv (d_msgrcv.U): This variable conditionally defines the HAS_MSGRCV symbol, which indicates to the C program that the msgrcv() routine is available. @@ -977,6 +1014,14 @@ d_readlink (d_readlink.U): indicates to the C program that the readlink() routine is available to read the value of a symbolic link. +d_readv (d_readv.U): + This variable conditionally defines the HAS_READV symbol, which + indicates to the C program that the readv() routine is available. + +d_recvmsg (d_socket.U): + This variable conditionally defines the HAS_RECVMSG symbol, + which indicates that the recvmsg is supported. + d_rename (d_rename.U): This variable conditionally defines the HAS_RENAME symbol, which indicates to the C program that the rename() routine is available @@ -1008,6 +1053,11 @@ d_sched_yield (d_pthread_y.U): symbol if the sched_yield routine is available to yield the execution of the current thread. +d_scm_rights (d_socket.U): + This variable conditionally defines the HAS_SCM_RIGHTS symbol, + which indicates that the SCM_RIGHTS is available. #ifdef is + not enough because it may be an enum, glibc has been known to do this. + d_seekdir64 (io64.U): This variable conditionally defines the HAS_SEEKDIR64 symbol, which indicates to the C program that the seekdir64() routine is available. @@ -1045,6 +1095,10 @@ d_semop (d_semop.U): This variable conditionally defines the HAS_SEMOP symbol, which indicates to the C program that the semop() routine is available. +d_sendmsg (d_socket.U): + This variable conditionally defines the HAS_SENDMSG symbol, + which indicates that the sendmsg is supported. + d_setegid (d_setegid.U): This variable conditionally defines the HAS_SETEGID symbol, which indicates to the C program that the setegid() routine is available @@ -1406,6 +1460,10 @@ d_wctomb (d_wctomb.U): indicates to the C program that the wctomb() routine is available to convert a wide character to a multibyte. +d_writev (d_writev.U): + This variable conditionally defines the HAS_WRITEV symbol, which + indicates to the C program that the writev() routine is available. + d_xenix (Guess.U): This variable conditionally defines the symbol XENIX, which alerts the C program that it runs under Xenix. @@ -1796,6 +1854,10 @@ i_systypes (i_systypes.U): This variable conditionally defines the I_SYS_TYPES symbol, and indicates whether a C program should include <sys/types.h>. +i_sysuio (i_sysuio.U): + This variable conditionally defines the I_SYSUIO symbol, and indicates + whether a C program should include <sys/uio.h>. + i_sysun (i_sysun.U): This variable conditionally defines I_SYS_UN, which indicates to the C program that it should include <sys/un.h> to get UNIX diff --git a/Porting/config.sh b/Porting/config.sh index 25c25cfcd6..dda3c3a704 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Thu Nov 5 12:26:24 EET 1998 +# Configuration time: Sun Nov 22 19:19:34 EET 1998 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -54,7 +54,7 @@ ccdlflags=' ' ccflags='-pthread -std -D__LANGUAGE_C__' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Thu Nov 5 12:26:24 EET 1998' +cf_time='Sun Nov 22 19:19:34 EET 1998' chgrp='' chmod='' chown='' @@ -92,6 +92,7 @@ d_chown='define' d_chroot='define' d_chsize='undef' d_closedir='define' +d_cmsghdr_s='define' d_const='define' d_crypt='define' d_csh='define' @@ -101,7 +102,7 @@ d_dbmclose64='undef' d_dbminit64='undef' d_delete64='undef' d_difftime='define' -d_dirent64s='undef' +d_dirent64_s='undef' d_dirnamlen='define' d_dlerror='define' d_dlopen='define' @@ -129,7 +130,7 @@ d_fgetpos64='undef' d_fgetpos='define' d_firstkey64='undef' d_flexfnam='define' -d_flock64s='undef' +d_flock64_s='undef' d_flock='define' d_fopen64='undef' d_fork='define' @@ -180,6 +181,7 @@ d_index='undef' d_inetaton='define' d_ino64t='undef' d_int64t='undef' +d_iovec_s='define' d_isascii='define' d_killpg='define' d_lchown='define' @@ -203,8 +205,14 @@ d_mkdir='define' d_mkfifo='define' d_mktime='define' d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='undef' d_msgctl='define' d_msgget='define' +d_msghdr_s='define' d_msgrcv='define' d_msgsnd='define' d_mymalloc='undef' @@ -235,6 +243,8 @@ d_pwquota='define' d_readdir64='undef' d_readdir='define' d_readlink='define' +d_readv='define' +d_recvmsg='define' d_rename='define' d_rewinddir='define' d_rmdir='define' @@ -242,6 +252,7 @@ d_safebcpy='define' d_safemcpy='undef' d_sanemcmp='define' d_sched_yield='define' +d_scm_rights='define' d_seekdir64='undef' d_seekdir='define' d_select='define' @@ -251,6 +262,7 @@ d_semctl_semid_ds='define' d_semctl_semun='define' d_semget='define' d_semop='define' +d_sendmsg='define' d_setegid='define' d_seteuid='define' d_setgrent='define' @@ -331,6 +343,7 @@ d_wait4='define' d_waitpid='define' d_wcstombs='define' d_wctomb='define' +d_writev='define' d_xenix='undef' date='date' db_hashtype='u_int32_t' @@ -417,6 +430,7 @@ i_systime='define' i_systimek='undef' i_systimes='define' i_systypes='define' +i_sysuio='define' i_sysun='define' i_syswait='define' i_termio='undef' diff --git a/Porting/config_H b/Porting/config_H index 97b5300cac..9fa28d831f 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Thu Nov 5 13:03:49 EET 1998 + * Configuration time: Sun Nov 22 19:19:34 EET 1998 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -1717,8 +1717,68 @@ * This symbol, if defined, indicates that the BSD socketpair() call is * supported. */ -#define HAS_SOCKET /**/ -#define HAS_SOCKETPAIR /**/ +/* HAS_MSG_CTRUNC: + * This symbol, if defined, indicates that the MSG_CTRUNC is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_DONTROUTE: + * This symbol, if defined, indicates that the MSG_DONTROUTE is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_OOB: + * This symbol, if defined, indicates that the MSG_OOB is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PEEK: + * This symbol, if defined, indicates that the MSG_PEEK is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PROXY: + * This symbol, if defined, indicates that the MSG_PROXY is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SCM_RIGHTS: + * This symbol, if defined, indicates that the SCM_RIGHTS is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SENDMSG: + * This symbol, if defined, indicates that the sendmsg is supported + * to send messages between sockets. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +/* HAS_RECVMSG: + * This symbol, if defined, indicates that the recvmsg is supported + * to send messages between sockets. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +/* HAS_STRUCT_MSGHDR: + * This symbol, if defined, indicates that the struct msghdr + * (BSD 4.3 or 4.4) is supported. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +/* HAS_STRUCT_CMSGHDR: + * This symbol, if defined, indicates that the struct cmsghdr + * (BSD 4.4) is supported. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +#define HAS_SOCKET /**/ +#define HAS_SOCKETPAIR /**/ +#define HAS_MSG_CTRUNC /**/ +#define HAS_MSG_DONTROUTE /**/ +#define HAS_MSG_OOB /**/ +#define HAS_MSG_PEEK /**/ +/*#define HAS_MSG_PROXY / **/ +#define HAS_SCM_RIGHTS /**/ +#define HAS_SENDMSG /**/ +#define HAS_RECVMSG /**/ +#define HAS_STRUCT_MSGHDR /**/ +#define HAS_STRUCT_CMSGHDR /**/ /* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring @@ -1851,6 +1911,12 @@ #define PWGECOS /**/ #define PWPASSWD /**/ +/* I_SYSUIO: + * This symbol, if defined, indicates that <sys/uio.h> exists and + * should be included. + */ +#define I_SYSUIO /**/ + /* Free_t: * This variable contains the return type of free(). It is usually * void, but occasionally int. @@ -1958,12 +2024,25 @@ */ /*#define HAS_FTELLO / **/ +/* HAS_READV: + * This symbol, if defined, indicates that the readv routine is + * available to do gather reads. You will also need <sys/uio.h> + * and there I_SYSUIO. + */ +#define HAS_READV /**/ + /* USE_SFIO: * This symbol, if defined, indicates that sfio should * be used. */ /*#define USE_SFIO / **/ +/* HAS_WRITEV: + * This symbol, if defined, indicates that the writev routine is + * available to do scatter writes. + */ +#define HAS_WRITEV /**/ + /* HAS_DBMINIT64: * This symbol, if defined, indicates that the dbminit64 routine is * available to open dbm files larger than 2 gigabytes. diff --git a/config_h.SH b/config_h.SH index f84775a996..b70bf26628 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1731,8 +1731,68 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * This symbol, if defined, indicates that the BSD socketpair() call is * supported. */ -#$d_socket HAS_SOCKET /**/ -#$d_sockpair HAS_SOCKETPAIR /**/ +/* HAS_MSG_CTRUNC: + * This symbol, if defined, indicates that the MSG_CTRUNC is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_DONTROUTE: + * This symbol, if defined, indicates that the MSG_DONTROUTE is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_OOB: + * This symbol, if defined, indicates that the MSG_OOB is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PEEK: + * This symbol, if defined, indicates that the MSG_PEEK is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PROXY: + * This symbol, if defined, indicates that the MSG_PROXY is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SCM_RIGHTS: + * This symbol, if defined, indicates that the SCM_RIGHTS is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SENDMSG: + * This symbol, if defined, indicates that the sendmsg is supported + * to send messages between sockets. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +/* HAS_RECVMSG: + * This symbol, if defined, indicates that the recvmsg is supported + * to send messages between sockets. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +/* HAS_STRUCT_MSGHDR: + * This symbol, if defined, indicates that the struct msghdr + * (BSD 4.3 or 4.4) is supported. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +/* HAS_STRUCT_CMSGHDR: + * This symbol, if defined, indicates that the struct cmsghdr + * (BSD 4.4) is supported. You will also need struct + * iovec from <sys/uio.h>, HAS_STRUCT_IOVEC and I_SYSUIO. + */ +#$d_socket HAS_SOCKET /**/ +#$d_sockpair HAS_SOCKETPAIR /**/ +#$d_msg_ctrunc HAS_MSG_CTRUNC /**/ +#$d_msg_dontroute HAS_MSG_DONTROUTE /**/ +#$d_msg_oob HAS_MSG_OOB /**/ +#$d_msg_peek HAS_MSG_PEEK /**/ +#$d_msg_proxy HAS_MSG_PROXY /**/ +#$d_scm_rights HAS_SCM_RIGHTS /**/ +#$d_sendmsg HAS_SENDMSG /**/ +#$d_recvmsg HAS_RECVMSG /**/ +#$d_msghdr_s HAS_STRUCT_MSGHDR /**/ +#$d_cmsghdr_s HAS_STRUCT_CMSGHDR /**/ /* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring @@ -1865,6 +1925,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$d_pwgecos PWGECOS /**/ #$d_pwpasswd PWPASSWD /**/ +/* I_SYSUIO: + * This symbol, if defined, indicates that <sys/uio.h> exists and + * should be included. + */ +#$i_sysuio I_SYSUIO /**/ + /* Free_t: * This variable contains the return type of free(). It is usually * void, but occasionally int. @@ -1972,12 +2038,25 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_ftello HAS_FTELLO /**/ +/* HAS_READV: + * This symbol, if defined, indicates that the readv routine is + * available to do gather reads. You will also need <sys/uio.h> + * and there I_SYSUIO. + */ +#$d_readv HAS_READV /**/ + /* USE_SFIO: * This symbol, if defined, indicates that sfio should * be used. */ #$d_sfio USE_SFIO /**/ +/* HAS_WRITEV: + * This symbol, if defined, indicates that the writev routine is + * available to do scatter writes. + */ +#$d_writev HAS_WRITEV /**/ + /* HAS_DBMINIT64: * This symbol, if defined, indicates that the dbminit64 routine is * available to open dbm files larger than 2 gigabytes. @@ -2107,7 +2186,7 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$d_telldir64 HAS_TELLDIR64 /**/ #$d_truncate64 HAS_TRUNCATE64 /**/ #$d_off64t HAS_OFF64_T /**/ -#$d_dirent64s HAS_STRUCT_DIRENT64 /**/ +#$d_dirent64_s HAS_STRUCT_DIRENT64 /**/ /* PRIVLIB: * This symbol contains the name of the private library for this package. diff --git a/ext/DB_File/Changes b/ext/DB_File/Changes index 993fe3228c..e13178c4e8 100644 --- a/ext/DB_File/Changes +++ b/ext/DB_File/Changes @@ -203,3 +203,11 @@ 1.60 Changed the test to check for full tied array support + +1.61 19th November 1998 + + Added a note to README about how to build Berkeley DB 2.x when + using HP-UX. + Minor modifications to get the module to build with DB 2.5.x + Fixed a typo in the definition of O_RDONLY, courtesy of Mark Kettenis. + diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index fcd0746a5e..3d3b9ff854 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -1,8 +1,8 @@ # DB_File.pm -- Perl 5 interface to Berkeley DB # # written by Paul Marquess (pmarquess@bfsec.bt.co.uk) -# last modified 16th May 1998 -# version 1.60 +# last modified 19th November 1998 +# version 1.61 # # Copyright (c) 1995-8 Paul Marquess. All rights reserved. # This program is free software; you can redistribute it and/or @@ -145,7 +145,7 @@ use vars qw($VERSION @ISA @EXPORT $AUTOLOAD $DB_BTREE $DB_HASH $DB_RECNO $db_ver use Carp; -$VERSION = "1.60" ; +$VERSION = "1.61" ; #typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; $DB_BTREE = new DB_File::BTREEINFO ; diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index c661023a33..5856f4f862 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -3,8 +3,8 @@ DB_File.xs -- Perl 5 interface to Berkeley DB written by Paul Marquess (pmarquess@bfsec.bt.co.uk) - last modified 16th May 1998 - version 1.60 + last modified 19th November 1998 + version 1.61 All comments/suggestions/problems are welcome @@ -56,6 +56,8 @@ This was ok for DB 1.x, but isn't for DB 2.x. 1.59 - No change to DB_File.xs 1.60 - Some code tidy up + 1.61 - added flagSet macro for DB 2.5.x + fixed typo in O_RDONLY test. @@ -153,6 +155,12 @@ typedef db_recno_t recno_t; #define DBT_flags(x) x.flags = 0 #define DB_flags(x, v) x |= v +#if DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 5 +#define flagSet(flags, bitmask) ((flags) & (bitmask)) +#else +#define flagSet(flags, bitmask) (((flags) & DB_OPFLAGS_MASK) == (bitmask)) +#endif + #else /* db version 1.x */ typedef union INFO { @@ -205,6 +213,7 @@ typedef union INFO { #define do_SEQ(db, key, value, flag) (db->dbp->seq)(db->dbp, &key, &value, flag) #define DBT_flags(x) #define DB_flags(x, v) +#define flagSet(flags, bitmask) ((flags) & (bitmask)) #endif /* db version 1 */ @@ -216,10 +225,11 @@ typedef union INFO { #define db_sync(db, flags) ((db->dbp)->sync)(db->dbp, flags) #define db_get(db, key, value, flags) ((db->dbp)->get)(db->dbp, TXN &key, &value, flags) + #ifdef DB_VERSION_MAJOR #define db_DESTROY(db) ((db->dbp)->close)(db->dbp, 0) #define db_close(db) ((db->dbp)->close)(db->dbp, 0) -#define db_del(db, key, flags) ((flags & R_CURSOR) \ +#define db_del(db, key, flags) (flagSet(flags, R_CURSOR) \ ? ((db->cursor)->c_del)(db->cursor, 0) \ : ((db->dbp)->del)(db->dbp, NULL, &key, flags) ) @@ -232,6 +242,7 @@ typedef union INFO { #endif + #define db_seq(db, key, value, flags) do_SEQ(db, key, value, flags) typedef struct { @@ -288,12 +299,17 @@ u_int flags ; { int status ; - if (flags & R_CURSOR) { + if (flagSet(flags, R_CURSOR)) { status = ((db->cursor)->c_del)(db->cursor, 0); if (status != 0) return status ; +#if DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 5 flags &= ~R_CURSOR ; +#else + flags &= ~DB_OPFLAGS_MASK ; +#endif + } return ((db->dbp)->put)(db->dbp, NULL, &key, &value, flags) ; @@ -808,7 +824,7 @@ SV * sv ; #if O_RDONLY == 0 if (flags == O_RDONLY) #else - if (flags & O_RDONLY) == O_RDONLY) + if ((flags & O_RDONLY) == O_RDONLY) #endif Flags |= DB_RDONLY ; @@ -1436,7 +1452,7 @@ db_put(db, key, value, flags=0) #endif OUTPUT: RETVAL - key if (flags & (R_IAFTER|R_IBEFORE)) OutputKey(ST(1), key); + key if (flagSet(flags, R_IAFTER) || flagSet(flags, R_IBEFORE)) OutputKey(ST(1), key); int db_fd(db) diff --git a/ext/DB_File/hints/dynixptx.pl b/ext/DB_File/hints/dynixptx.pl new file mode 100644 index 0000000000..bb5ffa56e6 --- /dev/null +++ b/ext/DB_File/hints/dynixptx.pl @@ -0,0 +1,3 @@ +# Need to add an extra '-lc' to the end to work around a DYNIX/ptx bug + +$self->{LIBS} = ['-lm -lc']; diff --git a/ext/DynaLoader/dl_mpeix.xs b/ext/DynaLoader/dl_mpeix.xs index 808c3b0f19..4cc07ec4c3 100644 --- a/ext/DynaLoader/dl_mpeix.xs +++ b/ext/DynaLoader/dl_mpeix.xs @@ -2,6 +2,7 @@ * Author: Mark Klein (mklein@dis.com) * Version: 2.1, 1996/07/25 * Version: 2.2, 1997/09/25 Mark Bixby (markb@cccd.edu) + * Version: 2.3, 1998/11/19 Mark Bixby (markb@cccd.edu) */ #include "EXTERN.h" @@ -59,13 +60,13 @@ flags)); ",filename); obj = (p_mpe_dld) safemalloc(sizeof(t_mpe_dld)); memzero(obj, sizeof(t_mpe_dld)); - if (filename[0] == '.') + if (filename[0] != '/') { getcwd(buf,sizeof(buf)); - sprintf(obj->filename,"$%s/%s$",buf,filename); + sprintf(obj->filename," %s/%s ",buf,filename); } else - sprintf(obj->filename,"$%s$",filename); + sprintf(obj->filename," %s ",filename); DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," libref=%x\n", obj)); @@ -90,11 +91,11 @@ dl_find_symbol(libhandle, symbolname) ST(0) = sv_newmortal() ; errno = 0; - sprintf(symname, "$%s$", symbolname); + sprintf(symname, " %s ", symbolname); HPGETPROCPLABEL(8, symname, &symaddr, &status, obj->filename, 1, 0, &datalen, 1, 0, 0); - DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," symbolref(PROCEDURE) = %x\n", symaddr)); + DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," symbolref(PROCEDURE) = %x, status=%x\n", symaddr, status)); if (status != 0) { SaveError("%s",(errno) ? Strerror(errno) : "Symbol not found") ; diff --git a/ext/POSIX/hints/dynixptx.pl b/ext/POSIX/hints/dynixptx.pl new file mode 100644 index 0000000000..05cf0f8765 --- /dev/null +++ b/ext/POSIX/hints/dynixptx.pl @@ -0,0 +1,4 @@ +# Need to add an extra '-lc' to the end to work around a DYNIX/ptx bug +# PR#227670 - linker error on fpgetround() + +$self->{LIBS} = ['-ldb -lc']; diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 5a4870f4af..1ed19f713d 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -193,10 +193,25 @@ require DynaLoader; AF_UNIX AF_UNSPEC AF_X25 + MSG_CTLFLAGS + MSG_CTLIGNORE + MSG_CTRUNC MSG_DONTROUTE + MSG_DONTWAIT + MSG_EOF + MSG_EOR + MSG_ERRQUEUE + MSG_FIN MSG_MAXIOVLEN + MSG_NOSIGNAL MSG_OOB MSG_PEEK + MSG_PROXY + MSG_RST + MSG_SYN + MSG_TRUNC + MSG_URG + MSG_WAITALL PF_802 PF_APPLETALK PF_CCITT @@ -221,6 +236,11 @@ require DynaLoader; PF_UNIX PF_UNSPEC PF_X25 + SCM_CONNECT + SCM_CREDENTIALS + SCM_CREDS + SCM_RIGHTS + SCM_TIMESTAMP SOCK_DGRAM SOCK_RAW SOCK_RDM diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index de0217bdb4..1c541d7cef 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -330,42 +330,114 @@ constant(char *name, int arg) case 'L': break; case 'M': + if (strEQ(name, "MSG_CTLFLAGS")) +#ifdef MSG_CTLFLAGS + return MSG_CTLFLAGS; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_CTLIGNORE")) +#ifdef MSG_CTLIGNORE + return MSG_CTLIGNORE; +#else + goto not_there; +#endif if (strEQ(name, "MSG_CTRUNC")) -#if defined(MSG_CTRUNC) || defined(HAS_GNULIBC) /* XXX it's an enum */ +#if defined(MSG_TRUNC) || defined(HAS_MSG_CTRUNC) /* might be an enum */ return MSG_CTRUNC; #else goto not_there; #endif if (strEQ(name, "MSG_DONTROUTE")) -#if defined(MSG_DONTROUTE) || defined(HAS_GNULIBC) /* XXX it's an enum */ +#if defined(MSG_DONTROUTE) || defined(HAS_MSG_DONTROUTE) /* might be an enum */ return MSG_DONTROUTE; #else goto not_there; #endif + if (strEQ(name, "MSG_DONTWAIT")) +#ifdef MSG_DONTWAIT + return MSG_DONTWAIT; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_EOF")) +#ifdef MSG_EOF + return MSG_EOF; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_EOR")) +#ifdef MSG_EOR + return MSG_EOR; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_ERRQUEUE")) +#ifdef MSG_ERRQUEUE + return MSG_ERRQUEUE; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_FIN")) +#ifdef MSG_FIN + return MSG_FIN; +#else + goto not_there; +#endif if (strEQ(name, "MSG_MAXIOVLEN")) #ifdef MSG_MAXIOVLEN return MSG_MAXIOVLEN; #else goto not_there; #endif + if (strEQ(name, "MSG_NOSIGNAL")) +#ifdef MSG_NOSIGNAL + return MSG_NOSIGNAL; +#else + goto not_there; +#endif if (strEQ(name, "MSG_OOB")) -#if defined(MSG_OOB) || defined(HAS_GNULIBC) /* XXX it's an enum */ +#if defined(MSG_OOB) || defined(HAS_MSG_OOB) /* might be an enum */ return MSG_OOB; #else goto not_there; #endif if (strEQ(name, "MSG_PEEK")) -#if defined(MSG_PEEK) || defined(HAS_GNULIBC) /* XXX it's an enum */ +#if defined(MSG_PEEK) || defined(HAS_MSG_PEEK) /* might be an enum */ return MSG_PEEK; #else goto not_there; #endif if (strEQ(name, "MSG_PROXY")) -#if defined(MSG_PROXY) || defined(HAS_GNULIBC) /* XXX it's an enum */ +#if defined(MSG_PROXY) || defined(HAS_MSG_PROXY) /* might be an enum */ return MSG_PROXY; #else goto not_there; #endif + if (strEQ(name, "MSG_RST")) +#ifdef MSG_RST + return MSG_RST; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_SYN")) +#ifdef MSG_SYN + return MSG_SYN; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_TRUNC")) +#ifdef MSG_TRUNC + return MSG_TRUNC; +#else + goto not_there; +#endif + if (strEQ(name, "MSG_WAITALL")) +#ifdef MSG_WAITALL + return MSG_WAITALL; +#else + goto not_there; +#endif break; case 'N': break; @@ -522,6 +594,36 @@ constant(char *name, int arg) case 'R': break; case 'S': + if (strEQ(name, "SCM_CONNECT")) +#ifdef SCM_CONNECT + return SCM_CONNECT; +#else + goto not_there; +#endif + if (strEQ(name, "SCM_CREDENTIALS")) +#ifdef SCM_CREDENTIALS + return SCM_CREDENTIALSS; +#else + goto not_there; +#endif + if (strEQ(name, "SCM_CREDS")) +#ifdef SCM_CREDS + return SCM_CREDS; +#else + goto not_there; +#endif + if (strEQ(name, "SCM_RIGHTS")) +#if defined(SCM_RIGHTS) || defined(HAS_SCM_RIGHTS) /* might be an enum */ + return SCM_RIGHTS; +#else + goto not_there; +#endif + if (strEQ(name, "SCM_TIMESTAMP")) +#ifdef SCM_TIMESTAMP + return SCM_TIMESTAMP; +#else + goto not_there; +#endif if (strEQ(name, "SOCK_DGRAM")) #ifdef SOCK_DGRAM return SOCK_DGRAM; diff --git a/hints/dynixptx.sh b/hints/dynixptx.sh index 78a45e42a3..2edf026305 100644 --- a/hints/dynixptx.sh +++ b/hints/dynixptx.sh @@ -1,5 +1,9 @@ # Sequent Dynix/Ptx v. 4 hints # Created 1996/03/15 by Brad Howerter, bhower@wgc.woodward.com + +# Modified 1998/11/10 by Martin J. Bligh, mbligh@sequent.com +# to incorporate work done by Kurtis D. Rader & myself. + # Use Configure -Dcc=gcc to use gcc. # cc wants -G for dynamic loading @@ -15,10 +19,41 @@ libswanted=`echo $libswanted | sed -e 's/ inet / /'` # Configure defaults to usenm='y', which doesn't work very well usenm='n' -# Reported by bruce@aps.org ("Bruce P. Schuck") as needed for -# DYNIX/ptx 4.0 V4.2.1 to get socket i/o to work -# Not defined by default in case they break other versions. -# These probably need to be worked into a piece of code that -# checks for the need for this setting. -# cppflags='-Wc,+abi-socket -I/usr/local/include' -# ccflags='-Wc,+abi-socket -I/usr/local/include' +# for performance, apparently this makes a huge difference (~krader) + +d_vfork='define' +optimize='-Wc,-O3 -W0,-xstring' + +# We override d_socket because it's very hard for Configure to get it right +# in Dynix/Ptx, for several reasons. +# (1) the socket interface is in libsocket.so -- this wouldn't be so hard +# for Configure to fathom...but it gets more tangled. +# (2) if the system has been patched there can be libsocket.so.1.FOO.BAR, +# the FOO.BAR being the old version of the system before the patching. +# Configure picks up the old broken version. +# (3) libsocket.so points to either libsocket.so.1 (v4.2) +# or libsocket.so.1.1 (v4.4) The socket call in libsocket.so.1.1 +# (BSD socket library) is called bsd_socket(), and has a macro wrapper +# to hide this. +# This information kindly provided by Martin J. Bligh of Sequent. +# As he puts it: +# "Sequent has unusual capabilities, taking it above and beyond +# the complexity of any other vendor" :-) +# +# Jarkko Hietaniemi November 1998 + +case "$osvers" in +4.4*) # configure doesn't find sockets, as they're in libsocket, not libc + d_socket='define' + d_oldsock='undef' + d_sockpair='define' + ;; +4.2*) # on ptx/TCP 4.2, we can use BSD sockets, but they're not the default. + cppflags='-Wc,+bsd-socket' + ccflags='-Wc,+bsd-socket' + ldflags='-Wc,+bsd-socket' + d_socket='define' + d_oldsock='undef' + d_sockpair='define' + ;; +esac diff --git a/installperl b/installperl index 0ce39bf73a..4331d83910 100755 --- a/installperl +++ b/installperl @@ -220,6 +220,11 @@ else { @corefiles = <*.h libperl*.*>; # AIX needs perl.exp installed as well. push(@corefiles,'perl.exp') if $^O eq 'aix'; + if ($^O eq 'mpeix') { + # MPE needs mpeixish.h installed as well. + mkpath("$installarchlib/CORE/mpeix", 1, 0777); + push(@corefiles,'mpeix/mpeixish.h'); + } # If they have built sperl.o... push(@corefiles,'sperl.o') if -f 'sperl.o'; } diff --git a/iperlsys.h b/iperlsys.h index 7b220b9456..279aac50ff 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -927,5 +927,22 @@ public: #endif /* PERL_OBJECT */ +/* Mention + + HAS_READV + HAS_RECVMSG + HAS_SENDMSG + HAS_WRITEV + HAS_STRUCT_MSGHDR + HAS_STRUCT_CMSGHDR + I_SYSUIO + + here so that Configure picks them up. Perl core does not + use them but somebody might want to extend IO:: someday. + + Jarkko Hietaniemi November 1998 + + */ + #endif /* __Inc__IPerl___ */ diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index a28f510d11..ef12d02fcb 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -124,6 +124,11 @@ The COUNT can be zero or negative, see timethis(). Returns the difference between two Benchmark times as a Benchmark object suitable for passing to timestr(). +=item timesum ( T1, T2 ) + +Returns the sum of two Benchmark times as a Benchmark object suitable +for passing to timestr(). + =item timestr ( TIMEDIFF, [ STYLE, [ FORMAT ] ] ) Returns a string that formats the times in the TIMEDIFF object in @@ -293,6 +298,15 @@ sub timediff { bless \@r; } +sub timesum { + my($a, $b) = @_; + my @r; + for (my $i=0; $i < @$a; ++$i) { + push(@r, $a->[$i] + $b->[$i]); + } + bless \@r; +} + sub timestr { my($tr, $style, $f) = @_; my @t = @$tr; diff --git a/lib/filetest.pm b/lib/filetest.pm index cc14e82817..fe1777e443 100644 --- a/lib/filetest.pm +++ b/lib/filetest.pm @@ -16,7 +16,8 @@ filetest - Perl pragma to control the filetest permission operators =head1 DESCRIPTION This pragma tells the compiler to change the behaviour of the filetest -permissions operators, the -r -w -x -R -W -X (see L<perlfunc>). +permissions operators, the C<-r> C<-w> C<-x> C<-R> C<-W> C<-X> +(see L<perlfunc>). The default behaviour to use the mode bits as returned by the stat() family of calls. This, however, may not be the right thing to do if @@ -31,11 +32,11 @@ There may be a slight performance decrease in the filetests when C<use filetest> is in effect, because in some systems the extended functionality needs to be emulated. -B<NOTE>: using the file tests is a lost case from the start: there is -a window open for race conditions (who is to say that the permissions -will not change between the test and the real operation?). Therefore -if you are serious about security, just try the real operation and -test for its success. Think atomicity. +B<NOTE>: using the file tests for security purposes is a lost case +from the start: there is a window open for race conditions (who is to +say that the permissions will not change between the test and the real +operation?). Therefore if you are serious about security, just try +the real operation and test for its success. Think atomicity. =head2 subpragma access @@ -571,10 +571,10 @@ static char bucket_of[] = # endif #ifdef I_MACH_CTHREADS -#undef MUTEX_LOCK -#define MUTEX_LOCK(m) STMT_START { if (*m) mutex_lock(*m); } STMT_END -#undef MUTEX_UNLOCK -#define MUTEX_UNLOCK(m) STMT_START { if (*m) mutex_unlock(*m); } STMT_END +# undef MUTEX_LOCK +# define MUTEX_LOCK(m) STMT_START { if (*m) mutex_lock(*m); } STMT_END +# undef MUTEX_UNLOCK +# define MUTEX_UNLOCK(m) STMT_START { if (*m) mutex_unlock(*m); } STMT_END #endif static char *emergency_buffer; @@ -23,6 +23,15 @@ Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) uname='$myuname' hint=$hint, useposix=$useposix, d_sigaction=$d_sigaction usethreads=$usethreads useperlio=$useperlio d_sfio=$d_sfio +!GROK!THIS! +case "$use64bits$usemultiplicity" in +*define*) + $spitshell <<!GROK!THIS! + use64bits=$use64bits usemultiplicity=$usemultiplicity +!GROK!THIS! + ;; +esac +$spitshell <<!GROK!THIS! Compiler: cc='$cc', optimize='$optimize', gccversion=$gccversion cppflags='$cppflags' @@ -855,6 +855,7 @@ Free_t Perl_free _((Malloc_t where)); #ifndef Quad_t # if LONGSIZE == 8 # define Quad_t long +# define Uquad_t unsigned long # define PERL_QUAD_IS_LONG # endif #endif @@ -862,6 +863,7 @@ Free_t Perl_free _((Malloc_t where)); #ifndef Quad_t # if INTSIZE == 8 # define Quad_t int +# define Uquad_t unsigned int # define PERL_QUAD_IS_INT # endif #endif @@ -870,6 +872,7 @@ Free_t Perl_free _((Malloc_t where)); # ifdef USE_LONG_LONG /* See above note about LP32. --jhi */ # if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8 # define Quad_t long long +# define Uquad_t unsigned long long # define PERL_QUAD_IS_LONG_LONG # endif # endif @@ -886,8 +889,9 @@ Free_t Perl_free _((Malloc_t where)); #ifdef Quad_t # define HAS_QUAD # ifndef Uquad_t - /* Note that if your Quad_t is a typedef you *must* have defined - * also Uquad_t yourself because 'unsigned type' is illegal. */ + /* Note that if your Quad_t is a typedef (not a #define) you *MUST* + * have defined by now Uquad_t yourself because 'unsigned type' + * is illegal. */ # define Uquad_t unsigned Quad_t # endif #endif @@ -1372,6 +1376,9 @@ typedef I32 (*filter_t) _((int, SV *, int)); # else # ifdef I_MACH_CTHREADS # include <mach/cthreads.h> +# ifdef NeXT +# define MUTEX_INIT_CALLS_MALLOC +# endif typedef cthread_t perl_os_thread; typedef mutex_t perl_mutex; typedef condition_t perl_cond; @@ -1816,7 +1823,7 @@ typedef Sighandler_t Sigsave_t; #endif #ifdef MYMALLOC -# ifdef I_MACH_CTHREADS +# ifdef MUTEX_INIT_CALLS_MALLOC # define MALLOC_INIT \ STMT_START { \ PL_malloc_mutex = NULL; \ @@ -2178,6 +2185,40 @@ enum { /* pass one of these to get_vtbl */ want_vtbl_regdatum }; +enum { /* pass one of these to get_vtbl */ + want_vtbl_sv, + want_vtbl_env, + want_vtbl_envelem, + want_vtbl_sig, + want_vtbl_sigelem, + want_vtbl_pack, + want_vtbl_packelem, + want_vtbl_dbline, + want_vtbl_isa, + want_vtbl_isaelem, + want_vtbl_arylen, + want_vtbl_glob, + want_vtbl_mglob, + want_vtbl_nkeys, + want_vtbl_taint, + want_vtbl_substr, + want_vtbl_vec, + want_vtbl_pos, + want_vtbl_bm, + want_vtbl_fm, + want_vtbl_uvar, + want_vtbl_defelem, + want_vtbl_regexp, + want_vtbl_collxfrm, + want_vtbl_amagic, + want_vtbl_amagicelem, +#ifdef USE_THREADS + want_vtbl_mutex, +#endif + want_vtbl_regdata, + want_vtbl_regdatum +}; + /* Note: the lowest 8 bits are reserved for stuffing into op->op_private */ diff --git a/pod/perlfaq3.pod b/pod/perlfaq3.pod index d06f2bef7a..478b0805d4 100644 --- a/pod/perlfaq3.pod +++ b/pod/perlfaq3.pod @@ -425,7 +425,7 @@ is the recommended Win95/NT port), or (eventually) build your own Win95/NT Perl using WinGCC, then you'll have to modify the Registry yourself. -Macintosh perl scripts will have the the appropriate Creator and +Macintosh perl scripts will have the appropriate Creator and Type, so that double-clicking them will invoke the perl application. I<IMPORTANT!>: Whatever you do, PLEASE don't get frustrated, and just diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index 633f5f109b..39325c2f69 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -207,7 +207,7 @@ http://www.perl.com/CPAN/authors/David_Muir_Sharnoff/modules/Time/JulianDay.pm.g =head2 Does Perl have a year 2000 problem? Is Perl Y2K compliant? Short answer: No, Perl does not have a Year 2000 problem. Yes, -Perl is Y2K compliant. The programmers you're hired to use it, +Perl is Y2K compliant. The programmers you've hired to use it, however, probably are not. Long answer: Perl is just as Y2K compliant as your pencil--no more, @@ -378,7 +378,7 @@ There are a number of ways, with varying efficiency: If you want a count of a certain single character (X) within a string, you can use the C<tr///> function like so: - $string = "ThisXlineXhasXsomeXx'sXinXit": + $string = "ThisXlineXhasXsomeXx'sXinXit"; $count = ($string =~ tr/X//); print "There are $count X charcters in the string"; @@ -1326,7 +1326,7 @@ The Data::Dumper module on CPAN is nice for printing out data structures, and FreezeThaw for copying them. For example: use FreezeThaw qw(freeze thaw); - $new = thaw freeze $old; + ($new) = thaw freeze $old; Where $old can be (a reference to) any kind of data structure you'd like. It will be deeply copied. diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod index 98e706afad..015c9b4d21 100644 --- a/pod/perlfaq5.pod +++ b/pod/perlfaq5.pod @@ -343,8 +343,8 @@ and use it as though it were a normal filehandle. Then use any of those as you would a normal filehandle. Anywhere that Perl is expecting a filehandle, an indirect filehandle may be used instead. An indirect filehandle is just a scalar variable that contains -a filehandle. Functions like C<print>, C<open>, C<seek>, or the functions or -the C<E<lt>FHE<gt>> diamond operator will accept either a read filehandle +a filehandle. Functions like C<print>, C<open>, C<seek>, or +the C<E<lt>FHE<gt>> diamond operator will accept either a real filehandle or a scalar variable containing one: ($ifh, $ofh, $efh) = (*STDIN, *STDOUT, *STDERR); @@ -352,7 +352,7 @@ or a scalar variable containing one: $got = <$ifh> print $efh "What was that: $got"; -Of you're passing a filehandle to a function, you can write +If you're passing a filehandle to a function, you can write the function in two ways: sub accept_fh { diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod index e1bccc883f..cb7f3c027a 100644 --- a/pod/perlfaq7.pod +++ b/pod/perlfaq7.pod @@ -313,7 +313,7 @@ caller's scope. Variable suicide is when you (temporarily or permanently) lose the value of a variable. It is caused by scoping through my() and local() -interacting with either closures or aliased foreach() interator +interacting with either closures or aliased foreach() iterator variables and subroutine arguments. It used to be easy to inadvertently lose a variable's value this way, but now it's much harder. Take this code: diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod index c4036ff35d..cbc87b5fd7 100644 --- a/pod/perlfaq8.pod +++ b/pod/perlfaq8.pod @@ -449,8 +449,8 @@ http://www.perl.com/CPAN/doc/misc/ancient/tutorial/eg/itimers.pl . =head2 How can I measure time under a second? -In general, you may not be able to. The Time::HiRes module (available -from CPAN) provides this functionality for some systems. +The Time::HiRes module (available from CPAN) provides this +functionality for some systems. In general, you may not be able to. But if your system supports both the syscall() function in Perl as well as a system call like gettimeofday(2), diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 8e7cf6da28..2d1e1dfa42 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -320,7 +320,7 @@ produce more accurate results than the bare stat() mode bits. When under the C<use filetest 'access'> the above-mentioned filetests will test whether the permission can (not) be granted using the -access() family of system calls. Also note that the -x and -X may +access() family of system calls. Also note that the C<-x> and C<-X> may under this pragma return true even if there are no execute permission bits set (nor any extra execute permission ACLs). This strangeness is due to the underlying system calls' definitions. Read the diff --git a/pod/perlhist.pod b/pod/perlhist.pod index 95a354fd51..b84eeabc49 100644 --- a/pod/perlhist.pod +++ b/pod/perlhist.pod @@ -6,7 +6,7 @@ perlhist - the Perl history records =for RCS # -# $Id: perlhist.pod,v 1.48 1998/08/03 08:50:12 jhi Exp $ +# $Id: perlhist.pod,v 1.54 1998/11/22 17:43:17 jhi Exp jhi $ # =end RCS @@ -265,6 +265,7 @@ the strings?). 5.004_04-m3 1998-May-15 5.004_04-m4 1998-May-19 5.004_04-MT5 1998-Jul-21 + 5.004_04-MT6 1998-Oct-09 Malcolm 5.004_50 1997-Sep-09 The 5.005 development track. 5.004_51 1997-Oct-02 @@ -303,6 +304,8 @@ the strings?). Sarathy 5.005_50 1998-Jul-26 The 5.006 development track. 5.005_51 1998-Aug-10 + 5.005_52 1998-Sep-25 + 5.005_53 1998-Oct-31 =head2 SELECTED RELEASE SIZES @@ -448,11 +451,12 @@ The "diff lines kb" means that for example the patch 5.003_08, to be applied on top of the 5.003_07 (or whatever was before the 5.003_08) added lines for 110 kilobytes, it removed lines for 19 kilobytes, and changed lines for 424 kilobytes. Just the lines themselves are -counted, not their context. The "+ - !" become from the diff(1)s +counted, not their context. The "+ - !" become from the diff(1) context diff output format. Pump- Release Date diff lines kB - king + - ! + king ------------- + + - ! =========================================================================== Chip 5.003_08 1996-Nov-19 110 19 424 diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 9d0ecc31bc..4edf4f8bb2 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -331,6 +331,7 @@ sub makedate { my $secs = shift; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secs); my $mname = (qw{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec})[$mon]; + $year += 1900; return "$mday/$mname/$year"; } @@ -3203,7 +3203,7 @@ PP(pp_unpack) unsigned int auint; U32 aulong; #ifdef HAS_QUAD - unsigned Quad_t auquad; + Uquad_t auquad; #endif char *aptr; float afloat; @@ -3760,11 +3760,11 @@ PP(pp_unpack) EXTEND(SP, len); EXTEND_MORTAL(len); while (len-- > 0) { - if (s + sizeof(unsigned Quad_t) > strend) + if (s + sizeof(Uquad_t) > strend) auquad = 0; else { - Copy(s, &auquad, 1, unsigned Quad_t); - s += sizeof(unsigned Quad_t); + Copy(s, &auquad, 1, Uquad_t); + s += sizeof(Uquad_t); } sv = NEWSV(43, 0); if (auquad <= UV_MAX) @@ -4051,7 +4051,7 @@ PP(pp_pack) U32 aulong; #ifdef HAS_QUAD Quad_t aquad; - unsigned Quad_t auquad; + Uquad_t auquad; #endif char *aptr; float afloat; @@ -4438,8 +4438,8 @@ PP(pp_pack) case 'Q': while (len-- > 0) { fromstr = NEXTFROM; - auquad = (unsigned Quad_t)SvIV(fromstr); - sv_catpvn(cat, (char*)&auquad, sizeof(unsigned Quad_t)); + auquad = (Uquad_t)SvIV(fromstr); + sv_catpvn(cat, (char*)&auquad, sizeof(Uquad_t)); } break; case 'q': diff --git a/t/op/filetest.t b/t/op/filetest.t index 13c5917adc..9228b5730b 100755 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -26,19 +26,30 @@ print "ok 5\n"; # make sure TEST is r-x eval { chmod 0555, 'TEST' }; -if ($@) { - print "#[$@]\nok 6 # skipped\n"; +$bad_chmod = $@; + +$oldeuid = $>; # root can read and write anything +eval '$> = 1'; # so switch uid (may not be implemented) + +print "# oldeuid = $oldeuid, euid = $>\n"; + +if ($bad_chmod) { + print "#[$@]\nok 6 #skipped\n"; } else { - print "not " if -w 'TEST'; - print "ok 6\n"; + print "not " if -w 'TEST'; + print "ok 6\n"; } -# Scripts are not -x everywhere. +# Scripts are not -x everywhere so cannot test that. print "not " unless -r 'op'; print "ok 7\n"; +eval '$> = $oldeuid'; # switch uid back (may not be implemented) + +# this would fail for the euid 1 +# (unless we have unpacked the source code as uid 1...) print "not " unless -w 'op'; print "ok 8\n"; diff --git a/t/op/grent.t b/t/op/grent.t index 48698e879a..9d2b01d51a 100755 --- a/t/op/grent.t +++ b/t/op/grent.t @@ -7,7 +7,10 @@ BEGIN { my $GR = "/etc/group"; - if ($Config{'i_grp'} ne 'define' or not -f $GR or not open(GR, $GR)) { + if (($^O eq 'next' and not open(GR, "nidump group .|")) + or (defined $Config{'i_grp'} and $Config{'i_grp'} ne 'define') + or not -f $GR or not open(GR, $GR) + ) { print "1..0\n"; exit 0; } @@ -46,6 +49,7 @@ while (<GR>) { $not = 1, last if $name ne $name_s or # Shadow passwords confuse this. +# Not that group passwords are used much but still. # $passwd ne $passwd_s or $gid ne $gid_s or $members ne $members_s; diff --git a/t/op/pwent.t b/t/op/pwent.t index 8fd9ce0dd8..87b2ac1f78 100755 --- a/t/op/pwent.t +++ b/t/op/pwent.t @@ -7,7 +7,10 @@ BEGIN { my $PW = "/etc/passwd"; - if ($Config{'i_pwd'} ne 'define' or not -f $PW or not open(PW, $PW)) { + if (($^O eq 'next' and not open(PW, "nidump passwd .|")) + or (defined $Config{'i_pwd'} and $Config{'i_pwd'} ne 'define') + or not -f $PW or not open(PW, $PW) + ) { print "1..0\n"; exit 0; } |