diff options
-rwxr-xr-x | Configure | 56 | ||||
-rw-r--r-- | Porting/Glossary | 24 | ||||
-rw-r--r-- | Porting/config.sh | 13 | ||||
-rw-r--r-- | Porting/config_H | 16 | ||||
-rw-r--r-- | config_h.SH | 31 | ||||
-rw-r--r-- | configure.com | 2 | ||||
-rw-r--r-- | epoc/config.sh | 2 | ||||
-rw-r--r-- | ext/DB_File/DB_File.xs | 7 | ||||
-rw-r--r-- | perl.h | 7 | ||||
-rw-r--r-- | pod/perlapi.pod | 3 | ||||
-rw-r--r-- | pod/perltoc.pod | 217 | ||||
-rw-r--r-- | uconfig.h | 31 | ||||
-rwxr-xr-x | uconfig.sh | 7 | ||||
-rw-r--r-- | util.c | 55 | ||||
-rw-r--r-- | vos/config.alpha.def | 2 | ||||
-rw-r--r-- | win32/config.bc | 2 | ||||
-rw-r--r-- | win32/config.gc | 2 | ||||
-rw-r--r-- | win32/config.vc | 2 |
18 files changed, 330 insertions, 149 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Thu May 31 16:30:15 EET DST 2001 [metaconfig 3.0 PL70] +# Generated on Fri Jun 1 19:20:32 EET DST 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <<EOF @@ -478,6 +478,7 @@ d_seekdir='' d_telldir='' d_readlink='' d_readv='' +d_realpath='' d_recvmsg='' d_rename='' d_rmdir='' @@ -544,6 +545,7 @@ socketlib='' d_socklen_t='' d_socks5_init='' d_sqrtl='' +d_sresuproto='' d_statblks='' d_statfs_f_flags='' d_statfs_s='' @@ -636,6 +638,9 @@ h_sysfile='' i_arpainet='' db_hashtype='' db_prefixtype='' +db_version_major='' +db_version_minor='' +db_version_patch='' i_db='' i_dbm='' i_rpcsvcdbm='' @@ -3219,6 +3224,15 @@ case "$ccname" in '') ccname="$cc" ;; esac +case "$gccversion" in +'') ;; +*) case "$ccflags" in + *-Wall*) ;; + *) ccflags="$ccflags -Wall -ansi" ;; + esac + ;; +esac + : see how we invoke the C preprocessor echo " " echo "Now, how can we feed standard input to your C preprocessor..." >&4 @@ -11049,6 +11063,10 @@ eval $inlibc set readv d_readv eval $inlibc +: see if realpath exists +set realpath d_realpath +eval $inlibc + : see if recvmsg exists set recvmsg d_recvmsg eval $inlibc @@ -11864,6 +11882,11 @@ eval $inlibc set socks5_init d_socks5_init eval $inlibc +: see if prototype for setresuid is available +echo " " +set d_sresuproto setresuid $i_unistd unistd.h +eval $hasproto + : see if sys/stat.h is available set sys/stat.h i_sysstat eval $inhdr @@ -13012,13 +13035,19 @@ $define) #include <sys/types.h> #include <stdio.h> #include <db.h> -int main() +int main(int argc, char *argv[]) { #ifdef DB_VERSION_MAJOR /* DB version >= 2 */ int Major, Minor, Patch ; unsigned long Version ; (void)db_version(&Major, &Minor, &Patch) ; - printf("You have Berkeley DB Version 2 or greater\n"); + if (argc == 2) { + printf("%d %d %d %d %d %d\n", + DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, + Major, Minor, Patch); + exit(0); + } + printf("You have Berkeley DB Version 2 or greater.\n"); printf("db.h is from Berkeley DB Version %d.%d.%d\n", DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH); @@ -13027,11 +13056,11 @@ int main() /* check that db.h & libdb are compatible */ if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) { - printf("db.h and libdb are incompatible\n") ; + printf("db.h and libdb are incompatible.\n") ; exit(3); } - printf("db.h and libdb are compatible\n") ; + printf("db.h and libdb are compatible.\n") ; Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000 + DB_VERSION_PATCH ; @@ -13039,14 +13068,18 @@ int main() /* needs to be >= 2.3.4 */ if (Version < 2003004) { /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */ - printf("but Perl needs Berkeley DB 2.3.4 or greater\n") ; + printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ; exit(2); } exit(0); #else #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC) - printf("You have Berkeley DB Version 1\n"); + if (argc == 2) { + printf("1 0 0\n"); + exit(0); + } + printf("You have Berkeley DB Version 1.\n"); exit(0); /* DB version < 2: the coast is clear. */ #else exit(1); /* <db.h> not Berkeley DB? */ @@ -13057,6 +13090,10 @@ EOCP set try if eval $compile_ok && ./try; then echo 'Looks OK.' >&4 + set `./try 1` + db_version_major=$1 + db_version_minor=$2 + db_version_patch=$3 else echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4 i_db=$undef @@ -16360,6 +16397,7 @@ d_quad='$d_quad' d_readdir='$d_readdir' d_readlink='$d_readlink' d_readv='$d_readv' +d_realpath='$d_realpath' d_recvmsg='$d_recvmsg' d_rename='$d_rename' d_rewinddir='$d_rewinddir' @@ -16420,6 +16458,7 @@ d_socklen_t='$d_socklen_t' d_sockpair='$d_sockpair' d_socks5_init='$d_socks5_init' d_sqrtl='$d_sqrtl' +d_sresuproto='$d_sresuproto' d_statblks='$d_statblks' d_statfs_f_flags='$d_statfs_f_flags' d_statfs_s='$d_statfs_s' @@ -16486,6 +16525,9 @@ d_xenix='$d_xenix' date='$date' db_hashtype='$db_hashtype' db_prefixtype='$db_prefixtype' +db_version_major='$db_version_major' +db_version_minor='$db_version_minor' +db_version_patch='$db_version_patch' defvoidused='$defvoidused' direntrytype='$direntrytype' dlext='$dlext' diff --git a/Porting/Glossary b/Porting/Glossary index 4f7aa8e346..d903a74e5d 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -1244,6 +1244,10 @@ 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_realpath (d_realpath.U): + This variable conditionally defines the HAS_REALPATH symbol, which + indicates to the C program that the realpath() routine is available. + d_recvmsg (d_recvmsg.U): This variable conditionally defines the HAS_RECVMSG symbol, which indicates to the C program that the recvmsg() routine is available. @@ -1513,6 +1517,12 @@ d_sqrtl (d_sqrtl.U): This variable conditionally defines the HAS_SQRTL symbol, which indicates to the C program that the sqrtl() routine is available. +d_sresuproto (d_sresuproto.U): + This variable conditionally defines the HAS_SETRESUID_PROTO symbol, + which indicates to the C program that the system provides + a prototype for the setresuid() function. Otherwise, it is + up to the program to supply one. + d_statblks (d_statblks.U): This variable conditionally defines USE_STAT_BLOCKS if this system has a stat structure declaring @@ -1806,6 +1816,20 @@ db_prefixtype (i_db.U): in the <db.h> header file. In older versions of DB, it was int, while in newer ones it is size_t. +db_version_major (i_db.U): + This variable contains the major version number of + Berkeley DB found in the <db.h> header file. + +db_version_minor (i_db.U): + This variable contains the minor version number of + Berkeley DB found in the <db.h> header file. + For DB version 1 this is always 0. + +db_version_patch (i_db.U): + This variable contains the patch version number of + Berkeley DB found in the <db.h> header file. + For DB version 1 this is always 0. + defvoidused (voidflags.U): This variable contains the default value of the VOIDUSED symbol (15). diff --git a/Porting/config.sh b/Porting/config.sh index ca43a3c908..69cb395140 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Wed May 30 17:57:39 EET DST 2001 +# Configuration time: Fri Jun 1 18:23:33 EET DST 2001 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -63,7 +63,7 @@ ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_ ccversion='V5.6-082' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Wed May 30 17:57:39 EET DST 2001' +cf_time='Fri Jun 1 18:23:33 EET DST 2001' charsize='1' chgrp='' chmod='' @@ -285,6 +285,7 @@ d_quad='define' d_readdir='define' d_readlink='define' d_readv='define' +d_realpath='define' d_recvmsg='define' d_rename='define' d_rewinddir='define' @@ -345,6 +346,7 @@ d_socklen_t='undef' d_sockpair='define' d_socks5_init='undef' d_sqrtl='define' +d_sresuproto='undef' d_statblks='define' d_statfs_f_flags='define' d_statfs_s='define' @@ -411,6 +413,9 @@ d_xenix='undef' date='date' db_hashtype='u_int32_t' db_prefixtype='size_t' +db_version_major='1' +db_version_minor='0' +db_version_patch='0' defvoidused='15' direntrytype='struct dirent' dlext='so' @@ -658,7 +663,7 @@ patchlevel='7' path_sep=':' perl5='/u/vieraat/vieraat/jhi/Perl/bin/perl' perl='' -perl_patchlevel='10297' +perl_patchlevel='10358' perladmin='yourname@yourhost.yourplace.com' perllibs='-lm -liconv -lutil -lpthread -lexc' perlpath='/opt/perl/bin/perl' @@ -853,7 +858,7 @@ PERL_SUBVERSION=1 PERL_API_REVISION=5 PERL_API_VERSION=5 PERL_API_SUBVERSION=0 -PERL_PATCHLEVEL=10297 +PERL_PATCHLEVEL=10358 PERL_CONFIG_SH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' diff --git a/Porting/config_H b/Porting/config_H index 6efeb6308d..da74ef0c4c 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Wed May 30 17:57:39 EET DST 2001 + * Configuration time: Fri Jun 1 18:23:33 EET DST 2001 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -3319,6 +3319,12 @@ #define PERL_XS_APIVERSION "5.7.1" #define PERL_PM_APIVERSION "5.005" +/* HAS_REALPATH: + * This symbol, if defined, indicates that the realpath routine is + * available to do resolve paths. + */ +#define HAS_REALPATH /**/ + /* HAS_SIGPROCMASK: * This symbol, if defined, indicates that the sigprocmask * system call is available to examine or change the signal mask @@ -3332,6 +3338,14 @@ */ /*#define HAS_SOCKATMARK / **/ +/* HAS_SETRESUID_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the setresuid() function. Otherwise, it is up + * to the program to supply one. Good guesses are + * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid); + */ +/*#define HAS_SETRESUID_PROTO / **/ + /* HAS_STRFTIME: * This symbol, if defined, indicates that the strftime routine is * available to do time formatting. diff --git a/config_h.SH b/config_h.SH index c0a9146cf0..328ad4b858 100644 --- a/config_h.SH +++ b/config_h.SH @@ -2431,8 +2431,25 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * in the <db.h> header file. In older versions of DB, it was * int, while in newer ones it is size_t. */ +/* DB_VERSION_MAJOR_CFG: + * This symbol, if defined, defines the major version number of + * Berkeley DB found in the <db.h> header when Perl was configured. + */ +/* DB_VERSION_MINOR_CFG: + * This symbol, if defined, defines the minor version number of + * Berkeley DB found in the <db.h> header when Perl was configured. + * For DB version 1 this is always 0. + */ +/* DB_VERSION_PATCH_CFG: + * This symbol, if defined, defines the patch version number of + * Berkeley DB found in the <db.h> header when Perl was configured. + * For DB version 1 this is always 0. + */ #define DB_Hash_t $db_hashtype /**/ #define DB_Prefix_t $db_prefixtype /**/ +#define DB_VERSION_MAJOR_CFG $db_version_major /**/ +#define DB_VERSION_MINOR_CFG $db_version_minor /**/ +#define DB_VERSION_PATCH_CFG $db_version_patch /**/ /* I_GRP: * This symbol, if defined, indicates to the C program that it should @@ -3339,6 +3356,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define PERL_XS_APIVERSION "$xs_apiversion" #define PERL_PM_APIVERSION "$pm_apiversion" +/* HAS_REALPATH: + * This symbol, if defined, indicates that the realpath routine is + * available to do resolve paths. + */ +#$d_realpath HAS_REALPATH /**/ + /* HAS_SIGPROCMASK: * This symbol, if defined, indicates that the sigprocmask * system call is available to examine or change the signal mask @@ -3352,6 +3375,14 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_sockatmark HAS_SOCKATMARK /**/ +/* HAS_SETRESUID_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the setresuid() function. Otherwise, it is up + * to the program to supply one. Good guesses are + * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid); + */ +#$d_sresuproto HAS_SETRESUID_PROTO /**/ + /* HAS_STRFTIME: * This symbol, if defined, indicates that the strftime routine is * available to do time formatting. diff --git a/configure.com b/configure.com index 3beba6980f..03a9465468 100644 --- a/configure.com +++ b/configure.com @@ -5197,6 +5197,8 @@ $ WC "d_setproctitle='" + d_setproctitle + "'" $ WC "d_setpwent='define'" $ WC "d_setregid='undef'" $ WC "d_setresgid='undef'" +$ WC "d_sresproto='undef'" +$ WC "d_sresgproto='undef'" $ WC "d_setresuid='undef'" $ WC "d_setreuid='undef'" $ WC "d_setrgid='undef'" diff --git a/epoc/config.sh b/epoc/config.sh index 28959ce00b..8b4399a6c8 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -312,6 +312,8 @@ d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' +d_sresproto='undef' +d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index f84f55069c..8a9ce8a2b6 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -118,10 +118,15 @@ # define DEFSV GvSV(defgv) #endif +/* Mention DB_VERSION_MAJOR_CFG, DB_VERSION_MINOR_CFG, and + DB_VERSION_PATCH_CFG here so that Configure pulls them all in. */ + /* Being the Berkeley DB we prefer the <sys/cdefs.h> (which will be * shortly #included by the <db.h>) __attribute__ to the possibly * already defined __attribute__, for example by GNUC or by Perl. */ +#if DB_VERSION_MAJOR_CFG < 2 + #undef __attribute__ /* Since we dropped the gccish definition of __attribute__ we will want @@ -131,6 +136,8 @@ #undef dNOOP #define dNOOP extern int Perl___notused +#endif + /* If Perl has been compiled with Threads support,the symbol op will be defined here. This clashes with a field name in db.h, so get rid of it. */ @@ -2487,6 +2487,13 @@ I32 unlnk (char*); #define UNLINK PerlLIO_unlink #endif +#ifndef HAS_SETRESUID_PROTO /* some versions of glibc */ +int setresuid(uid_t ruid, uid_t euid, uid_t suid); +#endif +#ifndef HAS_SETRESUID_PROTO /* some versions of glibc */ +int setresgid(gid_t rgid, gid_t egid, gid_t sgid); +#endif + #ifndef HAS_SETREUID # ifdef HAS_SETRESUID # define setreuid(r,e) setresuid(r,e,(Uid_t)-1) diff --git a/pod/perlapi.pod b/pod/perlapi.pod index aa72c9c9f9..5f0a584e58 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -2905,9 +2905,8 @@ Found in file sv.c =item sv_realpath -Emulate realpath(3) +Wrap or emulate realpath(3). -XXX: add configure test for realpath(3) and prefer if available int sv_realpath(SV* sv, char *path, STRLEN len) =for hackers diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 35e70e3c46..1240ef2e41 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -881,7 +881,7 @@ listing =item Predefined Names -$ARG, $_, $<I<digits>>, $MATCH, $&, $PREMATCH, $`, $POSTMATCH, $', +$ARG, $_, $a, $b, $<I<digits>>, $MATCH, $&, $PREMATCH, $`, $POSTMATCH, $', $LAST_PAREN_MATCH, $+, @LAST_MATCH_END, @+, $MULTILINE_MATCHING, $*, input_line_number HANDLE EXPR, $INPUT_LINE_NUMBER, $NR, $, input_record_separator HANDLE EXPR, $INPUT_RECORD_SEPARATOR, $RS, $/, @@ -908,8 +908,8 @@ $DEBUGGING, $^D, $SYSTEM_FD_MAX, $^F, $^H, %^H, $INPLACE_EDIT, $^I, $^M, $OSNAME, $^O, $PERLDB, $^P, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, $LAST_REGEXP_CODE_RESULT, $^R, $EXCEPTIONS_BEING_CAUGHT, $^S, $BASETIME, $^T, $PERL_VERSION, $^V, $WARNING, $^W, ${^WARNING_BITS}, -${^WIDE_SYSTEM_CALLS}, $EXECUTABLE_NAME, $^X, $ARGV, @ARGV, @INC, @_, %INC, -%ENV, $ENV{expr}, %SIG, $SIG{expr} +${^WIDE_SYSTEM_CALLS}, $EXECUTABLE_NAME, $^X, $ARGV, @ARGV, @F, @INC, @_, +%INC, %ENV, $ENV{expr}, %SIG, $SIG{expr} =item Error Indicators @@ -2203,9 +2203,9 @@ CGI::Fast, CGI::Pretty, CGI::Push, CGI::Switch, CGI::Util, CPAN, CPAN::FirstTime, CPAN::Nox, Carp, Carp::Heavy, Class::ISA, Class::Struct, Cwd, DB, DB_File, Devel::SelfStubber, Digest, DirHandle, Dumpvalue, Encode, Encode::EncodeFormat, Encode::Tcl, English, Env, Exporter, Exporter::Heavy, -ExtUtils::Command, ExtUtils::Embed, ExtUtils::Install, ExtUtils::Installed, -ExtUtils::Liblist, ExtUtils::MM_Cygwin, ExtUtils::MM_OS2, -ExtUtils::MM_Unix, ExtUtils::MM_VMS, ExtUtils::MM_Win32, +ExtUtils::Command, ExtUtils::Constant, ExtUtils::Embed, ExtUtils::Install, +ExtUtils::Installed, ExtUtils::Liblist, ExtUtils::MM_Cygwin, +ExtUtils::MM_OS2, ExtUtils::MM_Unix, ExtUtils::MM_VMS, ExtUtils::MM_Win32, ExtUtils::MakeMaker, ExtUtils::Manifest, ExtUtils::Mkbootstrap, ExtUtils::Mksymlists, ExtUtils::Packlist, ExtUtils::testlib, Fatal, Fcntl, File::Basename, File::CheckTree, File::Compare, File::Copy, File::DosGlob, @@ -2213,11 +2213,12 @@ File::Find, File::Path, File::Spec, File::Spec::Epoc, File::Spec::Functions, File::Spec::Mac, File::Spec::OS2, File::Spec::Unix, File::Spec::VMS, File::Spec::Win32, File::Temp, File::stat, FileCache, FileHandle, Filter::Simple, FindBin, Getopt::Long, Getopt::Std, -I18N::Collate, IO, IPC::Open2, IPC::Open3, Locale::Constants, -Locale::Country, Locale::Currency, Locale::Language, Math::BigFloat, -Math::BigInt, Math::Complex, Math::Trig, NDBM_File, NEXT, Net::Ping, -Net::hostent, Net::netent, Net::protoent, Net::servent, O, ODBM_File, -Opcode, POSIX, PerlIO, Pod::Checker, Pod::Find, Pod::Html, +I18N::Collate, I18N::LangTags, I18N::LangTags::List, IO, IPC::Open2, +IPC::Open3, Locale::Constants, Locale::Country, Locale::Currency, +Locale::Language, Locale::Maketext, Locale::Maketext::TPJ13, +Math::BigFloat, Math::BigInt, Math::Complex, Math::Trig, NDBM_File, NEXT, +Net::Ping, Net::hostent, Net::netent, Net::protoent, Net::servent, O, +ODBM_File, Opcode, POSIX, PerlIO, Pod::Checker, Pod::Find, Pod::Html, Pod::InputObjects, Pod::LaTeX, Pod::Man, Pod::ParseUtils, Pod::Parser, Pod::Plainer, Pod::Select, Pod::Text, Pod::Text::Color, Pod::Text::Overstrike, Pod::Text::Termcap, Pod::Usage, SDBM_File, Safe, @@ -3900,28 +3901,29 @@ SvNOK_off, SvNOK_on, SvNOK_only, SvNV, SvNVX, SvOK, SvOOK, SvPOK, SvPOKp, SvPOK_off, SvPOK_on, SvPOK_only, SvPOK_only_UTF8, SvPV, SvPVX, SvPV_force, SvPV_nolen, SvREFCNT, SvREFCNT_dec, SvREFCNT_inc, SvROK, SvROK_off, SvROK_on, SvRV, SvSETMAGIC, SvSetSV, SvSetSV_nosteal, SvSTASH, SvTAINT, -SvTAINTED, SvTAINTED_off, SvTAINTED_on, SvTRUE, SvTYPE, svtype, SVt_IV, +SvTAINTED, SvTAINTED_off, SvTAINTED_on, SvTRUE, svtype, SvTYPE, SVt_IV, SVt_NV, SVt_PV, SVt_PVAV, SVt_PVCV, SVt_PVHV, SVt_PVMG, SvUOK, SvUPGRADE, SvUTF8, SvUTF8_off, SvUTF8_on, SvUV, SvUVX, sv_2mortal, sv_bless, sv_catpv, sv_catpvf, sv_catpvf_mg, sv_catpvn, sv_catpvn_flags, sv_catpvn_mg, sv_catpv_mg, sv_catsv, sv_catsv_flags, sv_catsv_mg, sv_chop, sv_clear, -sv_cmp, sv_cmp_locale, sv_dec, sv_derived_from, sv_eq, sv_free, sv_gets, -sv_grow, sv_inc, sv_insert, sv_isa, sv_isobject, sv_len, sv_len_utf8, -sv_magic, sv_mortalcopy, sv_newmortal, sv_pvn_force, sv_pvn_force_flags, -sv_pvutf8n_force, sv_reftype, sv_replace, sv_rvweaken, sv_setiv, -sv_setiv_mg, sv_setnv, sv_setnv_mg, sv_setpv, sv_setpvf, sv_setpvf_mg, -sv_setpviv, sv_setpviv_mg, sv_setpvn, sv_setpvn_mg, sv_setpv_mg, -sv_setref_iv, sv_setref_nv, sv_setref_pv, sv_setref_pvn, sv_setref_uv, -sv_setsv, sv_setsv_flags, sv_setsv_mg, sv_setuv, sv_setuv_mg, sv_true, -sv_unmagic, sv_unref, sv_unref_flags, sv_upgrade, sv_usepvn, sv_usepvn_mg, -sv_utf8_decode, sv_utf8_downgrade, sv_utf8_encode, sv_utf8_upgrade, -sv_utf8_upgrade_flags, sv_vcatpvfn, sv_vsetpvfn, THIS, toLOWER, toUPPER, -utf8n_to_uvchr, utf8n_to_uvuni, utf8_distance, utf8_hop, utf8_length, -utf8_to_bytes, utf8_to_uvchr, utf8_to_uvuni, uvchr_to_utf8, uvuni_to_utf8, -warn, XPUSHi, XPUSHn, XPUSHp, XPUSHs, XPUSHu, XS, XSRETURN, XSRETURN_EMPTY, -XSRETURN_IV, XSRETURN_NO, XSRETURN_NV, XSRETURN_PV, XSRETURN_UNDEF, -XSRETURN_YES, XST_mIV, XST_mNO, XST_mNV, XST_mPV, XST_mUNDEF, XST_mYES, -XS_VERSION, XS_VERSION_BOOTCHECK, Zero +sv_cmp, sv_cmp_locale, sv_dec, sv_derived_from, sv_eq, sv_free, sv_getcwd, +sv_gets, sv_grow, sv_inc, sv_insert, sv_isa, sv_isobject, sv_len, +sv_len_utf8, sv_magic, sv_mortalcopy, sv_newmortal, sv_pvn_force, +sv_pvn_force_flags, sv_pvutf8n_force, sv_realpath, sv_reftype, sv_replace, +sv_rvweaken, sv_setiv, sv_setiv_mg, sv_setnv, sv_setnv_mg, sv_setpv, +sv_setpvf, sv_setpvf_mg, sv_setpviv, sv_setpviv_mg, sv_setpvn, +sv_setpvn_mg, sv_setpv_mg, sv_setref_iv, sv_setref_nv, sv_setref_pv, +sv_setref_pvn, sv_setref_uv, sv_setsv, sv_setsv_flags, sv_setsv_mg, +sv_setuv, sv_setuv_mg, sv_true, sv_unmagic, sv_unref, sv_unref_flags, +sv_upgrade, sv_usepvn, sv_usepvn_mg, sv_utf8_decode, sv_utf8_downgrade, +sv_utf8_encode, sv_utf8_upgrade, sv_utf8_upgrade_flags, sv_vcatpvfn, +sv_vsetpvfn, THIS, toLOWER, toUPPER, utf8n_to_uvchr, utf8n_to_uvuni, +utf8_distance, utf8_hop, utf8_length, utf8_to_bytes, utf8_to_uvchr, +utf8_to_uvuni, uvchr_to_utf8, uvuni_to_utf8, warn, XPUSHi, XPUSHn, XPUSHp, +XPUSHs, XPUSHu, XS, XSRETURN, XSRETURN_EMPTY, XSRETURN_IV, XSRETURN_NO, +XSRETURN_NV, XSRETURN_PV, XSRETURN_UNDEF, XSRETURN_YES, XST_mIV, XST_mNO, +XST_mNV, XST_mPV, XST_mUNDEF, XST_mYES, XS_VERSION, XS_VERSION_BOOTCHECK, +Zero =item AUTHORS @@ -5869,50 +5871,6 @@ Source, Compiled Module Source, Perl Modules/Scripts =back -=head2 perldos - Perl under DOS, W31, W95. - -=over 4 - -=item SYNOPSIS - -=item DESCRIPTION - -=over 4 - -=item Prerequisites - -DJGPP, Pthreads - -=item Shortcomings of Perl under DOS - -=item Building - -=item Testing - -=item Installation - -=back - -=item BUILDING AND INSTALLING MODULES - -=over 4 - -=item Building Prerequisites - -=item Unpacking CPAN Modules - -=item Building Non-XS Modules - -=item Building XS Modules - -=back - -=item AUTHOR - -=item SEE ALSO - -=back - =head2 perlepoc, README.epoc - Perl for EPOC =over 4 @@ -6632,48 +6590,6 @@ LIST, waitpid PID,FLAGS =back -=head2 perlwin32 - Perl under Win32 - -=over 4 - -=item SYNOPSIS - -=item DESCRIPTION - -=over 4 - -=item Setting Up - -Make, Command Shell, Borland C++, Microsoft Visual C++, Mingw32 with GCC - -=item Building - -=item Testing - -=item Installation - -=item Usage Hints - -Environment Variables, File Globbing, Using perl from the command line, -Building Extensions, Command-line Wildcard Expansion, Win32 Specific -Extensions, Running Perl Scripts, Miscellaneous Things - -=back - -=item BUGS AND CAVEATS - -=item AUTHORS - -Gary Ng E<lt>71564.1743@CompuServe.COME<gt>, Gurusamy Sarathy -E<lt>gsar@activestate.comE<gt>, Nick Ing-Simmons -E<lt>nick@ing-simmons.netE<gt> - -=item SEE ALSO - -=item HISTORY - -=back - =head1 PRAGMA DOCUMENTATION =head2 attrs - set/get attributes of a subroutine (deprecated) @@ -8491,9 +8407,10 @@ C<_a>, C<_exe>, C<_o> =item a -C<afs>, C<alignbytes>, C<ansi2knr>, C<aphostname>, C<api_revision>, -C<api_subversion>, C<api_version>, C<api_versionstring>, C<ar>, C<archlib>, -C<archlibexp>, C<archname64>, C<archname>, C<archobjs>, C<awk> +C<afs>, C<afsroot>, C<alignbytes>, C<ansi2knr>, C<aphostname>, +C<api_revision>, C<api_subversion>, C<api_version>, C<api_versionstring>, +C<ar>, C<archlib>, C<archlibexp>, C<archname64>, C<archname>, C<archobjs>, +C<awk> =item b @@ -8553,8 +8470,8 @@ C<d_PRIgldbl>, C<d_PRIGUldbl>, C<d_PRIi64>, C<d_PRIo64>, C<d_PRIu64>, C<d_PRIx64>, C<d_PRIXU64>, C<d_pthread_yield>, C<d_pwage>, C<d_pwchange>, C<d_pwclass>, C<d_pwcomment>, C<d_pwexpire>, C<d_pwgecos>, C<d_pwpasswd>, C<d_pwquota>, C<d_qgcvt>, C<d_quad>, C<d_readdir>, C<d_readlink>, -C<d_readv>, C<d_recvmsg>, C<d_rename>, C<d_rewinddir>, C<d_rmdir>, -C<d_safebcpy>, C<d_safemcpy>, C<d_sanemcmp>, C<d_sbrkproto>, +C<d_readv>, C<d_realpath>, C<d_recvmsg>, C<d_rename>, C<d_rewinddir>, +C<d_rmdir>, C<d_safebcpy>, C<d_safemcpy>, C<d_sanemcmp>, C<d_sbrkproto>, C<d_sched_yield>, C<d_scm_rights>, C<d_SCNfldbl>, C<d_seekdir>, C<d_select>, C<d_sem>, C<d_semctl>, C<d_semctl_semid_ds>, C<d_semctl_semun>, C<d_semget>, C<d_semop>, C<d_sendmsg>, C<d_setegid>, @@ -8566,9 +8483,9 @@ C<d_setreuid>, C<d_setrgid>, C<d_setruid>, C<d_setsent>, C<d_setsid>, C<d_setvbuf>, C<d_sfio>, C<d_shm>, C<d_shmat>, C<d_shmatprototype>, C<d_shmctl>, C<d_shmdt>, C<d_shmget>, C<d_sigaction>, C<d_sigprocmask>, C<d_sigsetjmp>, C<d_sockatmark>, C<d_socket>, C<d_socklen_t>, -C<d_sockpair>, C<d_socks5_init>, C<d_sqrtl>, C<d_statblks>, -C<d_statfs_f_flags>, C<d_statfs_s>, C<d_statvfs>, C<d_stdio_cnt_lval>, -C<d_stdio_ptr_lval>, C<d_stdio_ptr_lval_nochange_cnt>, +C<d_sockpair>, C<d_socks5_init>, C<d_sqrtl>, C<d_sresuproto>, +C<d_statblks>, C<d_statfs_f_flags>, C<d_statfs_s>, C<d_statvfs>, +C<d_stdio_cnt_lval>, C<d_stdio_ptr_lval>, C<d_stdio_ptr_lval_nochange_cnt>, C<d_stdio_ptr_lval_sets_cnt>, C<d_stdio_stream_array>, C<d_stdiobase>, C<d_stdstdio>, C<d_strchr>, C<d_strcoll>, C<d_strctcpy>, C<d_strerrm>, C<d_strerror>, C<d_strftime>, C<d_strtod>, C<d_strtol>, C<d_strtold>, @@ -8581,8 +8498,9 @@ C<d_uname>, C<d_union_semun>, C<d_usleep>, C<d_ustat>, C<d_vendorarch>, C<d_vendorbin>, C<d_vendorlib>, C<d_vfork>, C<d_void_closedir>, C<d_voidsig>, C<d_voidtty>, C<d_volatile>, C<d_vprintf>, C<d_wait4>, C<d_waitpid>, C<d_wcstombs>, C<d_wctomb>, C<d_writev>, C<d_xenix>, C<date>, -C<db_hashtype>, C<db_prefixtype>, C<defvoidused>, C<direntrytype>, -C<dlext>, C<dlsrc>, C<doublesize>, C<drand01>, C<dynamic_ext> +C<db_hashtype>, C<db_prefixtype>, C<db_version_major>, C<db_version_minor>, +C<db_version_patch>, C<defvoidused>, C<direntrytype>, C<dlext>, C<dlsrc>, +C<doublesize>, C<drand01>, C<dynamic_ext> =item e @@ -8669,7 +8587,7 @@ C<orderlib>, C<osname>, C<osvers>, C<otherlibdirs> =item p C<package>, C<pager>, C<passcat>, C<patchlevel>, C<path_sep>, C<perl5>, -C<perl> +C<perl>, C<perl_patchlevel> =item P @@ -14151,14 +14069,32 @@ C<tkRunning>, C<ornaments>, C<newTTY> =item DESCRIPTION +=over 4 + +=item Functions + +B<plan> + +=back + +=back + +B<_to_value> + +B<ok> + +=over 4 + =item TEST TYPES NORMAL TESTS, SKIPPED TESTS, TODO TESTS -=item RETURN VALUE - =item ONFAIL +=item BUGS and CAVEATS + +=item TODO + =item SEE ALSO =item AUTHOR @@ -14179,10 +14115,29 @@ NORMAL TESTS, SKIPPED TESTS, TODO TESTS B<'1..M'>, B<'ok', 'not ok'. Ok?>, B<test numbers>, B<$Test::Harness::verbose>, B<$Test::Harness::switches>, B<Skipping tests>, -B<Todo tests>, B<Bail out!>, B<Comments> +B<Todo tests>, B<Bail out!>, B<Comments>, B<Anything else> + +=item Failure + +B<Failed Test>, B<Stat>, B<Wstat>, B<Total>, B<Fail>, B<Failed>, B<List of +Failed> + +=item Functions + +B<runtests> + +=back =back +B<_globdir> + +B<_run_all_tests> + +B<_mk_leader> + +=over 4 + =item EXPORT =item DIAGNOSTICS @@ -14198,10 +14153,14 @@ C<HARNESS_IGNORE_EXITCODE>, C<HARNESS_NOTTY>, C<HARNESS_COMPILE_TEST>, C<HARNESS_FILELEAK_IN_DIR>, C<HARNESS_PERL_SWITCHES>, C<HARNESS_COLUMNS>, C<HARNESS_ACTIVE> +=item EXAMPLE + =item SEE ALSO =item AUTHORS +=item TODO + =item BUGS =back @@ -2407,8 +2407,25 @@ * in the <db.h> header file. In older versions of DB, it was * int, while in newer ones it is size_t. */ +/* DB_VERSION_MAJOR_CFG: + * This symbol, if defined, defines the major version number of + * Berkeley DB found in the <db.h> header when Perl was configured. + */ +/* DB_VERSION_MINOR_CFG: + * This symbol, if defined, defines the minor version number of + * Berkeley DB found in the <db.h> header when Perl was configured. + * For DB version 1 this is always 0. + */ +/* DB_VERSION_PATCH_CFG: + * This symbol, if defined, defines the patch version number of + * Berkeley DB found in the <db.h> header when Perl was configured. + * For DB version 1 this is always 0. + */ #define DB_Hash_t u_int32_t /**/ #define DB_Prefix_t size_t /**/ +#define DB_VERSION_MAJOR_CFG /**/ +#define DB_VERSION_MINOR_CFG /**/ +#define DB_VERSION_PATCH_CFG /**/ /* I_GRP: * This symbol, if defined, indicates to the C program that it should @@ -3315,6 +3332,12 @@ #define PERL_XS_APIVERSION "5.005" #define PERL_PM_APIVERSION "5.005" +/* HAS_REALPATH: + * This symbol, if defined, indicates that the realpath routine is + * available to do resolve paths. + */ +/*#define HAS_REALPATH / **/ + /* HAS_SIGPROCMASK: * This symbol, if defined, indicates that the sigprocmask * system call is available to examine or change the signal mask @@ -3328,6 +3351,14 @@ */ /*#define HAS_SOCKATMARK / **/ +/* HAS_SETRESUID_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the setresuid() function. Otherwise, it is up + * to the program to supply one. Good guesses are + * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid); + */ +/*#define HAS_SETRESUID_PROTO / **/ + /* HAS_STRFTIME: * This symbol, if defined, indicates that the strftime routine is * available to do time formatting. diff --git a/uconfig.sh b/uconfig.sh index 3a6bd0483e..4b6e2a679d 100755 --- a/uconfig.sh +++ b/uconfig.sh @@ -52,8 +52,8 @@ d_chown='undef' d_chroot='undef' d_chsize='undef' d_closedir='undef' -d_const='undef' d_cmsghdr_s='undef' +d_const='undef' d_crypt='undef' d_csh='undef' d_cuserid='undef' @@ -216,6 +216,7 @@ d_quad='undef' d_readdir='undef' d_readlink='undef' d_readv='undef' +d_realpath='undef' d_recvmsg='undef' d_rename='undef' d_rewinddir='undef' @@ -276,6 +277,8 @@ d_socklen_t='undef' d_sockpair='undef' d_socks5_init='undef' d_sqrtl='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_statblks='undef' d_statfs_f_flags='undef' d_statfs_s='undef' @@ -569,12 +572,12 @@ usesocks='undef' usethreads='undef' usevendorprefix='undef' usevfork='false' +uvXUformat='"lX"' uvoformat='"lo"' uvsize='4' uvtype='unsigned long' uvuformat='"lu"' uvxformat='"lx"' -uvXUformat='"lX"' versiononly='undef' voidflags=1 xs_apiversion='5.005' @@ -4450,6 +4450,8 @@ Fill the sv with current working directory int Perl_sv_getcwd(pTHX_ register SV *sv) { +#ifndef PERL_MICRO + #ifndef HAS_GETCWD struct stat statbuf; int orig_cdev, orig_cino, cdev, cino, odev, oino, tdev, tino; @@ -4569,24 +4571,65 @@ Perl_sv_getcwd(pTHX_ register SV *sv) #endif return TRUE; +#else + return FALSE; +#endif } /* =for apidoc sv_realpath -Emulate realpath(3) +Wrap or emulate realpath(3). -XXX: add configure test for realpath(3) and prefer if available =cut */ int Perl_sv_realpath(pTHX_ SV *sv, char *path, STRLEN len) { +#ifndef PERL_MICRO + char name[MAXPATHLEN] = { 0 }, *s; + STRLEN pathlen, namelen; + +#ifdef HAS_REALPATH + /* Be paranoid about the use of realpath(), + * it is an infamous source of buffer overruns. */ + + /* Is the source buffer too long? + * Don't use strlen() to avoid running off the end. */ + s = memchr(path, '\0', MAXPATHLEN); + pathlen = s ? s - path : MAXPATHLEN; + if (pathlen == MAXPATHLEN) { + Perl_warn(aTHX_ "sv_realpath: realpath(\"%s\"): %c= (MAXPATHLEN = %d)", + path, s ? '=' : '>', MAXPATHLEN); + SV_CWD_RETURN_UNDEF; + } + + /* Here goes nothing. */ + if (realpath(path, name) == NULL) { + Perl_warn(aTHX_ "sv_realpath: realpath(\"%s\"): %s", + path, Strerror(errno)); + SV_CWD_RETURN_UNDEF; + } + + /* Is the destination buffer too long? + * Don't use strlen() to avoid running off the end. */ + s = memchr(name, '\0', MAXPATHLEN); + namelen = s ? s - name : MAXPATHLEN; + if (namelen == MAXPATHLEN) { + Perl_warn(aTHX_ "sv_realpath: realpath(\"%s\"): %c= (MAXPATHLEN = %d)", + path, s ? '=' : '>', MAXPATHLEN); + SV_CWD_RETURN_UNDEF; + } + + /* The coast is clear? */ + sv_setpvn(sv, name, namelen); + SvPOK_only(sv); + + return TRUE; +#else DIR *parent; Direntry_t *dp; char dotdots[MAXPATHLEN] = { 0 }; - char name[MAXPATHLEN] = { 0 }; - int namelen = 0, pathlen = 0; struct stat cst, pst, tst; if (PerlLIO_stat(path, &cst) < 0) { @@ -4686,4 +4729,8 @@ Perl_sv_realpath(pTHX_ SV *sv, char *path, STRLEN len) SvPOK_only(sv); return TRUE; +#endif +#else + return FALSE; +#endif } diff --git a/vos/config.alpha.def b/vos/config.alpha.def index a6f03b341c..9c5554bb6c 100644 --- a/vos/config.alpha.def +++ b/vos/config.alpha.def @@ -226,6 +226,8 @@ $d_setpwent='undef' $d_setregid='undef' $d_setresgid='undef' $d_setresuid='undef' +$d_sresgproto='undef' +$d_sresuproto='undef' $d_setreuid='undef' $d_setrgid='undef' $d_setruid='undef' diff --git a/win32/config.bc b/win32/config.bc index 4c69179973..9511d19183 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -306,6 +306,8 @@ d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' diff --git a/win32/config.gc b/win32/config.gc index 4a86999bd4..b0dd78078d 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -306,6 +306,8 @@ d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' diff --git a/win32/config.vc b/win32/config.vc index 55edfbe097..eab438072e 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -306,6 +306,8 @@ d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' |