From: Gurusamy Sarathy Date: Fri, 17 Mar 2000 02:38:51 +0000 (+0000) Subject: integrate cfgperl contents into mainline X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c99d73ee7ce90de2561496f683f3850d1269e1d;p=p5sagit%2Fp5-mst-13.2.git integrate cfgperl contents into mainline p4raw-id: //depot/perl@5767 --- diff --git a/Configure b/Configure index 0b3f8a1..f1a76eb 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sun Mar 12 19:42:40 EET 2000 [metaconfig 3.0 PL70] +# Generated on Thu Mar 16 03:04:33 EET 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <$first) 2>/dev/null; then if $test -f 123456789abcde; then echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 val="$undef" else - if (echo hi >$second) 2>/dev/null; then - if $test -f /tmp/cf$$/123456789abcde; then - $cat <<'EOM' -That's peculiar... You can have filenames longer than 14 characters, but only -on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems -I shall consider your system cannot support long filenames at all. -EOM - val="$undef" - else - echo 'You can have filenames longer than 14 characters.' >&4 - val="$define" - fi - else - $cat <<'EOM' -How confusing! Some of your filesystems are sane enough to allow filenames -longer than 14 characters but some others like /tmp can't even think about them. -So, for now on, I shall assume your kernel does not allow them at all. -EOM - val="$undef" - fi + echo 'You can have filenames longer than 14 characters.'>&4 + val="$define" fi else $cat <<'EOM' -You can't have filenames longer than 14 chars. You can't even think about them! +You can't have filenames longer than 14 chars. +You can't even think about them! EOM val="$undef" fi set d_flexfnam eval $setvar -$rm -rf /tmp/cf$$ 123456789abcde* +$rm -rf 123456789abcde* : determine where library module manual pages go set man3dir man3dir none @@ -6688,7 +6669,7 @@ esac echo "If you don't want the manual sources installed, answer 'none'." prog=`echo $package | $sed 's/-*[0-9.]*$//'` case "$man3dir" in -'') dflt=`echo $man1dir | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` +'') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` if $test -d "$privlib/man/man3"; then cat <&4 @@ -6706,16 +6687,18 @@ EOM esac fi ;; -' ') dflt=none;; *) dflt="$man3dir" ;; esac +case "$dflt" in +' ') dflt=none ;; +esac echo " " fn=dn+~ rp="Where do the $package library man pages (source) go?" . ./getfile man3dir="$ans" man3direxp="$ansexp" -case "$man1dir" in +case "$man3dir" in '') man3dir=' ' installman3dir='';; esac @@ -13806,6 +13789,37 @@ echo $sig_name | $awk \ }' $rm -f signal signal.c signal.awk signal.lst signal_cmd +echo " " +case "$sizetype" in +*_t) zzz="$sizetype" ;; +*) zzz="filesize" ;; +esac +echo "Checking the size of $zzz..." >&4 +cat > try.c < +#include +int main() { + printf("%d\n", (int)sizeof($sizetype)); + exit(0); +} +EOCP +set try +if eval $compile_ok; then + yyy=`./try` + case "$yyy" in + '') sizesize=4 + echo "(I can't execute the test program--guessing $sizesize.)" >&4 + ;; + *) sizesize=$yyy + echo "Your $zzz size is $sizesize bytes." + ;; + esac +else + sizesize=4 + echo "(I can't compile the test program--guessing $sizesize.)" >&4 +fi + + : check for socklen_t echo " " echo "Checking to see if you have socklen_t..." >&4 @@ -13825,7 +13839,7 @@ else val="$undef" echo "You do not have socklen_t." case "$sizetype" in - size_t) echo "(You do have size_t, that might work.)" ;; + size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;; esac fi $rm -f try try.* @@ -15692,6 +15706,7 @@ sitelib_stem='$sitelib_stem' sitelibexp='$sitelibexp' siteprefix='$siteprefix' siteprefixexp='$siteprefixexp' +sizesize='$sizesize' sizetype='$sizetype' sleep='$sleep' smail='$smail' diff --git a/Porting/Glossary b/Porting/Glossary index e00110c..2c948b8 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -194,6 +194,8 @@ ccflags (ccflags.U): ccsymbols (Cppsym.U): The variable contains the symbols defined by the C compiler alone. + The symbols defined by cpp or by cc when it calls cpp are not in + this list, see cppsymbols and cppccsymbols. The list is a space-separated list of symbol=value tokens. cf_by (cf_who.U): @@ -267,9 +269,9 @@ cpp_stuff (cpp_stuff.U): used by the C preprocessor. cppccsymbols (Cppsym.U): - The variable contains the symbols defined by both - the bare C compiler and during a compilation that - includes stdio.h. + The variable contains the symbols defined by the C compiler + when it calls cpp. The symbols defined by the cc alone or cpp + alone are not in this list, see ccsymbols and cppsymbols. The list is a space-separated list of symbol=value tokens. cppflags (ccflags.U): @@ -301,8 +303,9 @@ cppstdin (cppstdin.U): preprocessor symbols. cppsymbols (Cppsym.U): - The variable contains the symbols during a compilation - that includes stdio.h. + The variable contains the symbols defined by the C preprocessor + alone. The symbols defined by cc or by cc when it calls cpp are + not in this list, see ccsymbols and cppccsymbols. The list is a space-separated list of symbol=value tokens. crosscompile (crosscompile.U): @@ -3094,6 +3097,9 @@ siteprefixexp (siteprefix.U): This variable holds the full absolute path of the directory below which the user will install add-on packages. Derived from siteprefix. +sizesize (sizesize.U): + This variable contains the size of a sizetype in bytes. + sizetype (sizetype.U): This variable defines sizetype to be something like size_t, unsigned long, or whatever type is used to declare length diff --git a/Porting/config.sh b/Porting/config.sh index 18e3506..c886987 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Mon Mar 6 00:00:30 EET 2000 +# Configuration time: Thu Mar 16 03:30:28 EET 2000 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -59,7 +59,7 @@ ccflags='-pthread -std -DLANGUAGE_C' ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_BSD=1 SYSTYPE_BSD=1 unix=1' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Mon Mar 6 00:00:30 EET 2000' +cf_time='Thu Mar 16 03:30:28 EET 2000' charsize='1' chgrp='' chmod='' @@ -682,6 +682,7 @@ sitelib_stem='/opt/perl/lib/site_perl' sitelibexp='/opt/perl/lib/site_perl/5.6.0' siteprefix='/opt/perl' siteprefixexp='/opt/perl' +sizesize='8' sizetype='size_t' sleep='' smail='' @@ -781,13 +782,13 @@ zcat='' zip='zip' # Configure command line arguments. config_arg0='Configure' -config_args='-Dprefix=/opt/perl -Doptimize=-O -Dusethreads -Duse64bitint -Duselfs -Dcf_by=yourname -Dcf_email=yourname@yourhost.yourplace.com -Dperladmin=yourname@yourhost.yourplace.com -Dmydomain=.yourplace.com -Dmyhostname=yourhost -dE' +config_args='-Dprefix=/opt/perl -Doptimize=-O -Dusethreads -Duse64bitint -Duselargefiles -Dcf_by=yourname -Dcf_email=yourname@yourhost.yourplace.com -Dperladmin=yourname@yourhost.yourplace.com -Dmydomain=.yourplace.com -Dmyhostname=yourhost -dE' config_argc=11 config_arg1='-Dprefix=/opt/perl' config_arg2='-Doptimize=-O' config_arg3='-Dusethreads' config_arg4='-Duse64bitint' -config_arg5='-Duselfs' +config_arg5='-Duselargefiles' config_arg6='-Dcf_by=yourname' config_arg7='-Dcf_email=yourname@yourhost.yourplace.com' config_arg8='-Dperladmin=yourname@yourhost.yourplace.com' diff --git a/Porting/config_H b/Porting/config_H index 7a63d00..70bf2c0 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Mon Mar 6 00:00:30 EET 2000 + * Configuration time: Thu Mar 16 03:30:28 EET 2000 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -175,12 +175,6 @@ */ #define HAS_FGETPOS /**/ -/* FLEXFILENAMES: - * This symbol, if defined, indicates that the system supports filenames - * longer than 14 characters. - */ -#define FLEXFILENAMES /**/ - /* HAS_FLOCK: * This symbol, if defined, indicates that the flock routine is * available to do file locking. @@ -1398,6 +1392,12 @@ */ #define HAS_GETCWD /**/ +/* HAS_GETFSSTAT: + * This symbol, if defined, indicates that the getfsstat routine is + * available to stat filesystems in bulk. + */ +#define HAS_GETFSSTAT /**/ + /* HAS_GETGRENT: * This symbol, if defined, indicates that the getgrent routine is * available for sequential access of the group database. @@ -1624,13 +1624,6 @@ */ #define HAS_ISASCII /**/ -/* HAS_LCHOWN: - * This symbol, if defined, indicates that the lchown routine is - * available to operate on a symbolic link (instead of following the - * link). - */ -#define HAS_LCHOWN /**/ - /* HAS_LDBL_DIG: * This symbol, if defined, indicates that this system's * or defines the symbol LDBL_DIG, which is the number @@ -1666,6 +1659,14 @@ #define LONGLONGSIZE 8 /**/ #endif +/* HAS_LSEEK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the lseek() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern off_t lseek(int, off_t, int); + */ +#define HAS_LSEEK_PROTO /**/ + /* HAS_MADVISE: * This symbol, if defined, indicates that the madvise system call is * available to map a file into memory. @@ -2260,6 +2261,12 @@ */ #define I_ICONV /**/ +/* I_IEEEFP: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_IEEEFP / **/ + /* I_INTTYPES: * This symbol, if defined, indicates to the C program that it should * include . @@ -2805,6 +2812,11 @@ #define SITELIB_EXP "/opt/perl/lib/site_perl/5.6.0" /**/ #define SITELIB_STEM "/opt/perl/lib/site_perl" /**/ +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size 8 /* */ + /* Size_t: * This symbol holds the type used to declare length parameters * for string functions. It is usually size_t, but may be @@ -2813,6 +2825,12 @@ */ #define Size_t size_t /* length paramater for string functions */ +/* Sock_size_t: + * This symbol holds the type used for the size argument of + * various socket calls (just the base type, not the pointer-to). + */ +#define Sock_size_t int /**/ + /* SSize_t: * This symbol holds the type used by functions that return * a count of bytes or an error condition. It must be a signed type. @@ -2952,10 +2970,22 @@ #endif /*#define OLD_PTHREADS_API / **/ +/* PERL_VENDORARCH: + * If defined, this symbol contains the name of a private library. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. + * It may have a ~ on the front. + * The standard distribution will put nothing in this directory. + * Vendors who distribute perl may wish to place their own + * architecture-dependent modules and extensions in this directory with + * MakeMaker Makefile.PL INSTALLDIRS=vendor + * or equivalent. See INSTALL for details. + */ /* PERL_VENDORARCH_EXP: * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/*#define PERL_VENDORARCH "" / **/ /*#define PERL_VENDORARCH_EXP "" / **/ /* PERL_VENDORLIB_EXP: @@ -3030,30 +3060,17 @@ #define PERL_XS_APIVERSION "5.6.0" #define PERL_PM_APIVERSION "5.005" -/* HAS_GETFSSTAT: - * This symbol, if defined, indicates that the getfsstat routine is - * available to stat filesystems in bulk. - */ -#define HAS_GETFSSTAT /**/ - -/* I_IEEEFP: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_IEEEFP / **/ - -/* HAS_LSEEK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the lseek() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern off_t lseek(int, off_t, int); +/* HAS_LCHOWN: + * This symbol, if defined, indicates that the lchown routine is + * available to operate on a symbolic link (instead of following the + * link). */ -#define HAS_LSEEK_PROTO /**/ +#define HAS_LCHOWN /**/ -/* Sock_size_t: - * This symbol holds the type used for the size argument of - * various socket calls (just the base type, not the pointer-to). +/* FLEXFILENAMES: + * This symbol, if defined, indicates that the system supports filenames + * longer than 14 characters. */ -#define Sock_size_t int /**/ +#define FLEXFILENAMES /**/ #endif diff --git a/config_h.SH b/config_h.SH index 108b673..91adef3 100644 --- a/config_h.SH +++ b/config_h.SH @@ -189,12 +189,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_fgetpos HAS_FGETPOS /**/ -/* FLEXFILENAMES: - * This symbol, if defined, indicates that the system supports filenames - * longer than 14 characters. - */ -#$d_flexfnam FLEXFILENAMES /**/ - /* HAS_FLOCK: * This symbol, if defined, indicates that the flock routine is * available to do file locking. @@ -2832,6 +2826,11 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #define SITELIB_EXP "$sitelibexp" /**/ #define SITELIB_STEM "$sitelib_stem" /**/ +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size $sizesize /* */ + /* Size_t: * This symbol holds the type used to declare length parameters * for string functions. It is usually size_t, but may be @@ -3082,5 +3081,11 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_lchown HAS_LCHOWN /**/ +/* FLEXFILENAMES: + * This symbol, if defined, indicates that the system supports filenames + * longer than 14 characters. + */ +#$d_flexfnam FLEXFILENAMES /**/ + #endif !GROK!THIS! diff --git a/configure.com b/configure.com index 8c65d77..003a047 100644 --- a/configure.com +++ b/configure.com @@ -40,7 +40,6 @@ $ ans = "" $ macros = "" $ extra_flags = "" $ user_c_flags = "" -$ use_debugging_perl = "y" $ use_ieee_math = "n" $ be_case_sensitive = "n" $ use_vmsdebug_perl = "n" @@ -1722,6 +1721,24 @@ $ ELSE $ use_vmsdebug_perl = "N" $ ENDIF $! +$! Ask if they want to build with DEBUGGING +$ echo "" +$ echo "Perl can be built with extra runtime debugging enabled. This +$ echo "enables the -D switch, at the cost of some performance. It +$ echo "was mandatory on perl 5.005 and before on VMS, but is now +$ echo "optional. If you don't generally use it you should probably +$ echo "leave this off and gain a bit of extra speed. +$ dflt = "y" +$ rp = "Build a DEBUGGING version of Perl? [''dflt'] " +$ GOSUB myread +$ IF ans.eqs."" then ans = dflt +$ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y" +$ THEN +$ use_debugging_perl = "Y" +$ ELSE +$ use_debugging_perl = "N" +$ ENDIF +$! $! Ask if they want to build with MULTIPLICITY $ echo "" $ echo "The perl interpreter engine can be built in a way that makes it @@ -1924,7 +1941,10 @@ $ echo "default file types, however, you can configure Perl to try default" $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing" $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and" $ echo "finally foo.com)." -$ dflt = "y" +$ echo "" +$ echo "This is currently broken in some configurations. Only enable it if +$ echo "you know what you're doing. " +$ dflt = "N" $ rp = "Always use default file types? [''dflt'] " $ GOSUB myread $ if ans.eqs."" then ans="''dflt'" diff --git a/epoc/config.sh b/epoc/config.sh index a3051d4..8b9f982 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -1,16 +1,15 @@ #!/bin/sh # -# This file was produced by running the Configure script. It holds all the -# definitions figured out by Configure. Should you modify one of these values, -# do not forget to propagate your changes by running "Configure -der". You may -# instead choose to run each of the .SH files by yourself, or "Configure -S". +# This file is manually maintained. +# +# It is NOT produced by running the Configure script. # # Package name : perl5 # Source directory : . -# Configuration time: Sun Oct 3 02:17:38 EET DST 1999 -# Configured by : jhi -# Target system : osf1 alpha.hut.fi v4.0 878 alpha +# Configuration time: +# Configured by : Olaf Flebbe +# Target system : EPOC Author='' Date='$Date' @@ -34,8 +33,8 @@ apirevision='' apisubversion='' apiversion='' ar='arm-pe-ar' -archlib='/perl/lib/5.5.670/epoc' -archlibexp='/perl/lib/5.5.670/epoc' +archlib='/perl/lib/5.6.0/epoc' +archlibexp='/perl/lib/5.6.0/epoc' archname64='' archname='epoc' archobjs='epoc.o epocish.o epoc_stubs.o' @@ -582,8 +581,8 @@ pmake='' pr='' prefix='' prefixexp='' -privlib='/perl/lib/5.5.670' -privlibexp='/perl/lib/5.5.670' +privlib='/perl/lib/5.6.0' +privlibexp='/perl/lib/5.6.0' prototype='define' ptrsize='4' randbits='31' @@ -627,13 +626,14 @@ sig_name_init='"ZERO", 0' sig_num='0' sig_num_init='0, 0' signal_t='void' -sitearch='/perl/lib/site_perl/5.5.670/epoc' -sitearchexp='/perl/lib/site_perl/5.5.670/epoc' -sitelib='/perl/lib/site_perl/5.5.670/' +sitearch='/perl/lib/site_perl/5.6.0/epoc' +sitearchexp='/perl/lib/site_perl/5.6.0/epoc' +sitelib='/perl/lib/site_perl/5.6.0/' sitelib_stem='/perl/lib/site_perl' -sitelibexp='/perl/lib/site_perl/5.5.670/' +sitelibexp='/perl/lib/site_perl/5.6.0/' siteprefix='' siteprefixexp='' +sizesize='4' sizetype='size_t' sleep='' smail='' @@ -702,7 +702,7 @@ vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' -version='5.5.670' +version='5.6.0' vi='' voidflags='15' xlibpth='' @@ -724,11 +724,11 @@ config_arg9='' config_arg10='' config_arg11='' PERL_REVISION=5 -PERL_VERSION=5 -PERL_SUBVERSION=670 +PERL_VERSION=6 +PERL_SUBVERSION=0 PERL_API_REVISION=5 -PERL_API_VERSION=5 -PERL_API_SUBVERSION=670 +PERL_API_VERSION=6 +PERL_API_SUBVERSION=0 CONFIGDOTSH=true # Variables propagated from previous config.sh file. pp_sys_cflags='' diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 171538e..92103a1 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -118,11 +118,15 @@ $VERSION = "1.03"; O_NDELAY O_NOCTTY O_NOFOLLOW + O_NOINHERIT O_NONBLOCK + O_RANDOM + O_RAW O_RDONLY O_RDWR O_RSRC O_RSYNC + O_SEQUENTIAL O_SHLOCK O_SYNC O_TEMPORARY diff --git a/ext/Fcntl/Fcntl.xs b/ext/Fcntl/Fcntl.xs index 8d4a073..b597e03 100644 --- a/ext/Fcntl/Fcntl.xs +++ b/ext/Fcntl/Fcntl.xs @@ -46,7 +46,7 @@ constant(char *name, int arg) errno = 0; switch (*name) { case '_': - if (strEQ(name, "_S_IFMT")) /* Yes, _S_IFMT. */ + if (strEQ(name, "_S_IFMT")) /* Yes, on name _S_IFMT return S_IFMT. */ #ifdef S_IFMT return S_IFMT; #else @@ -476,12 +476,30 @@ constant(char *name, int arg) #else goto not_there; #endif + if (strEQ(name, "O_NOINHERIT")) +#ifdef O_NOINHERIT + return O_NOINHERIT; +#else + goto not_there; +#endif if (strEQ(name, "O_NONBLOCK")) #ifdef O_NONBLOCK return O_NONBLOCK; #else goto not_there; #endif + if (strEQ(name, "O_RANDOM")) +#ifdef O_RANDOM + return O_RANDOM; +#else + goto not_there; +#endif + if (strEQ(name, "O_RAW")) +#ifdef O_RAW + return O_RAW; +#else + goto not_there; +#endif if (strEQ(name, "O_RDONLY")) #ifdef O_RDONLY return O_RDONLY; @@ -500,6 +518,12 @@ constant(char *name, int arg) #else goto not_there; #endif + if (strEQ(name, "O_SEQUENTIAL")) +#ifdef O_SEQUENTIAL + return O_SEQUENTIAL; +#else + goto not_there; +#endif if (strEQ(name, "O_SHLOCK")) #ifdef O_SHLOCK return O_SHLOCK; diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index c149ae07..cba8db2 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -68,7 +68,7 @@ case "`$cc -v 2>&1 | grep cc`" in *gcc*) ;; # pass *) # compile something small: taint.c is fine for this. # the main point is the '-v' flag of 'cc'. - case "`cc -v -I. -c taint.c -o /tmp/taint$$.o 2>&1`" in + case "`cc -v -I. -c taint.c -o taint$$.o 2>&1`" in */gemc_cc*) # we have the new DEC GEM CC _DEC_cc_style=new ;; @@ -77,7 +77,7 @@ case "`$cc -v 2>&1 | grep cc`" in ;; esac # cleanup - rm -f /tmp/taint$$.o + rm -f taint$$.o ;; esac diff --git a/hints/esix4.sh b/hints/esix4.sh index 9967207..b1d697c 100644 --- a/hints/esix4.sh +++ b/hints/esix4.sh @@ -21,8 +21,8 @@ d_suidsafe=define usevfork='false' if test "$osvers" = "3.0"; then d_gconvert='undef' - grep 'define[ ]*AF_OSI[ ]' /usr/include/sys/socket.h | grep '/\*[^*]*$' >/tmp/esix$$ - if test -s /tmp/esix$$; then + grep 'define[ ]*AF_OSI[ ]' /usr/include/sys/socket.h | grep '/\*[^*]*$' >esix$$ + if test -s esix$$; then cat <&2 WARNING: You are likely to have problems compiling the Socket extension @@ -31,6 +31,6 @@ unless you fix the unterminated comment for AF_OSI in the file EOM fi - rm -f /tmp/esix$$ + rm -f esix$$ fi diff --git a/hints/freebsd.sh b/hints/freebsd.sh index 2609261..fd60ba3 100644 --- a/hints/freebsd.sh +++ b/hints/freebsd.sh @@ -99,7 +99,11 @@ esac case "$osvers" in 0.*|1.0*) ;; -3.*|4.0*) +1*|2*) cccdlflags='-DPIC -fpic' + lddlflags="-Bshareable $lddlflags" + ;; + +*) objformat=`/usr/bin/objformat` if [ x$objformat = xelf ]; then libpth="/usr/lib /usr/local/lib" @@ -108,24 +112,23 @@ case "$osvers" in lddlflags="-shared " else if [ -e /usr/lib/aout ]; then - libpth="/usr/lib/aout /usr/local/lib /usr/lib" - glibpth="/usr/lib/aout /usr/local/lib /usr/lib" - fi - lddlflags='-Bshareable' + libpth="/usr/lib/aout /usr/local/lib /usr/lib" + glibpth="/usr/lib/aout /usr/local/lib /usr/lib" + fi + lddlflags='-Bshareable' fi cccdlflags='-DPIC -fpic' ;; - -*) cccdlflags='-DPIC -fpic' - lddlflags="-Bshareable $lddlflags" - ;; esac case "$osvers" in -4.0*) - if /usr/bin/file /usr/lib/libc.so.3 | /usr/bin/grep -vq "not stripped" ; then +0*|1*|2*|3*) ;; + +*) + if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then usenm=false fi + ;; esac cat <<'EOM' >&4 @@ -173,20 +176,15 @@ case "$usethreads" in $define|true|[yY]*) lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|tail -1` case "$osvers" in - 2.2.8*|3.*|4.*) - if [ ! -r "$lc_r" ]; then - cat <&4 -POSIX threads should be supported by FreeBSD $osvers -- -but your system is missing the shared libc_r. -(/sbin/ldconfig -r doesn't find any). + 0*|1*|2.0*|2.1*) cat <&4 +I did not know that FreeBSD $osvers supports POSIX threads. -Consider using the latest STABLE release. +Feel free to tell perlbug@perl.com otherwise. EOM - exit 1 - fi - ldflags="-pthread $ldflags" + exit 1 ;; - 2.2*) + + 2.2.[0-7]*) cat <&4 POSIX threads are not supported well by FreeBSD $osvers. @@ -199,13 +197,21 @@ or preferably to 3.something. EOM exit 1 ;; - *) cat <&4 -I did not know that FreeBSD $osvers supports POSIX threads. -Feel free to tell perlbug@perl.com otherwise. + *) + if [ ! -r "$lc_r" ]; then + cat <&4 +POSIX threads should be supported by FreeBSD $osvers -- +but your system is missing the shared libc_r. +(/sbin/ldconfig -r doesn't find any). + +Consider using the latest STABLE release. EOM - exit 1 + exit 1 + fi + ldflags="-pthread $ldflags" ;; + esac set `echo X "$libswanted "| sed -e 's/ c / c_r /'` diff --git a/hints/newsos4.sh b/hints/newsos4.sh index a33cb31..3e447a5 100644 --- a/hints/newsos4.sh +++ b/hints/newsos4.sh @@ -6,11 +6,10 @@ echo echo 'Compiling Tips:' echo 'When you have found that ld complains "multiple defined" error' echo 'on linking /lib/libdbm.a, do following instructions.' -echo ' cd /tmp (working on /tmp)' echo ' cp /lib/libdbm.a dbm.o (copy current libdbm.a)' echo ' ar cr libdbm.a dbm.o (make archive)' echo ' mv /lib/libdbm.a /lib/libdbm.a.backup (backup original library)' -echo ' cp /tmp/libdbm.a /lib (copy newer one)' +echo ' cp libdbm.a /lib (copy newer one)' echo ' ranlib /lib/libdbm.a (ranlib for later use)' echo diff --git a/lib/CGI.pm b/lib/CGI.pm index a81ac07..3e03257 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -3280,7 +3280,7 @@ my ($vol) = $MAC ? MacPerl::Volumes() =~ /:(.*)/ : ""; unless ($TMPDIRECTORY) { @TEMP=("${SL}usr${SL}tmp","${SL}var${SL}tmp", "C:${SL}temp","${SL}tmp","${SL}temp", - "${vol}${SL}Temporary Items", + "${vol}${SL}Temporary Items","${SL}sys\$scratch", "${SL}WWW_ROOT"); unshift(@TEMP,$ENV{'TMPDIR'}) if exists $ENV{'TMPDIR'}; diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 1ba5bcd..c8f41c7 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -157,7 +157,7 @@ sub _write_vms { require Config; # a reminder for once we do $^O require ExtUtils::XSSymSet; - my($isvax) = $Config::Config{'arch'} =~ /VAX/i; + my($isvax) = $Config::Config{'archname'} =~ /VAX/i; my($set) = new ExtUtils::XSSymSet; my($sym); diff --git a/pp_sys.c b/pp_sys.c index 976f5a1..90c1221 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1588,10 +1588,11 @@ PP(pp_send) djSP; dMARK; dORIGMARK; dTARGET; GV *gv; IO *io; - Off_t offset; SV *bufsv; char *buffer; - Off_t length; + Size_t length; + SSize_t retval; + IV offset; STRLEN blen; MAGIC *mg; @@ -1614,17 +1615,17 @@ PP(pp_send) goto say_undef; bufsv = *++MARK; buffer = SvPV(bufsv, blen); -#if Off_t_SIZE > IVSIZE +#if Size_t_size > IVSIZE length = SvNVx(*++MARK); #else length = SvIVx(*++MARK); #endif - if (length < 0) + if ((Size_t)length < 0) DIE(aTHX_ "Negative length"); SETERRNO(0,0); io = GvIO(gv); if (!io || !IoIFP(io)) { - length = -1; + retval = -1; if (ckWARN(WARN_CLOSED)) { if (PL_op->op_type == OP_SYSWRITE) report_closed_fh(gv, io, "syswrite", "filehandle"); @@ -1634,11 +1635,7 @@ PP(pp_send) } else if (PL_op->op_type == OP_SYSWRITE) { if (MARK < SP) { -#if Off_t_SIZE > IVSIZE - offset = SvNVx(*++MARK); -#else offset = SvIVx(*++MARK); -#endif if (offset < 0) { if (-offset > blen) DIE(aTHX_ "Offset outside string"); @@ -1651,14 +1648,14 @@ PP(pp_send) length = blen - offset; #ifdef PERL_SOCK_SYSWRITE_IS_SEND if (IoTYPE(io) == 's') { - length = PerlSock_send(PerlIO_fileno(IoIFP(io)), + retval = PerlSock_send(PerlIO_fileno(IoIFP(io)), buffer+offset, length, 0); } else #endif { /* See the note at doio.c:do_print about filesize limits. --jhi */ - length = PerlLIO_write(PerlIO_fileno(IoIFP(io)), + retval = PerlLIO_write(PerlIO_fileno(IoIFP(io)), buffer+offset, length); } } @@ -1667,20 +1664,24 @@ PP(pp_send) char *sockbuf; STRLEN mlen; sockbuf = SvPVx(*++MARK, mlen); - length = PerlSock_sendto(PerlIO_fileno(IoIFP(io)), buffer, blen, length, - (struct sockaddr *)sockbuf, mlen); + retval = PerlSock_sendto(PerlIO_fileno(IoIFP(io)), buffer, blen, + length, (struct sockaddr *)sockbuf, mlen); } else - length = PerlSock_send(PerlIO_fileno(IoIFP(io)), buffer, blen, length); + retval = PerlSock_send(PerlIO_fileno(IoIFP(io)), buffer, blen, length); #else else DIE(aTHX_ PL_no_sock_func, "send"); #endif - if (length < 0) + if (retval < 0) goto say_undef; SP = ORIGMARK; - PUSHi(length); +#if Size_t_size > IVSIZE + PUSHn(retval); +#else + PUSHi(retval); +#endif RETURN; say_undef: @@ -1826,11 +1827,24 @@ PP(pp_sysseek) PP(pp_truncate) { djSP; - Off_t len = (Off_t)POPn; + /* There seems to be no consensus on the length type of truncate() + * and ftruncate(), both off_t and size_t have supporters. In + * general one would think that when using large files, off_t is + * at least as wide as size_t, so using an off_t should be okay. */ + /* XXX Configure probe for the length type of *truncate() needed XXX */ + Off_t len; int result = 1; GV *tmpgv; STRLEN n_a; +#if Size_t_size > IVSIZE + len = (Off_t)POPn; +#else + len = (Off_t)POPi; +#endif + /* Checking for length < 0 is problematic as the type might or + * might not be signed: if it is not, clever compilers will moan. */ + /* XXX Configure probe for the signedness of the length type of *truncate() needed? XXX */ SETERRNO(0,0); #if defined(HAS_TRUNCATE) || defined(HAS_CHSIZE) || defined(F_FREESP) if (PL_op->op_flags & OPf_SPECIAL) { diff --git a/vms/subconfigure.com b/vms/subconfigure.com index af900a0..8650b0f 100644 --- a/vms/subconfigure.com +++ b/vms/subconfigure.com @@ -12,12 +12,12 @@ $! or something like that) are straightforward. Adding a new item for the $! ultimately created config.sh requires adding two lines to this file. $! $! First, a line in the format: -$! $ foo = "bar" +$! $ perl_foo = "bar" $! after the line tagged ##ADD NEW CONSTANTS HERE##. Replace foo with the $! variable name as it appears in config.sh. $! $! Second, add a line in the format: -$! $ WC "foo='" + foo + "'" +$! $ WC "foo='" + perl_foo + "'" $! after the line tagged ##WRITE NEW CONSTANTS HERE##. Careful of the $! quoting, as it can be tricky. $! @@ -69,6 +69,7 @@ $ myname = myhostname $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE") $! $! ##ADD NEW CONSTANTS HERE## +$ perl_sizesize = "4" $ perl_shmattype = "" $ perl_mmaptype = "" $ perl_gidformat = "lu" @@ -3205,6 +3206,49 @@ $ $ perl_ptrsize=line $ WRITE_RESULT "ptrsize is ''perl_ptrsize'" $! +$! Check for size_t size +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "int foo; +$ WS "foo = sizeof(size_t); +$ WS "printf(""%d\n"", foo); +$ WS "exit(0); +$ WS "}" +$ CS +$ DEFINE SYS$ERROR _NLA0: +$ DEFINE SYS$OUTPUT _NLA0: +$ ON ERROR THEN CONTINUE +$ ON WARNING THEN CONTINUE +$ 'Checkcc' temp.c +$ If Needs_Opt +$ THEN +$ link temp.obj,temp.opt/opt +$ else +$ link temp.obj +$ endif +$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ DEFINE SYS$ERROR TEMPOUT +$ DEFINE SYS$OUTPUT TEMPOUT +$ mcr []temp +$ CLOSE TEMPOUT +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ OPEN/READ TEMPOUT [-.uu]tempout.lis +$ READ TEMPOUT line +$ CLOSE TEMPOUT +$ DELETE/NOLOG [-.uu]tempout.lis; +$ +$ perl_sizesize=line +$ WRITE_RESULT "sizesize is ''perl_sizesize'" +$! $! Check rand48 and its ilk $! $ OS @@ -3961,8 +4005,10 @@ $ WC "voidflags='" + perl_voidflags + "'" $ WC "d_eunice='" + perl_d_eunice + "'" $ WC "libs='" + perl_libs + "'" $ WC "libc='" + perl_libc + "'" -$ WC "xs_apiversion='" + localperlver + "'" -$ WC "pm_apiversion='" + localperlver + "'" +$ WC "xs_apiversion='" + version + "'" +$ WC "pm_apiversion='" + version + "'" +$ WC "PERL_VERSION='" + patchlevel + "'" +$ WC "PERL_SUBVERSION='" + subversion + "'" $ WC "pager='" + perl_pager + "'" $ WC "uidtype='" + perl_uidtype + "'" $ WC "uidformat='" + perl_uidformat + "'" @@ -4195,6 +4241,7 @@ $ WC "uvuformat='" + perl_uvuformat + "'" $ WC "uvoformat='" + perl_uvoformat + "'" $ WC "uvxformat='" + perl_uvxformat + "'" $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" +$ WC "sizesize='" + perl_sizesize + "'" $! $! ##WRITE NEW CONSTANTS HERE## $! diff --git a/vos/config.def b/vos/config.def index 34f5770..10d44a2 100644 --- a/vos/config.def +++ b/vos/config.def @@ -414,6 +414,7 @@ $sitearchexp='' $sitelib='/system/ported/perl/lib/site/5.005' $sitelibexp='/system/ported/perl/lib/site/5.005' $sitelib_stem='/system/ported/perl/lib/site' +$sizesize='4' $sizetype='size_t' $socksizetype='int' $sPRIfldbl='"Lf"' diff --git a/vos/config.h b/vos/config.h index 78e5c69..55bb25f 100644 --- a/vos/config.h +++ b/vos/config.h @@ -2801,6 +2801,11 @@ #define SITELIB_EXP "/system/ported/perl/lib/site/5.005" /**/ #define SITELIB_STEM "/system/ported/perl/lib/site" /**/ +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size 4 /* */ + /* Size_t: * This symbol holds the type used to declare length parameters * for string functions. It is usually size_t, but may be diff --git a/win32/config.bc b/win32/config.bc index 32fb9d8..1b984bb 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -673,6 +673,7 @@ sitelib_stem='' sitelibexp='~INST_TOP~\site~INST_VER~\lib' siteprefix='~INST_TOP~\site~INST_VER~' siteprefixexp='~INST_TOP~\site~INST_VER~' +sizesize='4' sizetype='size_t' sleep='' smail='' diff --git a/win32/config.gc b/win32/config.gc index 950a3d7..762e792 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -673,6 +673,7 @@ sitelib_stem='' sitelibexp='~INST_TOP~\site~INST_VER~\lib' siteprefix='~INST_TOP~\site~INST_VER~' siteprefixexp='~INST_TOP~\site~INST_VER~' +sizesize='4' sizetype='size_t' sleep='' smail='' diff --git a/win32/config.vc b/win32/config.vc index 007834e..f3dff46 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -673,6 +673,7 @@ sitelib_stem='' sitelibexp='~INST_TOP~\site~INST_VER~\lib' siteprefix='~INST_TOP~\site~INST_VER~' siteprefixexp='~INST_TOP~\site~INST_VER~' +sizesize='4' sizetype='size_t' sleep='' smail='' diff --git a/win32/config_H.bc b/win32/config_H.bc index 9e89acc..41e3a3c 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -2814,6 +2814,11 @@ #define SITELIB_EXP (win32_get_sitelib("5.6.0")) /**/ #define SITELIB_STEM "" /**/ +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size $sizesize /* */ + /* Size_t: * This symbol holds the type used to declare length parameters * for string functions. It is usually size_t, but may be diff --git a/win32/config_H.gc b/win32/config_H.gc index 062e7ec..baf02fe 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -2814,6 +2814,11 @@ #define SITELIB_EXP (win32_get_sitelib("5.6.0")) /**/ #define SITELIB_STEM "" /**/ +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size $sizesize /* */ + /* Size_t: * This symbol holds the type used to declare length parameters * for string functions. It is usually size_t, but may be diff --git a/win32/config_H.vc b/win32/config_H.vc index 2f278d9..028914d 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -2814,6 +2814,11 @@ #define SITELIB_EXP (win32_get_sitelib("5.6.0")) /**/ #define SITELIB_STEM "" /**/ +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size $sizesize /* */ + /* Size_t: * This symbol holds the type used to declare length parameters * for string functions. It is usually size_t, but may be