Try to fix largefileness so that it "works" without a quad IV.
[p5sagit/p5-mst-13.2.git] / Configure
index 3bd3a06..0a0523e 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 Sat Oct 30 01:07:44 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Sat Nov 13 15:36:41 EET 1999 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -400,6 +400,7 @@ d_gnulibc=''
 d_hasmntopt=''
 d_htonl=''
 d_inetaton=''
+d_int64t=''
 d_isascii=''
 d_killpg=''
 d_lchown=''
@@ -572,6 +573,7 @@ fflushNULL=''
 fflushall=''
 fpossize=''
 fpostype=''
+gidformat=''
 gidsign=''
 gidsize=''
 gidtype=''
@@ -594,7 +596,6 @@ i_float=''
 i_gdbm=''
 d_grpasswd=''
 i_grp=''
-d_int64t=''
 i_inttypes=''
 i_limits=''
 i_locale=''
@@ -797,7 +798,8 @@ sPRIi64=''
 sPRIo64=''
 sPRIu64=''
 sPRIx64=''
-quadcase=''
+d_quad=''
+quadkind=''
 quadtype=''
 uquadtype=''
 drand01=''
@@ -842,6 +844,7 @@ stdio_stream_array=''
 d_strtoull=''
 sysman=''
 trnl=''
+uidformat=''
 uidsign=''
 uidsize=''
 uidtype=''
@@ -6830,7 +6833,8 @@ case "$doublesize" in
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof(double));
+    printf("%d\n", (int)sizeof(double));
+    exit(0);
 }
 EOCP
        set try
@@ -7242,9 +7246,9 @@ case "$intsize" in
 #include <stdio.h>
 int main()
 {
-       printf("intsize=%d;\n", sizeof(int));
-       printf("longsize=%d;\n", sizeof(long));
-       printf("shortsize=%d;\n", sizeof(short));
+       printf("intsize=%d;\n", (int)sizeof(int));
+       printf("longsize=%d;\n", (int)sizeof(long));
+       printf("shortsize=%d;\n", (int)sizeof(short));
        exit(0);
 }
 EOCP
@@ -7933,6 +7937,28 @@ set d_open3
 eval $setvar
 $rm -f open3*
 
+: see which of string.h or strings.h is needed
+echo " "
+strings=`./findhdr string.h`
+if $test "$strings" && $test -r "$strings"; then
+       echo "Using <string.h> instead of <strings.h>." >&4
+       val="$define"
+else
+       val="$undef"
+       strings=`./findhdr strings.h`
+       if $test "$strings" && $test -r "$strings"; then
+               echo "Using <strings.h> instead of <string.h>." >&4
+       else
+               echo "No string header found -- You'll surely have problems." >&4
+       fi
+fi
+set i_string
+eval $setvar
+case "$i_string" in
+"$undef") strings=`./findhdr strings.h`;;
+*)       strings=`./findhdr string.h`;;
+esac
+
 : check for non-blocking I/O stuff
 case "$h_sysfile" in
 true) echo "#include <sys/file.h>" > head.c;;
@@ -7949,6 +7975,7 @@ case "$o_nonblock" in
 '')
        $cat head.c > try.c
        $cat >>try.c <<'EOCP'
+#include <stdio.h>
 int main() {
 #ifdef O_NONBLOCK
        printf("O_NONBLOCK\n");
@@ -7989,10 +8016,20 @@ case "$eagain" in
 #include <errno.h>
 #include <sys/types.h>
 #include <signal.h>
+#include <stdio.h> 
 #define MY_O_NONBLOCK $o_nonblock
 #ifndef errno  /* XXX need better Configure test */
 extern int errno;
 #endif
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#ifdef $i_string
+#include <string.h>
+#else
+#include <strings.h>
+#endif
 $signal_t blech(x) int x; { exit(3); }
 EOCP
        $cat >> try.c <<'EOCP'
@@ -8473,7 +8510,8 @@ $cat >try.c <<EOCP
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof($lseektype));
+    printf("%d\n", (int)sizeof($lseektype));
+    return(0); 
 }
 EOCP
 set try
@@ -8505,7 +8543,8 @@ cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-    printf("%d\n", sizeof($fpostype));
+    printf("%d\n", (int)sizeof($fpostype));
+    exit(0);
 }
 EOCP
 set try
@@ -8537,12 +8576,12 @@ EOCP
 set try
 if eval $compile; then
        val="$define"
-       echo " Yup, it does."
+       echo "Yes, it does."
 else
        val="$undef"
-       echo " Nope, it doesn't."
+       echo "No, it doesn't."
        case "$lseeksize" in
-       8) echo "(This is okay because your off_t is 64 bits wide.)" ;;
+       8) echo "(This is okay because your off_t is 64 bits wide.)" >&4 ;;
        esac
 fi
 $rm -f try.* try
@@ -8559,12 +8598,12 @@ EOCP
 set try
 if eval $compile; then
        val="$define"
-       echo " Yup, it does."
+       echo "Yes, it does."
 else
        val="$undef"
-       echo " Nope, it doesn't."
+       echo "No, it doesn't."
        case "$fpossize" in
-       8) echo "(This is okay because your fpos_t is 64 bits wide.)" ;;
+       8) echo "(This is okay because your fpos_t is 64 bits wide.)" >&4 ;;
        esac
 fi
 $rm -f try.* try
@@ -8607,8 +8646,8 @@ 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 "Yup, it does."     ;;
-*)              echo "Nope, it doesn't." ;;
+"$define")      echo "Yes, it does."   ;;
+*)              echo "No, it doesn't." ;;
 esac
 
 : see if fseeko exists
@@ -8935,28 +8974,6 @@ esac
 set d_htonl
 eval $setvar
 
-: see which of string.h or strings.h is needed
-echo " "
-strings=`./findhdr string.h`
-if $test "$strings" && $test -r "$strings"; then
-       echo "Using <string.h> instead of <strings.h>." >&4
-       val="$define"
-else
-       val="$undef"
-       strings=`./findhdr strings.h`
-       if $test "$strings" && $test -r "$strings"; then
-               echo "Using <strings.h> instead of <string.h>." >&4
-       else
-               echo "No string header found -- You'll surely have problems." >&4
-       fi
-fi
-set i_string
-eval $setvar
-case "$i_string" in
-"$undef") strings=`./findhdr strings.h`;;
-*)       strings=`./findhdr string.h`;;
-esac
-
 : index or strchr
 echo " "
 if set index val -f; eval $csym; $val; then
@@ -9017,11 +9034,9 @@ set i_inttypes
 eval $setvar
 
 : check for int64_t
-case "$use64bits" in
-"$define" )
-       echo " "
-       $echo $n "Checking to see if your system supports int64_t...$c" >&4
-       $cat >try.c <<EOCP
+echo " "
+$echo $n "Checking to see if your system supports int64_t...$c" >&4
+$cat >try.c <<EOCP
 #include <sys/types.h>
 #$i_inttypes I_INTTYPES
 #ifdef I_INTTYPES
@@ -9029,23 +9044,18 @@ case "$use64bits" in
 #endif
 int main() { int64_t x = 7; }
 EOCP
-       set try
-       if eval $compile; then
-               val="$define"
-               echo " Yes, it does." >&4
-       else
-               val="$undef"
-               echo " No, it doesn't." >&4
-       fi
-       $rm -f try try.*
-       ;;
-*)     val="$undef"
-       ;;
-esac
+set try
+if eval $compile; then
+       val="$define"
+       echo " Yes, it does." >&4
+else
+       val="$undef"
+       echo " No, it doesn't." >&4
+fi
+$rm -f try try.*
 set d_int64t
 eval $setvar
 
-
 : Look for isascii
 echo " "
 $cat >isascii.c <<'EOCP'
@@ -9149,7 +9159,7 @@ eval $inlibc
 : check for long long
 echo " "
 $echo $n "Checking to see if your system supports long long..." $c >&4
-echo 'int main() { long long x = 7; }' > try.c
+echo 'int main() { long long x = 7; return 0; }' > try.c
 set try
 if eval $compile; then
        val="$define"
@@ -9171,7 +9181,8 @@ $define)
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof(long long));
+    printf("%d\n", (int)sizeof(long long));
+    return(0);
 }
 EOCP
        set try
@@ -9532,6 +9543,69 @@ $define)
        ;;
 esac
 
+
+echo " "
+echo "Checking which 64-bit integer type we could use..." >&4
+
+case "$intsize" in
+8) val=int
+   set quadtype
+   eval $setvar
+   val='"unsigned int"'
+   set uquadtype
+   eval $setvar
+   quadkind=1
+   ;;
+*) case "$longsize" in
+   8) val=long
+      set quadtype
+      eval $setvar
+      val='"unsigned long"'
+      set uquadtype
+      eval $setvar
+      quadkind=2
+      ;;
+   *) case "$uselonglong:$d_longlong:$longlongsize" in
+      define:define:8)
+        val='"long long"'
+        set quadtype
+        eval $setvar
+        val='"unsigned long long"'
+        set uquadtype
+        eval $setvar
+        quadkind=3
+        ;;
+      *) case "$d_int64t" in
+         define)
+           val=int64_t
+           set quadtype
+           eval $setvar
+           val=uint64_t
+           set uquadtype
+           eval $setvar
+           quadkind=4
+           ;;
+         esac
+         ;;
+      esac
+      ;;
+   esac
+   ;;
+esac
+
+case "$quadtype" in
+'')    case "$uselonglong:$d_longlong:$longlongsize" in
+       undef:define:8)
+          echo "(You would have 'long long', but you are not using it.)" >&4 ;;
+       *) echo "Alas, no 64-bit integer types in sight." >&4 ;;
+       esac
+       d_quad="$undef"
+       ;;
+*)     echo "We could use '$quadtype' for 64-bit integers." >&4
+       d_quad="$define"
+       ;;
+esac
+
 : see if readdir and friends exist
 set readdir d_readdir
 eval $inlibc
@@ -10254,6 +10328,8 @@ int main()
     struct sigaction act, oact;
     act.sa_flags = 0;
     oact.sa_handler = 0;
+    /* so that act and oact are used */
+    exit(act.sa_flags == 0 &&  oact.sa_handler == 0);
 }
 EOP
        set try
@@ -10346,8 +10422,8 @@ 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 "Yup, it does."     ;;
-*)              echo "Nope, it doesn't." ;;
+"$define")      echo "Yes, it does."   ;;
+*)              echo "No, it doesn't." ;;
 esac
 
 
@@ -10366,8 +10442,8 @@ define)
        ;;
 esac
 case "$d_statfs_f_flags" in
-"$define")      echo "Yup, it does."     ;;
-*)              echo "Nope, it doesn't." ;;
+"$define")      echo "Yes, it does."   ;;
+*)              echo "No, it doesn't." ;;
 esac
 
 : see if _ptr and _cnt from stdio act std
@@ -10888,13 +10964,15 @@ EOM
        case "$alignbytes" in
        '') echo "Checking alignment constraints..." >&4
                $cat >try.c <<'EOCP'
+#include <stdio.h>
 struct foobar {
        char foo;
        double bar;
 } try_algn;
 int main()
 {
-       printf("%d\n", (char *)&try_algn.bar - (char *)&try_algn.foo);
+    printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
+    return(0);
 }
 EOCP
                set try
@@ -11675,35 +11753,29 @@ case "$gidtype" in
 *_t) zzz="$gidtype"    ;;
 *)   zzz="gid"         ;;
 esac
-echo "Checking the sign of $zzz..." >&4 
+echo "Checking the size of $zzz..." >&4 
 cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-       $gidtype foo = -1;
-       if (foo < 0)
-               printf("-1\n");
-       else
-               printf("1\n");
+    printf("%d\n", (int)sizeof($gidtype));
+    exit(0);
 }
 EOCP
 set try
-if eval $compile; then
+if eval $compile_ok; then
        yyy=`./try`
        case "$yyy" in
-       '')     gidsign=1
-               echo "(I can't execute the test program--guessing unsigned.)" >&4
+       '')     gidsize=4
+               echo "(I can't execute the test program--guessing $gidsize.)" >&4
                ;;
-       *)      gidsign=$yyy
-               case "$gidsign" in
-                1) echo "Your $zzz is unsigned." ;;
-               -1) echo "Your $zzz is signed."   ;;
-               esac
+       *)      gidsize=$yyy
+               echo "Your $zzz size is $gidsize bytes."
                ;;
        esac
 else
-       gidsign=1
-       echo "(I can't compile the test program--guessing unsigned.)" >&4
+       gidsize=4
+       echo "(I can't compile the test program--guessing $gidsize.)" >&4
 fi
 
 
@@ -11712,125 +11784,49 @@ case "$gidtype" in
 *_t) zzz="$gidtype"    ;;
 *)   zzz="gid"         ;;
 esac
-echo "Checking the size of $zzz..." >&4 
+echo "Checking the sign of $zzz..." >&4 
 cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-    printf("%d\n", sizeof($gidtype));
+       $gidtype foo = -1;
+       if (foo < 0)
+               printf("-1\n");
+       else
+               printf("1\n");
 }
 EOCP
 set try
-if eval $compile_ok; then
+if eval $compile; then
        yyy=`./try`
        case "$yyy" in
-       '')     gidsize=4
-               echo "(I can't execute the test program--guessing $gidsize.)" >&4
+       '')     gidsign=1
+               echo "(I can't execute the test program--guessing unsigned.)" >&4
                ;;
-       *)      gidsize=$yyy
-               echo "Your $zzz size is $gidsize bytes."
+       *)      gidsign=$yyy
+               case "$gidsign" in
+                1) echo "Your $zzz is unsigned." ;;
+               -1) echo "Your $zzz is signed."   ;;
+               esac
                ;;
        esac
 else
-       gidsize=4
-       echo "(I can't compile the test program--guessing $gidsize.)" >&4
+       gidsign=1
+       echo "(I can't compile the test program--guessing unsigned.)" >&4
 fi
 
 
-: see if getgroups exists
-set getgroups d_getgrps
-eval $inlibc
-
-: see if setgroups exists
-set setgroups d_setgrps
-eval $inlibc
-
-
-: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
-echo " "
-case "$d_getgrps$d_setgrps" in
-*define*)
-       case "$groupstype" in
-       '') dflt="$gidtype" ;;
-       *)  dflt="$groupstype" ;;
-       esac
-       $cat <<EOM
-What type of pointer is the second argument to getgroups() and setgroups()?
-Usually this is the same as group ids, $gidtype, but not always.
-
-EOM
-       rp='What type pointer is the second argument to getgroups() and setgroups()?'
-       . ./myread
-       groupstype="$ans"
-       ;;
-*)  groupstype="$gidtype";;
-esac
-
-
-echo " "
-echo "Checking which 64-bit integer type to use..." >&4
-
-case "$intsize" in
-8) val=int
-   set quadtype
-   eval $setvar
-   val='"unsigned int"'
-   set uquadtype
-   eval $setvar
-   quadcase=1
-   ;;
-*) case "$longsize" in
-   8) val=long
-      set quadtype
-      eval $setvar
-      val='"unsigned long"'
-      set uquadtype
-      eval $setvar
-      quadcase=2
-      ;;
-   *) case "$uselonglong:$d_longlong:$longlongsize" in
-      define:define:8)
-        val='"long long"'
-        set quadtype
-        eval $setvar
-        val='"unsigned long long"'
-        set uquadtype
-        eval $setvar
-        quadcase=3
-        ;;
-      *) case "$d_int64t" in
-         define)
-           val=int64_t
-           set quadtype
-           eval $setvar
-           val=uint64_t
-           set uquadtype
-           eval $setvar
-           quadcase=4
-           ;;
-         esac
-         ;;
-      esac
-      ;;
-   esac
-   ;;
-esac
-
-case "$quadtype" in
-'') echo "Alas, no 64-bit integer types in sight."    >&4 ;;
-*)  echo "Using '$quadtype' for 64-bit integers." >&4 ;;
-esac
-
 : check for length of character
 echo " "
 case "$charsize" in
 '')
-       echo "Checking to see how big your characters are..." >&4
+       echo "Checking to see how big your characters are (hey, you never know)..." >&4
        $cat >try.c <<'EOCP'
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof(char));
+    printf("%d\n", (int)sizeof(char));
+    exit(0);
 }
 EOCP
        set try
@@ -11854,8 +11850,8 @@ $rm -f try.c try
 echo " "
 $echo "Choosing the C types to be used for Perl's internal types..." >&4
 
-case "$use64bits:$quadtype" in
-define:?*)
+case "$use64bits:$d_quad:$quadtype" in
+define:define:?*)
        ivtype="$quadtype"
        uvtype="$uquadtype"
        ivsize=8
@@ -11904,64 +11900,81 @@ int main() {
   uint32_t u = UINT32_MAX;
   printf("int32_t\n");
 #endif
-#ifdef INT64
-   int64_t i =  INT64_MAX;
-  uint64_t u = UINT64_MAX;
-  printf("int64_t\n");
-#endif
 }
 EOCP
-set try -DINT8
-if eval $compile; then
-       case "`./try$exe_ext`" in
-       int8_t) i8type=int8_t
-               u8type=uint8_t
-               i8size=1
-               u8size=1
+
+case "$i8type" in
+'')    case "$charsize" in
+       1)      i8type=char
+               u8type="unsigned char"
+               i8size=$charsize
+               u8size=$charsize
                ;;
        esac
-fi
+       ;;
+esac
 case "$i8type" in
-'')    i8type=char
-       u8type="unsigned char"
-       i8size=$charsize
-       u8size=$charsize
+'')    set try -DINT8
+       if eval $compile; then
+               case "`./try$exe_ext`" in
+               int8_t) i8type=int8_t
+                       u8type=uint8_t
+                       i8size=1
+                       u8size=1
+                       ;;
+               esac
+       fi
        ;;
 esac
-set try -DINT16
-if eval $compile; then
-       case "`./try$exe_ext`" in
-       int16_t)
-               i16type=int16_t
-               u16type=uint16_t
-               i16size=2
-               u16size=2
+case "$i8type" in
+'')    if $test $charsize -ge 1; then
+               i8type=char
+               u8type="unsigned char"
+               i8size=$charsize
+               u8size=$charsize
+       fi
+       ;;
+esac
+
+case "$i16type" in
+'')    case "$shortsize" in
+       2)      i16type=short
+               u16type="unsigned short"
+               i16size=$shortsize
+               u16size=$shortsize
                ;;
        esac
-fi
+       ;;
+esac
 case "$i16type" in
-'')    i16type=short
-       u16type="unsigned short"
-       i16size=$shortsize
-       u16size=$shortsize
+'')    set try -DINT16
+       if eval $compile; then
+               case "`./try$exe_ext`" in
+               int16_t)
+                       i16type=int16_t
+                       u16type=uint16_t
+                       i16size=2
+                       u16size=2
+                       ;;
+               esac
+       fi
        ;;
 esac
-set try -DINT32
-if eval $compile; then
-       case "`./try$exe_ext`" in
-       int32_t)
-               i32type=int32_t
-               u32type=uint32_t
-               i32size=4
-               u32size=4
-               ;;
-       esac
-fi
+case "$i16type" in
+'')    if $test $shortsize -ge 2; then
+               i16type=short
+               u16type="unsigned short"
+               i16size=$shortsize
+               u16size=$shortsize
+       fi
+       ;;
+esac
+
 case "$i32type" in
 '')    case "$longsize" in
        4)      i32type=long
                u32type="unsigned long"
-               i32size=longsize
+               i32size=$longsize
                u32size=$longsize
                ;;
        *)      case "$intsize" in
@@ -11975,21 +11988,34 @@ case "$i32type" in
        esac
        ;;
 esac
-set try -DINT64
-if eval $compile; then
-       case "`./try$exe_ext`" in
-       int64_t)
-               i64type=int64_t
-               u64type=uint64_t
-               i64size=8
-               u64size=8
-               ;;
-       esac
-fi
+case "$i32type" in
+'')    set try -DINT32
+       if eval $compile; then
+               case "`./try$exe_ext`" in
+               int32_t)
+                       i32type=int32_t
+                       u32type=uint32_t
+                       i32size=4
+                       u32size=4
+                       ;;
+               esac
+       fi
+       ;;
+esac
+case "$i32type" in
+'')    if $test $intsize -ge 4; then
+               i32type=int
+               u32type="unsigned int"
+               i32size=$intsize
+               u32size=$intsize
+       fi
+       ;;
+esac
+
 case "$i64type" in
-'')    case "$quadtype" in
-       '')     ;;
-       *)      i64type="$quadtype"
+'')    case "$d_quad:$quadtype" in
+       define:?*)
+               i64type="$quadtype"
                u64type="$uquadtype"
                i64size=8
                u64size=8
@@ -12195,6 +12221,74 @@ case "$ivdformat" in
     ;;
 esac
 
+
+echo " "
+$echo "Checking the format string to be used for gids..." >&4
+
+case "$gidsign" in
+-1)    if $test X"$gidsize" = X"$ivsize"; then
+               gidformat="$ivdformat"
+       else
+               if $test X"$gidsize" = X"$longsize"; then
+                       gidformat='"ld"'
+               else
+                       if $test X"$gidsize" = X"$intsize"; then
+                               gidformat='"d"'
+                       else
+                               if $test X"$gidsize" = X"$shortsize"; then
+                                       gidformat='"hd"'
+                               fi
+                       fi
+               fi
+       fi
+       ;;
+*)     if $test X"$gidsize" = X"$uvsize"; then
+               gidformat="$uvuformat"
+       else
+               if $test X"$gidsize" = X"$longsize"; then
+                       gidformat='"lu"'
+               else
+                       if $test X"$gidsize" = X"$intsize"; then
+                               gidformat='"u"'
+                       else
+                               if $test X"$gidsize" = X"$shortsize"; then
+                                       gidformat='"hu"'
+                               fi
+                       fi
+               fi
+       fi
+       ;;
+esac
+
+: see if getgroups exists
+set getgroups d_getgrps
+eval $inlibc
+
+: see if setgroups exists
+set setgroups d_setgrps
+eval $inlibc
+
+
+: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
+echo " "
+case "$d_getgrps$d_setgrps" in
+*define*)
+       case "$groupstype" in
+       '') dflt="$gidtype" ;;
+       *)  dflt="$groupstype" ;;
+       esac
+       $cat <<EOM
+What type of pointer is the second argument to getgroups() and setgroups()?
+Usually this is the same as group ids, $gidtype, but not always.
+
+EOM
+       rp='What type pointer is the second argument to getgroups() and setgroups()?'
+       . ./myread
+       groupstype="$ans"
+       ;;
+*)  groupstype="$gidtype";;
+esac
+
 echo " "
 echo "Checking if your $make program sets \$(MAKE)..." >&4
 case "$make_set_make" in
@@ -12446,8 +12540,8 @@ case "$ptrsize" in
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof(VOID_PTR));
-       exit(0);
+    printf("%d\n", (int)sizeof(VOID_PTR));
+    exit(0);
 }
 EOCP
        set try
@@ -12759,7 +12853,7 @@ echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
 }
 END {
        printf "#endif /* JUST_NSIG */\n";
-       printf "}\n";
+       printf "exit(0);\n}\n";
 }
 ' >>signal.c
 $cat >signal.awk <<'EOP'
@@ -13006,67 +13100,107 @@ case "$uidtype" in
 *_t) zzz="$uidtype"    ;;
 *)   zzz="uid"         ;;
 esac
-echo "Checking the sign of $zzz..." >&4
+echo "Checking the size of $zzz..." >&4 
 cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-       $uidtype foo = -1;
-       if (foo < 0)
-               printf("-1\n");
-       else
-               printf("1\n");
+    printf("%d\n", (int)sizeof($uidtype));
+    exit(0);
 }
 EOCP
 set try
-if eval $compile; then
+if eval $compile_ok; then
        yyy=`./try`
        case "$yyy" in
-       '')     uidsign=1
-               echo "(I can't execute the test program--guessing unsigned.)" >&4
+       '')     uidsize=4
+               echo "(I can't execute the test program--guessing $uidsize.)" >&4
                ;;
-       *)      uidsign=$yyy
-               case "$uidsign" in
-                1) echo "Your $zzz is unsigned." ;;
-               -1) echo "Your $zzz is signed."   ;;
-               esac
+       *)      uidsize=$yyy
+               echo "Your $zzz size is $uidsize bytes."
                ;;
        esac
 else
-       uidsign=1
-       echo "(I can't compile the test program--guessing unsigned.)" >&4
+       uidsize=4
+       echo "(I can't compile the test program--guessing $uidsize.)" >&4
 fi
 
-
 echo " "
 case "$uidtype" in
 *_t) zzz="$uidtype"    ;;
 *)   zzz="uid"         ;;
 esac
-echo "Checking the size of $zzz..." >&4 
+echo "Checking the sign of $zzz..." >&4
 cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-    printf("%d\n", sizeof($uidtype));
+       $uidtype foo = -1;
+       if (foo < 0)
+               printf("-1\n");
+       else
+               printf("1\n");
 }
 EOCP
 set try
-if eval $compile_ok; then
+if eval $compile; then
        yyy=`./try`
        case "$yyy" in
-       '')     uidsize=4
-               echo "(I can't execute the test program--guessing $uidsize.)" >&4
+       '')     uidsign=1
+               echo "(I can't execute the test program--guessing unsigned.)" >&4
                ;;
-       *)      uidsize=$yyy
-               echo "Your $zzz size is $uidsize bytes."
+       *)      uidsign=$yyy
+               case "$uidsign" in
+                1) echo "Your $zzz is unsigned." ;;
+               -1) echo "Your $zzz is signed."   ;;
+               esac
                ;;
        esac
 else
-       uidsize=4
-       echo "(I can't compile the test program--guessing $uidsize.)" >&4
+       uidsign=1
+       echo "(I can't compile the test program--guessing unsigned.)" >&4
 fi
 
+
+
+echo " "
+$echo "Checking the format string to be used for uids..." >&4
+
+case "$uidsign" in
+-1)    if $test X"$uidsize" = X"$ivsize"; then
+               uidformat="$ivdformat"
+       else
+               if $test X"$uidsize" = X"$longsize"; then
+                       uidformat='"ld"'
+               else
+                       if $test X"$uidsize" = X"$intsize"; then
+                               uidformat='"d"'
+                       else
+                               if $test X"$uidsize" = X"$shortsize"; then
+                                       uidformat='"hd"'
+                               fi
+                       fi
+               fi
+       fi
+       ;;
+*)     if $test X"$uidsize" = X"$uvsize"; then
+               uidformat="$uvuformat"
+       else
+               if $test X"$uidsize" = X"$longsize"; then
+                       uidformat='"lu"'
+               else
+                       if $test X"$uidsize" = X"$intsize"; then
+                               uidformat='"u"'
+                       else
+                               if $test X"$uidsize" = X"$shortsize"; then
+                                       uidformat='"hu"'
+                               fi
+                       fi
+               fi
+       fi
+       ;;
+esac
+
 : see if dbm.h is available
 : see if dbmclose exists
 set dbmclose d_dbmclose
@@ -14146,6 +14280,7 @@ d_pwexpire='$d_pwexpire'
 d_pwgecos='$d_pwgecos'
 d_pwpasswd='$d_pwpasswd'
 d_pwquota='$d_pwquota'
+d_quad='$d_quad'
 d_readdir='$d_readdir'
 d_readlink='$d_readlink'
 d_rename='$d_rename'
@@ -14282,6 +14417,7 @@ full_ar='$full_ar'
 full_csh='$full_csh'
 full_sed='$full_sed'
 gccversion='$gccversion'
+gidformat='$gidformat'
 gidsign='$gidsign'
 gidsize='$gidsize'
 gidtype='$gidtype'
@@ -14489,7 +14625,7 @@ privlib='$privlib'
 privlibexp='$privlibexp'
 prototype='$prototype'
 ptrsize='$ptrsize'
-quadcase='$quadcase'
+quadkind='$quadkind'
 quadtype='$quadtype'
 randbits='$randbits'
 randfunc='$randfunc'
@@ -14586,6 +14722,7 @@ u64size='$u64size'
 u64type='$u64type'
 u8size='$u8size'
 u8type='$u8type'
+uidformat='$uidformat'
 uidsign='$uidsign'
 uidsize='$uidsize'
 uidtype='$uidtype'