This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Nit for #5802 from Robin Barker.
[perl5.git] / Configure
index 9803dc7..34a2dc2 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 Thu Mar 16 00:41:53 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Tue Mar 21 17:30:20 EET 2000 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -868,6 +868,7 @@ sitelib_stem=''
 sitelibexp=''
 siteprefix=''
 siteprefixexp=''
+sizesize=''
 sizetype=''
 so=''
 socksizetype=''
@@ -3311,13 +3312,15 @@ while test "$type"; do
                        Directory)
                                for fp in $gfpth; do
                                        if test "X$fp" = X.; then
-                                           pf="$ansexp"
+                                           dir="$ans"
+                                           direxp="$ansexp"
                                        else    
-                                           pf="$fp/$ansexp"
+                                           dir="$fp/$ansexp"
+                                           direxp="$fp/$ansexp"
                                        fi
-                                       if test -d "$pf"; then
+                                       if test -d "$direxp"; then
                                                type=''
-                                               value="$pf"
+                                               value="$dir"
                                                break
                                        fi
                                done
@@ -4914,9 +4917,9 @@ case "$usethreads$usemultiplicity" in
        ;;
 *)     $cat <<EOM
 
-Perl 5.006 can be compiled for binary compatibility with 5.005.
-If you decide to do so, you will be able to continue using most
-of the extensions that were compiled for Perl 5.005.
+This version of Perl can be compiled for binary compatibility with 5.005.
+If you decide to do so, you will be able to continue using most of the
+extensions that were compiled for Perl 5.005.
 
 EOM
        case "$bincompat5005$d_bincompat5005" in
@@ -13788,6 +13791,37 @@ echo $sig_name | $awk \
 }'
 $rm -f signal signal.c signal.awk signal.lst signal_cmd 
 
+echo " "
+case "$sizetype" in
+*_t) zzz="$sizetype"   ;;
+*)   zzz="filesize"    ;;
+esac
+echo "Checking the size of $zzz..." >&4 
+cat > try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+    printf("%d\n", (int)sizeof($sizetype));
+    exit(0);
+}
+EOCP
+set try
+if eval $compile_ok; then
+       yyy=`./try`
+       case "$yyy" in
+       '')     sizesize=4
+               echo "(I can't execute the test program--guessing $sizesize.)" >&4
+               ;;
+       *)      sizesize=$yyy
+               echo "Your $zzz size is $sizesize bytes."
+               ;;
+       esac
+else
+       sizesize=4
+       echo "(I can't compile the test program--guessing $sizesize.)" >&4
+fi
+
+
 : check for socklen_t
 echo " "
 echo "Checking to see if you have socklen_t..." >&4
@@ -13807,7 +13841,7 @@ else
        val="$undef"
        echo "You do not have socklen_t."
        case "$sizetype" in
-       size_t) echo "(You do have size_t, that might work.)" ;;
+       size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
        esac
 fi
 $rm -f try try.*
@@ -13826,7 +13860,7 @@ EOM
        case "$d_socklen_t" in
        "$define") yyy="$yyy socklen_t"
        esac
-       yyy="$yyy $sizetype int long"
+       yyy="$yyy $sizetype int long unsigned"
        for xxx in $yyy; do
                case "$socksizetype" in
                '')     try="extern int accept(int, struct sockaddr *, $xxx *);"
@@ -13846,8 +13880,8 @@ EOM
                ;;
        esac
        ;;
-*)     : no sockets, so pick relatively harmless defaults
-       socksizetype='char *'
+*)     : no sockets, so pick relatively harmless default
+       socksizetype='int'
        ;;
 esac
 
@@ -15674,6 +15708,7 @@ sitelib_stem='$sitelib_stem'
 sitelibexp='$sitelibexp'
 siteprefix='$siteprefix'
 siteprefixexp='$siteprefixexp'
+sizesize='$sizesize'
 sizetype='$sizetype'
 sleep='$sleep'
 smail='$smail'