Add fwalk() probe to the configuration files and regen perltoc.
Jarkko Hietaniemi [Thu, 16 Nov 2000 01:34:18 +0000 (01:34 +0000)]
p4raw-id: //depot/perl@7705

18 files changed:
Configure
Porting/Glossary
Porting/config.sh
Porting/config_H
config_h.SH
configure.com
epoc/config.sh
pod/perltoc.pod
uconfig.h
uconfig.sh
util.c
vos/config.alpha.def
vos/config.alpha.h
vos/config.ga.def
vos/config.ga.h
win32/config.bc
win32/config.gc
win32/config.vc

index bd36af8..688d534 100755 (executable)
--- 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 Wed Nov 15 03:54:52 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Thu Nov 16 03:18:20 EET 2000 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >/tmp/c1$$ <<EOF
@@ -308,6 +308,7 @@ cppminus=''
 cpprun=''
 cppstdin=''
 crosscompile=''
+d__fwalk=''
 d_access=''
 d_accessx=''
 d_alarm=''
@@ -7754,6 +7755,10 @@ qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
    ;;  
 esac
 
+: see if _fwalk exists
+set fwalk d__fwalk
+eval $inlibc
+
 : Initialize h_fcntl
 h_fcntl=false
 
@@ -15527,6 +15532,7 @@ d_PRIo64='$d_PRIo64'
 d_PRIu64='$d_PRIu64'
 d_PRIx64='$d_PRIx64'
 d_SCNfldbl='$d_SCNfldbl'
+d__fwalk='$d__fwalk'
 d_access='$d_access'
 d_accessx='$d_accessx'
 d_alarm='$d_alarm'
index 1369772..6441fd8 100644 (file)
@@ -340,6 +340,10 @@ csh (Loc.U):
        full pathname (if any) of the csh program.  After Configure runs,
        the value is reset to a plain "csh" and is not useful.
 
+d__fwalk (d__fwalk.U):
+       This variable conditionally defines HAS__FWALK if _fwalk() is
+       available to apply a function to all the file handles.
+
 d_access (d_access.U):
        This variable conditionally defines HAS_ACCESS if the access() system
        call is available to check for access permissions using real IDs.
index e7d0a4e..654bec7 100644 (file)
@@ -8,7 +8,7 @@
 
 # Package name      : perl5
 # Source directory  : /m/fs/work/work/permanent/perl/pp4/perl
-# Configuration time: Sun Nov 12 20:54:32 EET 2000
+# Configuration time: Thu Nov 16 03:24:59 EET 2000
 # Configured by     : jhi
 # Target system     : osf1 alpha.hut.fi v4.0 878 alpha 
 
@@ -62,7 +62,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='Sun Nov 12 20:54:32 EET 2000'
+cf_time='Thu Nov 16 03:24:59 EET 2000'
 charsize='1'
 chgrp=''
 chmod=''
@@ -99,6 +99,7 @@ d_PRIo64='define'
 d_PRIu64='define'
 d_PRIx64='define'
 d_SCNfldbl='define'
+d__fwalk='undef'
 d_access='define'
 d_accessx='undef'
 d_alarm='define'
index e313377..dc2f0f1 100644 (file)
@@ -17,7 +17,7 @@
 /*
  * Package name      : perl5
  * Source directory  : /m/fs/work/work/permanent/perl/pp4/perl
- * Configuration time: Sun Nov 12 20:54:32 EET 2000
+ * Configuration time: Thu Nov 16 03:24:59 EET 2000
  * Configured by     : jhi
  * Target system     : osf1 alpha.hut.fi v4.0 878 alpha 
  */
 #define HAS_SETPGRP            /**/
 #define USE_BSD_SETPGRP        /**/
 
+/* HAS__FWALK:
+ *     This symbol, if defined, indicates that the _fwalk system call is
+ *     available to apply a function to all the file handles.
+ */
+/*#define HAS__FWALK           / **/
+
 /* FCNTL_CAN_LOCK:
  *     This symbol, if defined, indicates that fcntl() can be used
  *     for file locking.  Normally on Unix systems this is defined.
index 846f659..e7c668e 100644 (file)
@@ -3211,6 +3211,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
 #$d_setpgrp HAS_SETPGRP                /**/
 #$d_bsdsetpgrp USE_BSD_SETPGRP /**/
 
+/* HAS__FWALK:
+ *     This symbol, if defined, indicates that the _fwalk system call is
+ *     available to apply a function to all the file handles.
+ */
+#$d__fwalk HAS__FWALK          /**/
+
 /* FCNTL_CAN_LOCK:
  *     This symbol, if defined, indicates that fcntl() can be used
  *     for file locking.  Normally on Unix systems this is defined.
index 14a5bef..6514b71 100644 (file)
@@ -4742,6 +4742,7 @@ $ WC "cppminus='" + cppminus + "'"
 $ WC "cpprun='" + cpprun + "'"
 $ WC "cppstdin='" + cppstdin + "'"
 $ WC "crosscompile='undef'"
+$ WC "d__fwalk='undef'"
 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
 $ WC "d_PRId64='" + d_PRId64 + "'"
 $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
index 226a5e3..1767946 100644 (file)
@@ -78,6 +78,7 @@ cppsymbols=''
 crosscompile='define'
 cryptlib=''
 csh='csh'
+d__fwalk='undef'
 d_Gconvert='epoc_gcvt((x),(n),(b))'
 d_PRIEUldbl='undef'
 d_PRIFUldbl='undef'
index 87737b3..4133ccc 100644 (file)
@@ -5688,8 +5688,7 @@ C<-Duse64bitint>, C<-Duselongdouble>, C<-Dusethreads>, C<-Duselargefiles>
 
 =item Suspicious Warnings
 
-I<dlsym()>, Win9x and C<d_eofnblk>, Checking how std your stdio is..,
-Compiler/Preprocessor defines
+I<dlsym()>, Win9x and C<d_eofnblk>, Compiler/Preprocessor defines
 
 =back
 
@@ -6092,9 +6091,13 @@ C<COND_WAIT>, F<os2.c>
 
 =item Build, test, install
 
+=item build anomalies
+
+=item testing anomalies
+
 =item Usage Hints
 
-=item Extensions
+=item Modules and Extensions
 
 =back
 
@@ -6227,6 +6230,8 @@ DATAMODEL_NATIVE specified", sh: ar: not found
 
 =item BSD::Resource
 
+=item Net::SSLeay
+
 =back
 
 =item AUTHOR
@@ -8113,26 +8118,27 @@ C<d_endsent>, C<d_eofnblk>, C<d_eunice>, C<d_fchmod>, C<d_fchown>,
 C<d_fcntl>, C<d_fcntl_can_lock>, C<d_fd_macros>, C<d_fd_set>,
 C<d_fds_bits>, C<d_fgetpos>, C<d_flexfnam>, C<d_flock>, C<d_fork>,
 C<d_fpathconf>, C<d_fpos64_t>, C<d_frexpl>, C<d_fs_data_s>, C<d_fseeko>,
-C<d_fsetpos>, C<d_fstatfs>, C<d_fstatvfs>, C<d_ftello>, C<d_ftime>,
-C<d_Gconvert>, C<d_getcwd>, C<d_getespwnam>, C<d_getfsstat>, C<d_getgrent>,
-C<d_getgrps>, C<d_gethbyaddr>, C<d_gethbyname>, C<d_gethent>,
-C<d_gethname>, C<d_gethostprotos>, C<d_getlogin>, C<d_getmnt>,
-C<d_getmntent>, C<d_getnbyaddr>, C<d_getnbyname>, C<d_getnent>,
-C<d_getnetprotos>, C<d_getpbyname>, C<d_getpbynumber>, C<d_getpent>,
-C<d_getpgid>, C<d_getpgrp2>, C<d_getpgrp>, C<d_getppid>, C<d_getprior>,
-C<d_getprotoprotos>, C<d_getprpwnam>, C<d_getpwent>, C<d_getsbyname>,
-C<d_getsbyport>, C<d_getsent>, C<d_getservprotos>, C<d_getspnam>,
-C<d_gettimeod>, C<d_gnulibc>, C<d_grpasswd>, C<d_hasmntopt>, C<d_htonl>,
-C<d_iconv>, C<d_index>, C<d_inetaton>, C<d_int64_t>, C<d_isascii>,
-C<d_isnan>, C<d_isnanl>, C<d_killpg>, C<d_lchown>, C<d_ldbl_dig>,
-C<d_link>, C<d_locconv>, C<d_lockf>, C<d_longdbl>, C<d_longlong>,
-C<d_lseekproto>, C<d_lstat>, C<d_madvise>, C<d_mblen>, C<d_mbstowcs>,
-C<d_mbtowc>, C<d_memchr>, C<d_memcmp>, C<d_memcpy>, C<d_memmove>,
-C<d_memset>, C<d_mkdir>, C<d_mkdtemp>, C<d_mkfifo>, C<d_mkstemp>,
-C<d_mkstemps>, C<d_mktime>, C<d_mmap>, C<d_modfl>, C<d_mprotect>, C<d_msg>,
-C<d_msg_ctrunc>, C<d_msg_dontroute>, C<d_msg_oob>, C<d_msg_peek>,
-C<d_msg_proxy>, C<d_msgctl>, C<d_msgget>, C<d_msgrcv>, C<d_msgsnd>,
-C<d_msync>, C<d_munmap>, C<d_mymalloc>, C<d_nice>, C<d_nv_preserves_uv>,
+C<d_fsetpos>, C<d_fstatfs>, C<d_fstatvfs>, C<d_fsync>, C<d_ftello>,
+C<d_ftime>, C<d_Gconvert>, C<d_getcwd>, C<d_getespwnam>, C<d_getfsstat>,
+C<d_getgrent>, C<d_getgrps>, C<d_gethbyaddr>, C<d_gethbyname>,
+C<d_gethent>, C<d_gethname>, C<d_gethostprotos>, C<d_getlogin>,
+C<d_getmnt>, C<d_getmntent>, C<d_getnbyaddr>, C<d_getnbyname>,
+C<d_getnent>, C<d_getnetprotos>, C<d_getpagsz>, C<d_getpbyname>,
+C<d_getpbynumber>, C<d_getpent>, C<d_getpgid>, C<d_getpgrp2>, C<d_getpgrp>,
+C<d_getppid>, C<d_getprior>, C<d_getprotoprotos>, C<d_getprpwnam>,
+C<d_getpwent>, C<d_getsbyname>, C<d_getsbyport>, C<d_getsent>,
+C<d_getservprotos>, C<d_getspnam>, C<d_gettimeod>, C<d_gnulibc>,
+C<d_grpasswd>, C<d_hasmntopt>, C<d_htonl>, C<d_iconv>, C<d_index>,
+C<d_inetaton>, C<d_int64_t>, C<d_isascii>, C<d_isnan>, C<d_isnanl>,
+C<d_killpg>, C<d_lchown>, C<d_ldbl_dig>, C<d_link>, C<d_locconv>,
+C<d_lockf>, C<d_longdbl>, C<d_longlong>, C<d_lseekproto>, C<d_lstat>,
+C<d_madvise>, C<d_mblen>, C<d_mbstowcs>, C<d_mbtowc>, C<d_memchr>,
+C<d_memcmp>, C<d_memcpy>, C<d_memmove>, C<d_memset>, C<d_mkdir>,
+C<d_mkdtemp>, C<d_mkfifo>, C<d_mkstemp>, C<d_mkstemps>, C<d_mktime>,
+C<d_mmap>, C<d_modfl>, C<d_mprotect>, C<d_msg>, C<d_msg_ctrunc>,
+C<d_msg_dontroute>, C<d_msg_oob>, C<d_msg_peek>, C<d_msg_proxy>,
+C<d_msgctl>, C<d_msgget>, C<d_msgrcv>, C<d_msgsnd>, C<d_msync>,
+C<d_munmap>, C<d_mymalloc>, C<d_nice>, C<d_nv_preserves_uv>,
 C<d_nv_preserves_uv_bits>, C<d_off64_t>, C<d_old_pthread_create_joinable>,
 C<d_oldpthreads>, C<d_oldsock>, C<d_open3>, C<d_pathconf>, C<d_pause>,
 C<d_perl_otherlibdirs>, C<d_phostname>, C<d_pipe>, C<d_poll>,
@@ -10300,7 +10306,9 @@ IO ), handles( [ EVENT_MASK ] )
 
 =item DESCRIPTION
 
-=item SEE ALSO
+$io->getpos, $io->setpos, $io->setpos ( POS, WHENCE ), WHENCE=0 (SEEK_SET),
+WHENCE=1 (SEEK_CUR), WHENCE=1 (SEEK_END), $io->sysseek( POS, WHENCE ),
+$io->tell
 
 =item HISTORY
 
@@ -10536,7 +10544,9 @@ I/O objects
 
 =item DESCRIPTION
 
-=item SEE ALSO
+$io->getpos, $io->setpos, $io->setpos ( POS, WHENCE ), WHENCE=0 (SEEK_SET),
+WHENCE=1 (SEEK_CUR), WHENCE=1 (SEEK_END), $io->sysseek( POS, WHENCE ),
+$io->tell
 
 =item HISTORY
 
index b303890..218dc55 100644 (file)
--- a/uconfig.h
+++ b/uconfig.h
 /*#define HAS_SETPGRP          / **/
 /*#define USE_BSD_SETPGRP      / **/
 
+/* HAS__FWALK:
+ *     This symbol, if defined, indicates that the _fwalk system call is
+ *     available to apply a function to all the file handles.
+ */
+/*#define HAS__FWALK           / **/
+
 /* FCNTL_CAN_LOCK:
  *     This symbol, if defined, indicates that fcntl() can be used
  *     for file locking.  Normally on Unix systems this is defined.
index d54e608..fe1f935 100755 (executable)
@@ -15,6 +15,7 @@ charsize='1'
 clocktype='clock_t'
 cpp_stuff='42'
 crosscompile='undef'
+d__fwalk='undef'
 d_Gconvert='sprintf((b),"%.*g",(n),(x))'
 d_SCNfldbl='undef'
 d_PRIEUldbl='undef'
diff --git a/util.c b/util.c
index fe88f23..6a68fe6 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3876,30 +3876,36 @@ Perl_get_vtbl(pTHX_ int vtbl_id)
 I32
 Perl_my_fflush_all(pTHX)
 {
-#ifdef FFLUSH_NULL
+#if defined(FFLUSH_NULL)
     return PerlIO_flush(NULL);
 #else
+# if defined(HAS__FWALK)
+    /* undocumented, unprototyped, but very useful BSDism */
+    extern void _fwalk(int (*)(FILE *));
+    _fwalk(&fflush);
+    return 0;
+#   else
     long open_max = -1;
-# if defined(FFLUSH_ALL) && defined(HAS_STDIO_STREAM_ARRAY)
-#  ifdef PERL_FFLUSH_ALL_FOPEN_MAX
+#  if defined(FFLUSH_ALL) && defined(HAS_STDIO_STREAM_ARRAY)
+#   ifdef PERL_FFLUSH_ALL_FOPEN_MAX
     open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
-#  else
-#  if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
+#   else
+#   if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
     open_max = sysconf(_SC_OPEN_MAX);
-#  else
-#   ifdef FOPEN_MAX
-    open_max = FOPEN_MAX;
 #   else
-#    ifdef OPEN_MAX
-    open_max = OPEN_MAX;
+#    ifdef FOPEN_MAX
+    open_max = FOPEN_MAX;
 #    else
-#     ifdef _NFILE
+#     ifdef OPEN_MAX
+    open_max = OPEN_MAX;
+#     else
+#      ifdef _NFILE
     open_max = _NFILE;
+#      endif
 #     endif
 #    endif
 #   endif
-#  endif
-#  endif
+#   endif
     if (open_max > 0) {
       long i;
       for (i = 0; i < open_max; i++)
@@ -3909,9 +3915,10 @@ Perl_my_fflush_all(pTHX)
                PerlIO_flush(&STDIO_STREAM_ARRAY[i]);
       return 0;
     }
-# endif
+#  endif
     SETERRNO(EBADF,RMS$_IFI);
     return EOF;
+# endif
 #endif
 }
 
index 31504f3..8212ce1 100644 (file)
@@ -16,6 +16,7 @@ $cppminus='-'
 $cpprun='cc -E -'
 $cppstdin='cc -E'
 $crosscompile='undef'
+$d__fwalk='undef'
 $d_access='undef'
 $d_accessx='undef'
 $d_alarm='define'
index 656395b..5736d92 100644 (file)
  */
 #define HAS_FCNTL              /**/
 
+/* HAS__FWALK:
+ *     This symbol, if defined, indicates that the _fwalk system call is
+ *     available to apply a function to all the file handles.
+ */
+/*#define HAS__FWALK           / **/
+
 /* FCNTL_CAN_LOCK:
  *     This symbol, if defined, indicates that fcntl() can be used
  *     for file locking.  Normally on Unix systems this is defined.
index efc8c1a..88cd755 100644 (file)
@@ -16,6 +16,7 @@ $cppminus='-'
 $cpprun='cc -E -'
 $cppstdin='cc -E'
 $crosscompile='undef'
+$d__fwalk='undef'
 $d_access='define'
 $d_accessx='undef'
 $d_alarm='define'
index f0b49de..8a259a3 100644 (file)
  */
 #define HAS_FCNTL              /**/
 
+/* HAS__FWALK:
+ *     This symbol, if defined, indicates that the _fwalk system call is
+ *     available to apply a function to all the file handles.
+ */
+/*#define HAS__FWALK           / **/
+
 /* FCNTL_CAN_LOCK:
  *     This symbol, if defined, indicates that fcntl() can be used
  *     for file locking.  Normally on Unix systems this is defined.
index 0bd59dd..6d8f7cd 100644 (file)
@@ -70,6 +70,7 @@ cppsymbols=''
 crosscompile='undef'
 cryptlib=''
 csh='undef'
+d__fwalk='undef'
 d_Gconvert='gcvt((x),(n),(b))'
 d_PRIEUldbl='undef'
 d_PRIFUldbl='undef'
index 4cdfd15..320e87e 100644 (file)
@@ -70,6 +70,7 @@ cppsymbols=''
 crosscompile='undef'
 cryptlib=''
 csh='undef'
+d__fwalk='undef'
 d_Gconvert='sprintf((b),"%.*g",(n),(x))'
 d_PRIEUldbl='undef'
 d_PRIFUldbl='undef'
index d8843fd..c29b799 100644 (file)
@@ -70,6 +70,7 @@ cppsymbols=''
 crosscompile='undef'
 cryptlib=''
 csh='undef'
+d__fwalk='undef'
 d_Gconvert='sprintf((b),"%.*g",(n),(x))'
 d_PRIEUldbl='undef'
 d_PRIFUldbl='undef'