summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2011-07-31 12:15:23 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2011-07-31 12:15:23 +0200
commit668fdbe135fd76c7a654bedba52770966925f562 (patch)
treeed78148bf4e27690111dec532f3168a6b745f1f0 /Configure
parentdd35fa16610ef2fa0d46f5129e626b99cf350d77 (diff)
downloadperl-668fdbe135fd76c7a654bedba52770966925f562.tar.gz
Add st_ino size/sign probes
Work initiated by Tony Cook
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure74
1 files changed, 73 insertions, 1 deletions
diff --git a/Configure b/Configure
index f68f0e79e1..74450a95e6 100755
--- a/Configure
+++ b/Configure
@@ -28,7 +28,7 @@
# See Porting/pumpkin.pod for more information on metaconfig.
#
-# Generated on Sun Jul 31 12:06:46 CEST 2011 [metaconfig 3.5 PL0]
+# Generated on Sun Jul 31 12:11:29 CEST 2011 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -1194,6 +1194,8 @@ shsharp=''
spitshell=''
src=''
ssizetype=''
+st_ino_sign=''
+st_ino_size=''
startperl=''
startsh=''
stdchar=''
@@ -21117,6 +21119,74 @@ EOM
fi
$rm_try
+: Check the size of st_ino
+$echo " "
+$echo "Checking the size of st_ino..." >&4
+$cat > try.c <<EOCP
+#include <sys/stat.h>
+#include <stdio.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main() {
+ struct stat st;
+ printf("%d\n", (int)sizeof(st.st_ino));
+ exit(0);
+}
+EOCP
+set try
+if eval $compile_ok; then
+ val=`$run ./try`
+ case "$val" in
+ '') st_ino_size=4
+ $echo "(I can't execute the test program--guessing $st_ino_size.)" >&4
+ ;;
+ *) st_ino_size=$val
+ $echo "Your st_ino is $st_ino_size bytes long."
+ ;;
+ esac
+else
+ st_ino_size=4
+ $echo "(I can't compile the test program--guessing $st_ino_size.)" >&4
+fi
+$rm_try
+
+: Check if st_ino is signed
+$echo " "
+$echo "Checking the sign of st_ino..." >&4
+$cat > try.c <<EOCP
+#include <sys/stat.h>
+#include <stdio.h>
+int main() {
+ struct stat foo;
+ foo.st_ino = -1;
+ if (foo.st_ino < 0)
+ printf("-1\n");
+ else
+ printf("1\n");
+}
+EOCP
+set try
+if eval $compile; then
+ val=`$run ./try`
+ case "$val" in
+ '') st_ino_sign=1
+ $echo "(I can't execute the test program--guessing unsigned.)" >&4
+ ;;
+ *) st_ino_sign=$val
+ case "$st_ino_sign" in
+ 1) $echo "Your st_ino is unsigned." ;;
+ -1) $echo "Your st_ino is signed." ;;
+ esac
+ ;;
+ esac
+else
+ st_ino_sign=1
+ $echo "(I can't compile the test program--guessing unsigned.)" >&4
+fi
+$rm_try
+
: see what type of char stdio uses.
echo " "
echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
@@ -23277,6 +23347,8 @@ srand48_r_proto='$srand48_r_proto'
srandom_r_proto='$srandom_r_proto'
src='$src'
ssizetype='$ssizetype'
+st_ino_sign='$st_ino_sign'
+st_ino_size='$st_ino_size'
startperl='$startperl'
startsh='$startsh'
static_ext='$static_ext'