This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Whitespace only: zap EOL spaces
[perl5.git] / Configure
index f5f78f4..3d65fd2 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -475,6 +475,7 @@ d_fcntl_can_lock=''
 d_fd_macros=''
 d_fd_set=''
 d_fds_bits=''
+d_fdclose=''
 d_fdim=''
 d_fegetround=''
 d_fgetpos=''
@@ -496,8 +497,10 @@ d_fpclassl=''
 d_fpgetround=''
 d_fpos64_t=''
 d_frexpl=''
+d_fs_data_s=''
 d_fseeko=''
 d_fsetpos=''
+d_fstatfs=''
 d_fsync=''
 d_ftello=''
 d_ftime=''
@@ -507,6 +510,7 @@ d_Gconvert=''
 d_getaddrinfo=''
 d_getcwd=''
 d_getespwnam=''
+d_getfsstat=''
 d_getgrent=''
 d_getgrent_r=''
 getgrent_r_proto=''
@@ -533,6 +537,8 @@ d_getitimer=''
 d_getlogin=''
 d_getlogin_r=''
 getlogin_r_proto=''
+d_getmnt=''
+d_getmntent=''
 d_getnameinfo=''
 d_getnbyaddr=''
 d_getnbyname=''
@@ -586,6 +592,7 @@ d_gmtime_r=''
 gmtime_r_proto=''
 d_gnulibc=''
 gnulibc_version=''
+d_hasmntopt=''
 d_htonl=''
 d_hypot=''
 d_ilogb=''
@@ -778,6 +785,13 @@ d_shmctl=''
 d_shmdt=''
 d_shmget=''
 d_sigaction=''
+d_siginfo_si_errno=''
+d_siginfo_si_pid=''
+d_siginfo_si_uid=''
+d_siginfo_si_addr=''
+d_siginfo_si_status=''
+d_siginfo_si_band=''
+d_siginfo_si_value=''
 d_signbit=''
 d_sigprocmask=''
 d_sigsetjmp=''
@@ -816,8 +830,12 @@ d_sresgproto=''
 d_sresuproto=''
 d_stat=''
 d_statblks=''
+d_statfs_f_flags=''
+d_statfs_s=''
 d_static_inline=''
 perl_static_inline=''
+d_fstatvfs=''
+d_statvfs=''
 d_stdio_cnt_lval=''
 d_stdio_ptr_lval=''
 d_stdio_ptr_lval_nochange_cnt=''
@@ -889,6 +907,7 @@ d_unordered=''
 d_unsetenv=''
 d_usleep=''
 d_usleepproto=''
+d_ustat=''
 d_pseudofork=''
 d_vfork=''
 usevfork=''
@@ -971,6 +990,7 @@ i_malloc=''
 i_mallocmalloc=''
 i_math=''
 i_memory=''
+i_mntent=''
 d_gdbm_ndbm_h_uses_prototypes=''
 d_gdbmndbm_h_uses_prototypes=''
 d_ndbm=''
@@ -1016,6 +1036,7 @@ i_syssockio=''
 i_syslog=''
 i_sysmman=''
 i_sysmode=''
+i_sysmount=''
 i_sysndir=''
 i_sysparam=''
 i_syspoll=''
@@ -1023,11 +1044,14 @@ i_sysresrc=''
 i_syssecrt=''
 i_sysselct=''
 i_sysstat=''
+i_sysstatfs=''
+i_sysstatvfs=''
 i_systimes=''
 i_systypes=''
 i_sysuio=''
 i_sysun=''
 i_sysutsname=''
+i_sysvfs=''
 i_syswait=''
 i_sgtty=''
 i_termio=''
@@ -1039,6 +1063,7 @@ i_systimek=''
 i_time=''
 timeincl=''
 i_unistd=''
+i_ustat=''
 i_utime=''
 i_values=''
 i_stdarg=''
@@ -1447,7 +1472,7 @@ libswanted_uselargefiles=''
 : set usesocks on the Configure command line to enable socks.
 : List of libraries we want.
 : If anyone needs extra -lxxx, put those in a hint file.
-libswanted="cl pthread socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld"
+libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
 libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
 : We probably want to search /usr/shlib before most other libraries.
 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
@@ -1662,7 +1687,6 @@ alldone=''
 error=''
 silent=''
 extractsh=''
-override=''
 knowitall=''
 rm -f optdef.sh posthint.sh
 cat >optdef.sh <<EOS
@@ -1692,7 +1716,7 @@ while test $# -gt 0; do
        -s) shift; silent=true; realsilent=true;;
        -E) shift; alldone=exit;;
        -K) shift; knowitall=true;;
-       -O) shift; override=true;;
+       -O) shift;;
        -S) shift; silent=true; extractsh=true;;
        -D)
                shift
@@ -1801,7 +1825,7 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
          -Dprefix=/opt/perl5      choose your destination
   -E : stop at the end of questions, after having produced config.sh.
   -K : do not use unless you know what you are doing.
-  -O : let -D and -U override definitions from loaded configuration file.
+  -O : ignored for backward compatibility
   -S : perform variable substitutions on all .SH files (can mix with -f)
   -U : undefine symbol:
          -U symbol    symbol gets the value 'undef'
@@ -1848,7 +1872,7 @@ esac
 
 : run the defines and the undefines, if any, but leave the file out there...
 touch optdef.sh
-grep -q '\\' optdef.sh
+grep '\\' optdef.sh >/dev/null 2>&1
 if test $? = 0; then
     echo "Configure does not support \\ in -D arguments"
     exit 1
@@ -2023,7 +2047,7 @@ true)
        echo "Fetching answers from $config_sh..."
        cd ..
        . $config_sh
-       test "$override" && . ./optdef.sh
+       . UU/optdef.sh
        echo " "
        . UU/extract
        rm -rf UU
@@ -3776,7 +3800,7 @@ cd UU
        hint=previous
        ;;
 esac
-test "$override" && . ./optdef.sh
+. ./optdef.sh
 
 : Restore computed paths
 for file in $loclist $trylist; do
@@ -5533,7 +5557,12 @@ esac
 : the following weeds options from ccflags that are of no interest to cpp
 case "$cppflags" in
 '') cppflags="$ccflags" ;;
-*)  cppflags="$cppflags $ccflags" ;;
+*)  set X $ccflags; shift
+    case " $cppflags " in
+    *" $1 "*) ;;  # Try to avoid doubling the cppflags.
+    *) cppflags="$cppflags $ccflags" ;;
+    esac
+    ;;
 esac
 case "$gccversion" in
 1*) cppflags="$cppflags -D__GNUC__"
@@ -6935,17 +6964,26 @@ int main() {
   }
 #endif
 /* For alignment 32-bit platforms have the 80 bits in 12 bytes,
- * while 64-bits platforms have it in 16 bytes. */
+ * while 64-bits platforms have it in 16 bytes.  The trailing bytes
+ * cannot be trusted. */
 #if LDBL_MANT_DIG == 64 && (LONGDBLSIZE == 16 || LONGDBLSIZE == 12)
-  if (b[0] == 0xCD && b[9] == 0xBF && b[10] == 0x00) {
+  if (b[0] == 0xCD && b[9] == 0xBF) {
     /* x86 80-bit little-endian, sizeof 12 (ILP32, Solaris x86)
      * or 16 (LP64, Linux and OS X), 4 or 6 bytes of padding.
      * Also known as "extended precision". */
     printf("3\n");
     exit(0);
   }
-  if (b[0] == 0xBF && b[9] == 0xCD && b[10] == 0x00) {
-    /* is there ever big-endian 80-bit, really? */
+  if (b[0] == 0xBF && b[9] == 0xCD) {
+    /* Is there ever big-endian 80-bit, really?
+     *
+     * The Motorola 68881 had another "extended precision" format:
+     * sign:1 exp:15 zero:16 integer:1 mantissa:63
+     * for total of 96 bits of bytes.  The zero bits were unused.
+     * See "M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL" for more details.
+     * If it ever becomes relevant, this format should be allocated
+     * a new doublekind code since it's quite different from the Intel x87.
+     */
     printf("4\n");
     exit(0);
   }
@@ -6954,17 +6992,35 @@ int main() {
   /* software "double double", the 106 is 53+53.
    * but irix thinks it is 107. */
   if (b[0] == 0x9A && b[7] == 0x3C && b[8] == 0x9A && b[15] == 0xBF) {
-    /* double double 128-bit little-endian,
+    /* double double 128-bit fully little-endian,
+     * little-endian doubles in little-endian order,
      * 9a 99 99 99 99 99 59 3c 9a 99 99 99 99 99 b9 bf */
     printf("5\n");
     exit(0);
   }
   if (b[0] == 0xBF && b[7] == 0x9A && b[8] == 0x3C && b[15] == 0x9A) {
-    /* double double 128-bit big-endian, e.g. PPC/Power and MIPS:
+    /* double double 128-bit fully big-endian,
+     * big-endian doubles in big-endian order,
+     * e.g. PPC/Power and MIPS:
      * bf b9 99 99 99 99 99 9a 3c 59 99 99 99 99 99 9a */
     printf("6\n");
     exit(0);
   }
+  if (b[0] == 0x9A && b[7] == 0xBF && b[8] == 0x9A && b[15] == 0x3C) {
+    /* double double 128-bit mixed endian.
+     * little-endian doubles in big-endian order,
+     * e.g. ppc64el,
+     * 9a 99 99 99 99 99 b9 bf 9a 99 99 99 99 99 59 3c */
+    printf("7\n");
+    exit(0);
+  }
+  if (b[0] == 0x3C && b[7] == 0x9A && b[8] == 0xBF && b[15] == 0x9A) {
+    /* double double 128-bit mixed endian,
+     * big-endian doubles in little-endian order,
+     * 3c 59 99 99 99 99 99 9a bf b9 99 99 99 99 99 9a */
+    printf("8\n");
+    exit(0);
+  }
 #endif
   printf("-1\n"); /* unknown */
   exit(0);
@@ -6985,8 +7041,10 @@ case "$longdblkind" in
 2) echo "You have IEEE 754 128-bit big endian long doubles." >&4 ;;
 3) echo "You have x86 80-bit little endian long doubles." >& 4 ;;
 4) echo "You have x86 80-bit big endian long doubles." >& 4 ;;
-5) echo "You have 128-bit little-endian double-double long doubles." >& 4 ;;
-6) echo "You have 128-bit big-endian double-double long doubles." >& 4 ;;
+5) echo "You have 128-bit fully little-endian double-double long doubles (64-bit LEs in LE)." >& 4 ;;
+6) echo "You have 128-bit fully big-endian double-double long doubles (64-bit BEs in BE)." >& 4 ;;
+7) echo "You have 128-bit mixed double-double long doubles (64-bit LEs in BE)." >& 4 ;;
+8) echo "You have 128-bit mixed double-double long doubles (64-bit BEs in LE)." >& 4 ;;
 *) echo "Cannot figure out your long double." >&4 ;;
 esac
 $rm_try
@@ -10707,6 +10765,25 @@ set $varname;
 eval $setvar;
 $rm_try'
 
+: Define hasfield_t macro for Configure internal use
+hasfield_t='varname=$1; struct=$2; type=$3; field=$4; shift; shift; shift; shift;
+while $test $# -ge 2; do
+       case "$1" in
+       $define) echo "#include <$2>";;
+       esac ;
+    shift 2;
+done > try.c;
+echo "int main () { $struct foo; $type bar = foo.$field; }" >> try.c;
+set try;
+if eval $compile; then
+       val="$define";
+else
+       val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm_try'
+
 : see if we should include time.h, sys/time.h, or both
 echo " "
 if test "X$timeincl" = X; then
@@ -13311,7 +13388,7 @@ echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
 case "$eagain" in
 '')
        case "$d_fork:$d_pipe:$d_alarm" in
-       define:define)
+       define:define:define)
        $cat head.c > try.c
        $cat >>try.c <<EOCP
 #include <errno.h>
@@ -13941,6 +14018,10 @@ EOM
 fi
 $rm_try
 
+: see if fdclose exists
+set fdclose d_fdclose
+eval $inlibc
+
 : see if fdim exists
 set fdim d_fdim
 eval $inlibc
@@ -14069,6 +14150,20 @@ eval $inlibc
 set sys/param.h i_sysparam
 eval $inhdr
 
+: see if this is a sys/mount.h system
+set sys/mount.h i_sysmount
+eval $inhdr
+
+: Check for fs_data_s
+echo " "
+echo "Checking to see if your system supports struct fs_data..." >&4
+set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
+eval $hasstruct
+case "$d_fs_data_s" in
+"$define")      echo "Yes, it does."   ;;
+*)              echo "No, it doesn't." ;;
+esac
+
 : see if fseeko exists
 set fseeko d_fseeko
 eval $inlibc
@@ -14080,6 +14175,19 @@ esac
 set fsetpos d_fsetpos
 eval $inlibc
 
+: see if fstatfs exists
+set fstatfs d_fstatfs
+eval $inlibc
+
+: see if statvfs exists
+set statvfs d_statvfs
+eval $inlibc
+
+: see if fstatvfs exists
+set fstatvfs d_fstatvfs
+eval $inlibc
+
+
 : see if fsync exists
 set fsync d_fsync
 eval $inlibc
@@ -14192,6 +14300,10 @@ eval $inlibc
 set getespwnam d_getespwnam
 eval $inlibc
 
+: see if getfsstat exists
+set getfsstat d_getfsstat
+eval $inlibc
+
 : see if getgrent exists
 set getgrent d_getgrent
 eval $inlibc
@@ -14721,6 +14833,14 @@ case "$d_getlogin_r" in
        ;;
 esac
 
+: see if getmnt exists
+set getmnt d_getmnt
+eval $inlibc
+
+: see if getmntent exists
+set getmntent d_getmntent
+eval $inlibc
+
 : see if getnameinfo exists
 set getnameinfo d_getnameinfo
 eval $inlibc
@@ -15577,6 +15697,10 @@ case "$d_gmtime_r" in
        ;;
 esac
 
+: see if hasmntopt exists
+set hasmntopt d_hasmntopt
+eval $inlibc
+
 : see if this is a netinet/in.h or sys/in.h system
 set netinet/in.h i_niin sys/in.h i_sysin
 eval $inhdr
@@ -17100,16 +17224,21 @@ EOM
 set readlink d_readlink
 eval $inlibc
 
-: Check if exe is symlink to abs path of executing program
+: Check if there is a /proc symlink to the abs path of
+: the executing program.  We will honor hints of d_procselfexe=$undef
+: or procselfexe being non-empty, otherwise will try to determine both
+: if we have readlink.
+: AmigaOS will attempt to mount proc: aka /proc, if /proc/... is
+: referenced, and AmigaOS does not have a proc filesystem anyway.
 echo " "
-procselfexe=''
 val="$undef"
-case "$d_procselfexe" in
-'')
-case "$d_readlink" in
-    "$define")
-       : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
-       : more tidy to avoid an extra level of symlink
+if $test "X$d_procselfexe" = Xundef; then
+       procselfexe=''
+elif $test "X$procselfexe" != X -a "X$procselfexe" != 'X '; then
+       val="$define"
+elif $test "X$d_readlink" = Xdefine; then
+        : NetBSD first as /proc/self is a symlink to /proc/curproc,
+        : and it feels more tidy to avoid an extra level of symlink
        set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
        while test $# -gt 0; do
            type=$1; try=$2
@@ -17125,13 +17254,10 @@ case "$d_readlink" in
                fi
            fi
        done
-       ;;
-esac
+fi
 $rm -f reflect
 set d_procselfexe
 eval $setvar
-;;
-esac
 
 : backward compatibility for d_hvfork
 if test X$d_hvfork != X; then
@@ -18859,6 +18985,43 @@ echo "Checking to see if your struct stat has st_blocks field..." >&4
 set d_statblks stat st_blocks $i_sysstat sys/stat.h
 eval $hasfield
 
+: see if this is a sys/vfs.h system
+set sys/vfs.h i_sysvfs
+eval $inhdr
+
+: see if this is a sys/statfs.h system
+set sys/statfs.h i_sysstatfs
+eval $inhdr
+
+: Check for statfs_s
+echo " "
+echo "Checking to see if your system supports struct statfs..." >&4
+set d_statfs_s statfs $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h
+eval $hasstruct
+case "$d_statfs_s" in
+"$define")      echo "Yes, it does."   ;;
+*)              echo "No, it doesn't." ;;
+esac
+
+
+: see if struct statfs knows about f_flags
+case "$d_statfs_s" in
+define)
+       echo " "
+       echo "Checking to see if your struct statfs has f_flags field..." >&4
+       set d_statfs_f_flags statfs f_flags $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h
+       eval $hasfield
+       ;;
+*)     val="$undef"
+       set d_statfs_f_flags
+       eval $setvar
+       ;;
+esac
+case "$d_statfs_f_flags" in
+"$define")      echo "Yes, it does."   ;;
+*)              echo "No, it doesn't." ;;
+esac
+
 : see what flavor, if any, of static inline is supported
 echo " "
 echo "Checking to see if your system supports static inline..."
@@ -19812,6 +19975,10 @@ echo " "
 set d_usleepproto usleep $i_unistd unistd.h
 eval $hasproto
 
+: see if ustat exists
+set ustat d_ustat
+eval $inlibc
+
 : see if closedir exists
 set closedir d_closedir
 eval $inlibc
@@ -20411,14 +20578,22 @@ else
        ;;
        esac
        ;;
-    5) # 128-bit LE "double double"
+    5) # 128-bit LE-LE "double double"
        longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
        longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'
        ;;
-    6) # 128-bit BE "double double"
+    6) # 128-bit BE-BE "double double"
        longdblinfbytes='0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
        longdblnanbytes='0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
        ;;
+    7) # 128-bit LE-BE "double double"
+       longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    8) # 128-bit BE-LE "double double"
+       longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
     *) # No idea.
        longdblinfbytes=$undef
        longdblnanbytes=$undef
@@ -20477,7 +20652,7 @@ $cat >try.c <<EOP
  * and the top bit must have been one since 387, zero is plain invalid.
  * For normal fp values, the LDBL_MANT_DIG is fine, though. */
 #  define BITS LDBL_MANT_DIG
-# elif ($longdblkind == 5 || $longdblkind == 6) /* double double */
+# elif ($longdblkind == 5 || $longdblkind == 6 || $longdblkind == 7 || $longdblkind == 8) /* double double */
 /* LDBL_MANT_DIG of 106 (twice 53) would be logical, but for some
  * reason e.g. Irix thinks 107.  But in any case, we want only
  * the number of real bits, the implicit bits are of no interest.  */
@@ -22548,6 +22723,40 @@ case "$uidsign" in
        ;;
 esac
 
+: see what siginfo fields we have
+case "$d_sigaction" in
+"$define")
+       echo "Checking if your siginfo_t has si_errno field...">&4
+       set d_siginfo_si_errno siginfo_t int si_errno $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_pid field...">&4
+       set d_siginfo_si_pid siginfo_t $pidtype si_pid $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_uid field...">&4
+       set d_siginfo_si_uid siginfo_t $uidtype si_uid $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_addr field...">&4
+       set d_siginfo_si_addr siginfo_t "void *" si_addr $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_status field...">&4
+       set d_siginfo_si_status siginfo_t int si_status $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_band field...">&4
+       set d_siginfo_si_band siginfo_t long si_band $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_value field...">&4
+       set d_siginfo_si_value siginfo_t "union sigval" si_value $d_sigaction signal.h
+       eval $hasfield_t;
+
+       ;;
+esac
+
 : Determine if we can use sysctl with KERN_PROC_PATHNAME to find executing program
 echo " "
 echo "Determining whether we can use sysctl with KERN_PROC_PATHNAME to find executing program..." >&4
@@ -22882,6 +23091,10 @@ else
        i_machcthr="$undef"
 fi
 
+: see if this is a mntent.h system
+set mntent.h i_mntent
+eval $inhdr
+
 : see if net/errno.h is available
 val=''
 set net/errno.h val
@@ -23147,7 +23360,7 @@ fi
 
 : add -D_FORTIFY_SOURCE if feasible and not already there
 case "$gccversion" in
-4.*)   case "$optimize$ccflags" in
+[45].*)        case "$optimize$ccflags" in
        *-O*)   case "$ccflags$cppsymbols" in
                *_FORTIFY_SOURCE=*) # Don't add it again.
                        echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
@@ -23157,11 +23370,11 @@ case "$gccversion" in
                        ;;
                esac
                ;;
-       *)      echo "You have gcc 4.* but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
+       *)      echo "You have gcc 4.* or later but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
                ;;
        esac
        ;;
-*)     echo "You seem not to have gcc 4.*, not adding -D_FORTIFY_SOURCE." >&4
+*)     echo "You seem not to have gcc 4.* or later, not adding -D_FORTIFY_SOURCE." >&4
        ;;
 esac
 
@@ -23322,6 +23535,10 @@ eval $inhdr
 set sys/security.h i_syssecrt
 eval $inhdr
 
+: see if this is a sys/statvfs.h system
+set sys/statvfs.h i_sysstatvfs
+eval $inhdr
+
 : see if this is a sys/un.h system
 set sys/un.h i_sysun
 eval $inhdr
@@ -23334,6 +23551,10 @@ eval $inhdr
 set sys/wait.h i_syswait
 eval $inhdr
 
+: see if this is a ustat.h system
+set ustat.h i_ustat
+eval $inhdr
+
 : see if this is an utime system
 set utime.h i_utime
 eval $inhdr
@@ -24057,6 +24278,7 @@ d_fcntl='$d_fcntl'
 d_fcntl_can_lock='$d_fcntl_can_lock'
 d_fd_macros='$d_fd_macros'
 d_fd_set='$d_fd_set'
+d_fdclose='$d_fdclose'
 d_fdim='$d_fdim'
 d_fds_bits='$d_fds_bits'
 d_fegetround='$d_fegetround'
@@ -24083,6 +24305,8 @@ d_frexpl='$d_frexpl'
 d_fs_data_s='$d_fs_data_s'
 d_fseeko='$d_fseeko'
 d_fsetpos='$d_fsetpos'
+d_fstatfs='$d_fstatfs'
+d_fstatvfs='$d_fstatvfs'
 d_fsync='$d_fsync'
 d_ftello='$d_ftello'
 d_ftime='$d_ftime'
@@ -24092,6 +24316,7 @@ d_gdbmndbm_h_uses_prototypes='$d_gdbmndbm_h_uses_prototypes'
 d_getaddrinfo='$d_getaddrinfo'
 d_getcwd='$d_getcwd'
 d_getespwnam='$d_getespwnam'
+d_getfsstat='$d_getfsstat'
 d_getgrent='$d_getgrent'
 d_getgrent_r='$d_getgrent_r'
 d_getgrgid_r='$d_getgrgid_r'
@@ -24108,6 +24333,8 @@ d_gethostprotos='$d_gethostprotos'
 d_getitimer='$d_getitimer'
 d_getlogin='$d_getlogin'
 d_getlogin_r='$d_getlogin_r'
+d_getmnt='$d_getmnt'
+d_getmntent='$d_getmntent'
 d_getnameinfo='$d_getnameinfo'
 d_getnbyaddr='$d_getnbyaddr'
 d_getnbyname='$d_getnbyname'
@@ -24148,6 +24375,7 @@ d_gmtime64='$d_gmtime64'
 d_gmtime_r='$d_gmtime_r'
 d_gnulibc='$d_gnulibc'
 d_grpasswd='$d_grpasswd'
+d_hasmntopt='$d_hasmntopt'
 d_htonl='$d_htonl'
 d_hypot='$d_hypot'
 d_ilogb='$d_ilogb'
@@ -24355,6 +24583,13 @@ d_shmctl='$d_shmctl'
 d_shmdt='$d_shmdt'
 d_shmget='$d_shmget'
 d_sigaction='$d_sigaction'
+d_siginfo_si_errno='$d_siginfo_si_errno'
+d_siginfo_si_pid='$d_siginfo_si_pid'
+d_siginfo_si_uid='$d_siginfo_si_uid'
+d_siginfo_si_addr='$d_siginfo_si_addr'
+d_siginfo_si_status='$d_siginfo_si_status'
+d_siginfo_si_band='$d_siginfo_si_band'
+d_siginfo_si_value='$d_siginfo_si_value'
 d_signbit='$d_signbit'
 d_sigprocmask='$d_sigprocmask'
 d_sigsetjmp='$d_sigsetjmp'
@@ -24377,7 +24612,10 @@ d_sresgproto='$d_sresgproto'
 d_sresuproto='$d_sresuproto'
 d_stat='$d_stat'
 d_statblks='$d_statblks'
+d_statfs_f_flags='$d_statfs_f_flags'
+d_statfs_s='$d_statfs_s'
 d_static_inline='$d_static_inline'
+d_statvfs='$d_statvfs'
 d_stdio_cnt_lval='$d_stdio_cnt_lval'
 d_stdio_ptr_lval='$d_stdio_ptr_lval'
 d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt'
@@ -24436,6 +24674,7 @@ d_unordered='$d_unordered'
 d_unsetenv='$d_unsetenv'
 d_usleep='$d_usleep'
 d_usleepproto='$d_usleepproto'
+d_ustat='$d_ustat'
 d_vendorarch='$d_vendorarch'
 d_vendorbin='$d_vendorbin'
 d_vendorlib='$d_vendorlib'
@@ -24586,6 +24825,7 @@ i_malloc='$i_malloc'
 i_mallocmalloc='$i_mallocmalloc'
 i_math='$i_math'
 i_memory='$i_memory'
+i_mntent='$i_mntent'
 i_ndbm='$i_ndbm'
 i_netdb='$i_netdb'
 i_neterrno='$i_neterrno'
@@ -24616,6 +24856,7 @@ i_sysioctl='$i_sysioctl'
 i_syslog='$i_syslog'
 i_sysmman='$i_sysmman'
 i_sysmode='$i_sysmode'
+i_sysmount='$i_sysmount'
 i_sysndir='$i_sysndir'
 i_sysparam='$i_sysparam'
 i_syspoll='$i_syspoll'
@@ -24624,6 +24865,8 @@ i_syssecrt='$i_syssecrt'
 i_sysselct='$i_sysselct'
 i_syssockio='$i_syssockio'
 i_sysstat='$i_sysstat'
+i_sysstatfs='$i_sysstatfs'
+i_sysstatvfs='$i_sysstatvfs'
 i_systime='$i_systime'
 i_systimek='$i_systimek'
 i_systimes='$i_systimes'
@@ -24631,11 +24874,13 @@ i_systypes='$i_systypes'
 i_sysuio='$i_sysuio'
 i_sysun='$i_sysun'
 i_sysutsname='$i_sysutsname'
+i_sysvfs='$i_sysvfs'
 i_syswait='$i_syswait'
 i_termio='$i_termio'
 i_termios='$i_termios'
 i_time='$i_time'
 i_unistd='$i_unistd'
+i_ustat='$i_ustat'
 i_utime='$i_utime'
 i_values='$i_values'
 i_varargs='$i_varargs'