summaryrefslogtreecommitdiff
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
parentdd35fa16610ef2fa0d46f5129e626b99cf350d77 (diff)
downloadperl-668fdbe135fd76c7a654bedba52770966925f562.tar.gz
Add st_ino size/sign probes
Work initiated by Tony Cook
-rwxr-xr-xConfigure74
-rw-r--r--Cross/config.sh-arm-linux2
-rw-r--r--NetWare/config.wc2
-rw-r--r--Porting/Glossary7
-rw-r--r--Porting/config.sh2
-rwxr-xr-xconfig_h.SH10
-rw-r--r--epoc/config.sh2
-rw-r--r--metaconfig.h2
-rw-r--r--plan9/config_sh.sample2
-rw-r--r--symbian/config.sh2
-rw-r--r--uconfig.sh2
-rw-r--r--win32/config.bc2
-rw-r--r--win32/config.ce2
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.gc642
-rw-r--r--win32/config.gc64nox2
-rw-r--r--win32/config.vc2
-rw-r--r--win32/config.vc642
18 files changed, 120 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'
diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux
index 8e72449a02..04624202a7 100644
--- a/Cross/config.sh-arm-linux
+++ b/Cross/config.sh-arm-linux
@@ -977,6 +977,8 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
stdio_filbuf=''
stdio_ptr='((fp)->_IO_read_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/NetWare/config.wc b/NetWare/config.wc
index 2c2d1aafa4..e0cd3005d9 100644
--- a/NetWare/config.wc
+++ b/NetWare/config.wc
@@ -942,6 +942,8 @@ stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/Porting/Glossary b/Porting/Glossary
index 1826f818c6..9134dfa1b6 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -4750,6 +4750,13 @@ ssizetype (ssizetype.U):
of bytes or an error condition. It must be a signed type.
We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+st_ino_sign (st_ino_def.U):
+ This variable contains the signedness of struct stat's st_ino.
+ 1 for unsigned, -1 for signed.
+
+st_ino_size (st_ino_def.U):
+ This variable contains the size of struct stat's st_ino in bytes.
+
startperl (startperl.U):
This variable contains the string to put on the front of a perl
script to make sure (hopefully) that it runs with perl and not some
diff --git a/Porting/config.sh b/Porting/config.sh
index 4e3c8d3b13..99a909722f 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -999,6 +999,8 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
stdio_filbuf=''
stdio_ptr='((fp)->_IO_read_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/config_h.SH b/config_h.SH
index 2f3e5bdcb3..2903587a8e 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -4387,6 +4387,16 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#define SELECT_MIN_BITS $selectminbits /**/
+/* ST_INO_SIZE:
+ * This variable contains the size of struct stat's st_ino in bytes.
+ */
+/* ST_INO_SIGN:
+ * This symbol holds the signedess of struct stat's st_ino.
+ * 1 for unsigned, -1 for signed.
+ */
+#define ST_INO_SIGN $st_ino_sign /* st_ino sign */
+#define ST_INO_SIZE $st_ino_size /* st_ino size */
+
/* STARTPERL:
* This variable contains the string to put in front of a perl
* script to make sure (one hopes) that it runs with perl and not
diff --git a/epoc/config.sh b/epoc/config.sh
index eedc6a8b23..5c7f6d51f1 100644
--- a/epoc/config.sh
+++ b/epoc/config.sh
@@ -858,6 +858,8 @@ stdio_cnt=''
stdio_filbuf=''
stdio_ptr=''
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings=''
submit=''
diff --git a/metaconfig.h b/metaconfig.h
index 95aba26b87..d445b34391 100644
--- a/metaconfig.h
+++ b/metaconfig.h
@@ -35,6 +35,8 @@
* LOCALTIME_MAX
* LOCALTIME_MIN
* LOCALTIME_R_NEEDS_TZSET
+ * ST_INO_SIGN
+ * ST_INO_SIZE
* U16SIZE
* U32SIZE
* U64SIZE
diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample
index 79d8f555f5..f560115b3e 100644
--- a/plan9/config_sh.sample
+++ b/plan9/config_sh.sample
@@ -948,6 +948,8 @@ stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/sys/include/ape/string.h'
submit=''
diff --git a/symbian/config.sh b/symbian/config.sh
index 7e47f6232a..2e531ae34d 100644
--- a/symbian/config.sh
+++ b/symbian/config.sh
@@ -779,6 +779,8 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
stdio_filbuf=''
stdio_ptr='((fp)->_IO_read_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
targetarch='thumb-symbian'
timetype=time_t
diff --git a/uconfig.sh b/uconfig.sh
index 5fb50a01a8..1798d0d6d4 100644
--- a/uconfig.sh
+++ b/uconfig.sh
@@ -745,6 +745,8 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
stdio_filbuf=''
stdio_ptr='((fp)->_IO_read_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
targetarch=''
timetype=time_t
diff --git a/win32/config.bc b/win32/config.bc
index fe74f6834c..2dc5063838 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -973,6 +973,8 @@ stdio_cnt='((fp)->level)'
stdio_filbuf=''
stdio_ptr='((fp)->curp)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/win32/config.ce b/win32/config.ce
index 5f87f64b16..47eeb71968 100644
--- a/win32/config.ce
+++ b/win32/config.ce
@@ -934,6 +934,8 @@ stdio_cnt=''
stdio_filbuf=''
stdio_ptr=''
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/win32/config.gc b/win32/config.gc
index 2c3f9e6b6b..c49a27bfca 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -973,6 +973,8 @@ stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/win32/config.gc64 b/win32/config.gc64
index 876bcda720..c883708be8 100644
--- a/win32/config.gc64
+++ b/win32/config.gc64
@@ -974,6 +974,8 @@ stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='8'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/win32/config.gc64nox b/win32/config.gc64nox
index c70aa96f34..0fe790490d 100644
--- a/win32/config.gc64nox
+++ b/win32/config.gc64nox
@@ -974,6 +974,8 @@ stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='8'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/win32/config.vc b/win32/config.vc
index 6f4ddace40..3495a2369c 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -973,6 +973,8 @@ stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='4'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
diff --git a/win32/config.vc64 b/win32/config.vc64
index fd903894da..c9b1cb77cb 100644
--- a/win32/config.vc64
+++ b/win32/config.vc64
@@ -973,6 +973,8 @@ stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
stdio_stream_array=''
+st_ino_sign='1'
+st_ino_size='8'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''