From 104d25b722892cb36f4c988c17016ee0180c3b1a Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Tue, 19 Jan 1999 12:44:02 +0000 Subject: [PATCH] Jumbo Configure update. * -Uinstallusrbinperl: disable /usr/bin/perl installation by installperl * usethreads.cbu * use64bits.cbu * "nosuid" p4raw-id: //depot/cfgperl@2649 --- Configure | 428 ++++++++++++++--------------------------------------- config_h.SH | 52 ++++++- hints/aix.sh | 38 +++++ hints/dec_osf.sh | 24 +++ hints/dos_djgpp.sh | 12 ++ hints/freebsd.sh | 35 +++++ hints/hpux.sh | 81 ++++++++++ hints/irix_4.sh | 21 +++ hints/irix_5.sh | 21 +++ hints/irix_6.sh | 86 +++++++++++ hints/irix_6_0.sh | 21 +++ hints/irix_6_1.sh | 20 +++ hints/linux.sh | 12 ++ hints/os2.sh | 14 ++ hints/solaris_2.sh | 71 +++++++++ perl.c | 71 +++++++++ perl.h | 18 +++ pod/perldiag.pod | 4 + 18 files changed, 701 insertions(+), 328 deletions(-) diff --git a/Configure b/Configure index 1d99afe..9c16607 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 Sat Jan 9 18:00:39 EET 1999 [metaconfig 3.0 PL70] +# Generated on Tue Jan 19 14:08:44 EET 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by jhi@iki.fi) cat >/tmp/c1$$ <&4 "Switching cc to xlc_r because of POSIX threads." - cc=xlc_r - ;; - '') - cc=xlc_r - ;; - *) - cat >&4 <&4 -POSIX threads are not supported by default on FreeBSD $osvers. Follow the -instructions in 'man pthread' to build and install the needed libraries. -EOM - exit 1 - fi - set `echo X "$libswanted "| sed -e 's/ c / c_r /'` - shift - libswanted="$*" - # Configure will probably pick the wrong libc to use for nm - # scan. - # The safest quick-fix is just to not use nm at all. - usenm=false - ;; - *) cat <<'EOM' >&4 - -It is not known if FreeBSD $osvers supports POSIX threads or not. -Consider upgrading to the latest STABLE release. - -EOM - exit 1 - ;; - esac - ;; - hpux) - if [ "$xxOsRevMajor" -lt 10 ]; then - cat <&4 -HP-UX $xxOsRevMajor cannot support POSIX threads. -Consider upgrading to at least HP-UX 11. -Cannot continue, aborting. -EOM - exit 1 - fi - case "$xxOsRevMajor" in - 10) - # Under 10.X, a threaded perl can be built, but it needs - # libcma and OLD_PTHREADS_API. Also needs to - # be #included before any other includes (in perl.h) - if [ ! -f /usr/include/pthread.h -o ! -f /usr/lib/libcma.sl ]; then - cat <&4 -In HP-UX 10.X for POSIX threads you need both of the files -/usr/include/pthread.h and /usr/lib/libcma.sl. -Either you must install the CMA package or you must upgrade to HP-UX 11. -Cannot continue, aborting. -EOM - exit 1 - fi - - # HP-UX 10.X uses the old pthreads API - case "$d_oldpthreads" in - '') d_oldpthreads="$define" ;; - esac - - # include libcma before all the others - libswanted="cma $libswanted" - - # tell perl.h to include before other include files - ccflags="$ccflags -DPTHREAD_H_FIRST" - - # CMA redefines select to cma_select, and cma_select expects int * - # instead of fd_set * (just like 9.X) - selecttype='int *' - ;; - 11 | 12) # 12 may want upping the _POSIX_C_SOURCE - ccflags="$ccflags -D_POSIX_C_SOURCE=199506L" - libswanted="$libswanted pthread" - ;; - esac - ;; - irix) - if test ! -f ${TOOLROOT}/usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then - case "`uname -r`" in - [1-5].*|6.[01]|6.[01]) - cat >&4 <&4 <&4 <&4 < for this report. - # Sun BugID is 4117946, "sigsetjmp always returns 1 when called by - # siglongjmp in a MT program". As of 19980622, there is no patch - # available. - cat >try.c <<'EOM' - /* Test for sig(set|long)jmp bug. */ - #include - - main() - { - sigjmp_buf env; - int ret; - - ret = sigsetjmp(env, 1); - if (ret) { return ret == 2; } - siglongjmp(env, 2); - } -EOM - if test "`arch`" = i86pc -a "$osvers" = 2.6 && \ - ${cc:-cc} try.c -lpthread >/dev/null 2>&1 && ./a.out; then - d_sigsetjmp=$undef - cat << 'EOM' >&2 - -You will see a *** WHOA THERE!!! *** message from Configure for -d_sigsetjmp. Keep the recommended value. See hints/solaris_2.sh -for more information. - -EOM - fi - ;; - vmesa) - ;; - *) - cat >&4 <&4 -64-bit compilation is not supported on HP-UX $xxOsRevMajor. -You need at least HP-UX 11.0. -Cannot continue, aborting. -EOM - exit 1 - fi - if [ ! -d /lib/pa20_64 ]; then - cat <&4 -You do not seem to have the 64-bit libraries, /lib/pa20_64. -Cannot continue, aborting. -EOM - exit 1 - fi - ccflags="$ccflags +DD64 -D_FILE_OFFSET_BITS=64" - ldflags="$ldflags +DD64" - ld=/usr/bin/ld - set `echo " $libswanted " | sed -e 's@ dl @ @'` - libswanted="$*" - glibpth="/lib/pa20_64" - ;; - irix) - case "`uname -r`" in - [1-5]*|6.[01]) - cat >&4 <&2 - -You will see a *** WHOA THERE!!! *** message from Configure for -d_open64. Keep the recommended value. See hints/irix6.sh -for more information. - -EOM - ;; - esac - ccflags="$ccflags -DUSE_64_BIT_FILES" - ;; - solaris) - case "`uname -r`" in - 1.*|2.[1-5]) - cat >&4 <&4 <&4 <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_sfio USE_SFIO /**/ +/* HAS_FSTATFS: + * This symbol, if defined, indicates that the fstatfs routine is + * available to do stat filesystems of file descriptors. + */ +/* HAS_STRUCT_STATFS_FLAGS: + * This symbol, if defined, indicates that the struct statfs + * does have the f_flags member containing the mount flags of + * the filesystem holding the file. + * This kind of struct statfs is coming from sys/mount.h (BSD) + * and not from sys/statfs.h (SYSV). + */ +#$d_fstatfs HAS_FSTATFS /**/ +#$d_statfsflags HAS_STRUCT_STATFS_FLAGS /**/ + +/* HAS_FSTATVFS: + * This symbol, if defined, indicates that the fstatvfs routine is + * available to do stat filesystems of file descriptors. + */ +#$d_fstatvfs HAS_FSTATVFS /**/ + /* HAS_WRITEV: * This symbol, if defined, indicates that the writev routine is * available to do scatter writes. @@ -2130,6 +2150,24 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$i_poll I_POLL /**/ +/* I_SYS_MOUNT: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_sysmount I_SYS_MOUNT /**/ + +/* I_SYS_STATVFS: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_sysstatvfs I_SYS_STATVFS /**/ + +/* INSTALL_USR_BIN_PERL: + * This symbol, if defined, indicates that Perl is to be installed + * also as /usr/bin/perl. + */ +#$installusrbinperl INSTALL_USR_BIN_PERL /**/ + /* HAS_FSTAT64: * This symbol, if defined, indicates that the fstat64 routine is * available to stat files (fds) larger than 2 gigabytes. @@ -2308,6 +2346,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$use64bits USE_64_BITS /**/ +/* MULTIPLICITY: + * This symbol, if defined, indicates that Perl should + * be built to use multiplicity. + */ +#$usemultiplicity MULTIPLICITY /**/ + /* USE_PERLIO: * This symbol, if defined, indicates that the PerlIO abstraction should * be used throughout. If not defined, stdio should be @@ -2397,7 +2441,7 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * in joinable (aka undetached) state. NOTE: not defined * if pthread.h already has defined PTHREAD_CREATE_JOINABLE * (the new version of the constant). - * If defined, possible values are PTHREAD_CREATE_UNDETACHED + * If defined, known values are PTHREAD_CREATE_UNDETACHED * and __UNDETACHED. */ #$d_old_pthread_create_joinable OLD_PTHREAD_CREATE_JOINABLE $old_pthread_create_joinable /**/ @@ -2427,12 +2471,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$i_machcthr I_MACH_CTHREADS /**/ -/* MULTIPLICITY: - * This symbol, if defined, indicates that Perl should - * be built to use multiplicity. - */ -#$usemultiplicity MULTIPLICITY /**/ - /* USE_THREADS: * This symbol, if defined, indicates that Perl should * be built to use threads. diff --git a/hints/aix.sh b/hints/aix.sh index bbcc522..727cf93 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -74,3 +74,41 @@ case "$osvers" in ;; esac +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + ccflags="$ccflags -DNEED_PTHREAD_INIT" + case "$cc" in + xlc_r | cc_r) ;; + cc) + echo >&4 "Switching cc to xlc_r because of POSIX threads." + cc=xlc_r + ;; + '') + cc=xlc_r + ;; + *) + cat >&4 < UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + # Threads interfaces changed with V4.0. + case "`uname -r`" in + *[123].*) + libswanted="$libswanted pthreads mach exc c_r" + ccflags="-threads $ccflags" + ;; + *) + libswanted="$libswanted pthread exc" + ccflags="-pthread $ccflags" + ;; + esac + + usemymalloc='n' + ;; +esac +EOCBU + # # Unset temporary variables no more needed. # @@ -326,3 +348,5 @@ unset _DEC_cc_style # * Set -Olimit to 3200 because perl_yylex.c got too big # for the optimizer. # + + diff --git a/hints/dos_djgpp.sh b/hints/dos_djgpp.sh index 94c09d0..db09cbc 100644 --- a/hints/dos_djgpp.sh +++ b/hints/dos_djgpp.sh @@ -52,3 +52,15 @@ sitearch=$sitelib eagain='EAGAIN' rd_nodata='-1' +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'` + shift + libswanted="$*" + ;; +esac +EOCBU + diff --git a/hints/freebsd.sh b/hints/freebsd.sh index d638462..96df283 100644 --- a/hints/freebsd.sh +++ b/hints/freebsd.sh @@ -139,4 +139,39 @@ EOM signal_t='void' d_voidsig='define' +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + case "$osvers" in + [34].*) ldflags="-pthread $ldflags" + ;; + 2.2*) if [ ! -r /usr/lib/libc_r ]; then + cat <<'EOM' >&4 +POSIX threads are not supported by default on FreeBSD $osvers. Follow the +instructions in 'man pthread' to build and install the needed libraries. +EOM + exit 1 + fi + set `echo X "$libswanted "| sed -e 's/ c / c_r /'` + shift + libswanted="$*" + # Configure will probably pick the wrong libc to use for nm + # scan. + # The safest quick-fix is just to not use nm at all. + usenm=false + ;; + *) cat <<'EOM' >&4 + +It is not known if FreeBSD $osvers supports POSIX threads or not. +Consider upgrading to the latest STABLE release. + +EOM + exit 1 + ;; + esac + ;; +esac +EOCBU diff --git a/hints/hpux.sh b/hints/hpux.sh index ceef5a3..70250b7 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -193,3 +193,84 @@ esac # assembler of the form: # (warning) Use of GR3 when frame >= 8192 may cause conflict. # These warnings are harmless and can be safely ignored. + +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + if [ "$xxOsRevMajor" -lt 10 ]; then + cat <&4 +HP-UX $xxOsRevMajor cannot support POSIX threads. +Consider upgrading to at least HP-UX 11. +Cannot continue, aborting. +EOM + exit 1 + fi + case "$xxOsRevMajor" in + 10) + # Under 10.X, a threaded perl can be built, but it needs + # libcma and OLD_PTHREADS_API. Also needs to + # be #included before any other includes (in perl.h) + if [ ! -f /usr/include/pthread.h -o ! -f /usr/lib/libcma.sl ]; then + cat <&4 +In HP-UX 10.X for POSIX threads you need both of the files +/usr/include/pthread.h and /usr/lib/libcma.sl. +Either you must install the CMA package or you must upgrade to HP-UX 11. +Cannot continue, aborting. +EOM + exit 1 + fi + + # HP-UX 10.X uses the old pthreads API + case "$d_oldpthreads" in + '') d_oldpthreads="$define" ;; + esac + + # include libcma before all the others + libswanted="cma $libswanted" + + # tell perl.h to include before other include files + ccflags="$ccflags -DPTHREAD_H_FIRST" + + # CMA redefines select to cma_select, and cma_select expects int * + # instead of fd_set * (just like 9.X) + selecttype='int *' + ;; + 11 | 12) # 12 may want upping the _POSIX_C_SOURCE + ccflags="$ccflags -D_POSIX_C_SOURCE=199506L" + libswanted="$libswanted pthread" + ;; + esac + ;; +esac +EOCBU + +# This script UU/use64bits.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use 64 bits. +cat > UU/use64bits.cbu <<'EOCBU' +case "$use64bits" in +$define|true|[yY]*) + if [ "$xxOsRevMajor" -lt 11 ]; then + cat <&4 +64-bit compilation is not supported on HP-UX $xxOsRevMajor. +You need at least HP-UX 11.0. +Cannot continue, aborting. +EOM + exit 1 + fi + if [ ! -d /lib/pa20_64 ]; then + cat <&4 +You do not seem to have the 64-bit libraries, /lib/pa20_64. +Cannot continue, aborting. +EOM + exit 1 + fi + ccflags="$ccflags +DD64 -D_FILE_OFFSET_BITS=64" + ldflags="$ldflags +DD64" + ld=/usr/bin/ld + set `echo " $libswanted " | sed -e 's@ dl @ @'` + libswanted="$*" + glibpth="/lib/pa20_64" +esac +EOCBU diff --git a/hints/irix_4.sh b/hints/irix_4.sh index f5883f3..1e90f98 100644 --- a/hints/irix_4.sh +++ b/hints/irix_4.sh @@ -22,3 +22,24 @@ If you have problems, you might have try including -DSTANDARD_C -cckr in ccflags. EOM + +case "$usethreads" in +$define|true|[yY]*) + cat >&4 <&4 <&4 <&4 < UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + if test ! -f ${TOOLROOT}/usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then + case "`uname -r`" in + [1-5].*|6.[01]) + cat >&4 <&4 <&4 <&4 < UU/use64bits.cbu <<'EOCBU' +case "$use64bits" in +$define|true|[yY]*) +esac + case "`uname -r`" in + [1-5]*|6.[01]) + cat >&4 <&2 + +You will see a *** WHOA THERE!!! *** message from Configure for +d_open64. Keep the recommended value. See hints/irix6.sh +for more information. + +EOM + ;; + esac + ccflags="$ccflags -DUSE_64_BIT_FILES" + ;; +esac +EOCBU diff --git a/hints/irix_6_0.sh b/hints/irix_6_0.sh index 38fe27d..b34b3ec 100644 --- a/hints/irix_6_0.sh +++ b/hints/irix_6_0.sh @@ -41,3 +41,24 @@ libswanted="$*" # set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ sun / /' -e 's/ crypt / /' -e 's/ nsl / /' -e 's/ dl / /'` # shift # libswanted="$*" + +case "$usethreads" in +$define|true|[yY]*) + cat >&4 <&4 <&4 <&4 < UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + ccflags="-D_REENTRANT $ccflags" + set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` + shift + libswanted="$*" + ;; +esac +EOCBU diff --git a/hints/os2.sh b/hints/os2.sh index 0560175..1744fa9 100644 --- a/hints/os2.sh +++ b/hints/os2.sh @@ -289,6 +289,20 @@ for xxx in * ; do fi done +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) +esac + ccflags="-Zmt $ccflags" + cppflags="-Zmt $cppflags" # Do we really need to set this? + aout_ccflags="-DUSE_THREADS $aout_ccflags" + aout_cppflags="-DUSE_THREADS $aout_cppflags" + aout_lddlflags="-Zmt $aout_lddlflags" + aout_ldflags="-Zmt $aout_ldflags" + ;; +EOCBU # Now go back cd ../.. diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index e518540..98230dd 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -261,6 +261,77 @@ rm -f core # XXX EOSH +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) +esac + ccflags="-D_REENTRANT $ccflags" + + # sched_yield is in -lposix4 + set `echo X "$libswanted "| sed -e 's/ c / posix4 pthread c /'` + shift + libswanted="$*" + + # On Solaris 2.6 x86 there is a bug with sigsetjmp() and siglongjmp() + # when linked with the threads library, such that whatever positive + # value you pass to siglongjmp(), sigsetjmp() returns 1. + # Thanks to Simon Parsons for this report. + # Sun BugID is 4117946, "sigsetjmp always returns 1 when called by + # siglongjmp in a MT program". As of 19980622, there is no patch + # available. + cat >try.c <<'EOM' + /* Test for sig(set|long)jmp bug. */ + #include + + main() + { + sigjmp_buf env; + int ret; + + ret = sigsetjmp(env, 1); + if (ret) { return ret == 2; } + siglongjmp(env, 2); + } +EOM + if test "`arch`" = i86pc -a "$osvers" = 2.6 && \ + ${cc:-cc} try.c -lpthread >/dev/null 2>&1 && ./a.out; then + d_sigsetjmp=$undef + cat << 'EOM' >&2 + +You will see a *** WHOA THERE!!! *** message from Configure for +d_sigsetjmp. Keep the recommended value. See hints/solaris_2.sh +for more information. + +EOM + fi + ;; +EOCBU + +# This script UU/use64bits.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use 64 bits. +cat > UU/use64bits.cbu <<'EOCBU' +case "$use64bits" in +$define|true|[yY]*) + case "`uname -r`" in + 2.[1-5]) + cat >&4 < /dev/null <<'End_of_Solaris_Notes' diff --git a/perl.c b/perl.c index 95cb0d0..8a4fedf 100644 --- a/perl.c +++ b/perl.c @@ -64,6 +64,9 @@ static void my_exit_jump _((void)) __attribute__((noreturn)); static void nuke_stacks _((void)); static void open_script _((char *, bool, SV *, int *fd)); static void usage _((char *)); +#ifdef IAMSUID +static int fd_on_nosuid_fs _((int)); +#endif static void validate_suid _((char *, char*, int)); static I32 read_e_script _((int idx, SV *buf_sv, int maxlen)); #endif @@ -2110,6 +2113,70 @@ sed %s -e \"/^[^#]/b\" \ } } +#ifdef IAMSUID +static int +fd_on_nosuid_fs(int fd) +{ + int on_nosuid = 0; + int check_okay = 0; +/* + * Preferred order: fstatvfs(), fstatfs(), getmntent(). + * fstatvfs() is UNIX98. + * fstatfs() is BSD. + * getmntent() is O(number-of-mounted-filesystems) and can hang. + */ + +# ifdef HAS_FSTATVFS + struct statvfs stfs; + check_okay = fstatvfs(fd, &stfs) == 0; + on_nosuid = check_okay && (stfs.f_flag & ST_NOSUID); +# else +# if defined(HAS_FSTATFS) && defined(HAS_STRUCT_STATFS_FLAGS) + struct statfs stfs; + check_okay = fstatfs(fd, &stfs) == 0; +# undef PERL_MOUNT_NOSUID +# if !defined(PERL_MOUNT_NOSUID) && defined(MNT_NOSUID) +# define PERL_MOUNT_NOSUID MNT_NOSUID +# endif +# if !defined(PERL_MOUNT_NOSUID) && defined(MS_NOSUID) +# define PERL_MOUNT_NOSUID MS_NOSUID +# endif +# if !defined(PERL_MOUNT_NOSUID) && defined(M_NOSUID) +# define PERL_MOUNT_NOSUID M_NOSUID +# endif +# ifdef PERL_MOUNT_NOSUID + on_nosuid = check_okay && (stfs.f_flags & PERL_MOUNT_NOSUID); +# endif +# else +# if defined(HAS_GETMNENT) && defined(HAS_HASMNTOPT) && defined(MNTOPT_NOSUID) + FILE *mtab = fopen("/etc/mtab", "r"); + struct mntent *entry; + struct stat stb, fsb; + + if (mtab && (fstat(fd, &stb) == 0)) { + while (entry = getmntent(mtab)) { + if (stat(entry->mnt_dir, &fsb) == 0 + && fsb.st_dev == stb.st_dev) + { + /* found the filesystem */ + check_okay = 1; + if (hasmntopt(entry, MNTOPT_NOSUID)) + on_nosuid = 1; + break; + } /* A single fs may well fail its stat(). */ + } + } + if (mtab) + fclose(mtab); +# endif /* mntent */ +# endif /* statfs */ +# endif /* statvfs */ + if (!check_okay) + croak("Can't check filesystem of script \"%s\"", PL_origfilename); + return on_nosuid; +} +#endif /* IAMSUID */ + STATIC void validate_suid(char *validarg, char *scriptname, int fdscript) { @@ -2178,6 +2245,10 @@ validate_suid(char *validarg, char *scriptname, int fdscript) croak("Can't swap uid and euid"); /* really paranoid */ if (PerlLIO_stat(SvPVX(GvSV(PL_curcop->cop_filegv)),&tmpstatbuf) < 0) croak("Permission denied"); /* testing full pathname here */ +#ifdef IAMSUID + if (fd_on_nosuid_fs(PerlIO_fileno(PL_rsfp))) + croak("Permission denied"); +#endif if (tmpstatbuf.st_dev != PL_statbuf.st_dev || tmpstatbuf.st_ino != PL_statbuf.st_ino) { (void)PerlIO_close(PL_rsfp); diff --git a/perl.h b/perl.h index 1546bcd..9dd71e5 100644 --- a/perl.h +++ b/perl.h @@ -2778,4 +2778,22 @@ typedef struct am_table_short AMTS; # endif #endif +/* Mention INSTALL_USR_BIN_PERL here so that Configure picks it up. */ + +#ifdef IAMSUID + +#ifdef I_SYS_STATVFS +# include +#else +# ifdef I_SYS_MOUNT +# include +# else +# ifdef I_MNTENT +# include +# endif +# endif +#endif + +#endif /* IAMSUID */ + #endif /* Include guard */ diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 211262c..fc36274 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -517,6 +517,10 @@ Something like this will reproduce the error: (F) You called C, but C is not a directory that you can chdir to, possibly because it doesn't exist. +=item Can't check filesystem of script "%s" + +(P) For some reason you can't check the filesystem of the script for nosuid. + =item Can't coerce %s to integer in %s (F) Certain types of SVs, in particular real symbol table entries -- 1.8.3.1