This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add st_ino size/sign probes
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Sun, 31 Jul 2011 10:15:23 +0000 (12:15 +0200)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Sun, 31 Jul 2011 10:15:23 +0000 (12:15 +0200)
Work initiated by Tony Cook

18 files changed:
Configure
Cross/config.sh-arm-linux
NetWare/config.wc
Porting/Glossary
Porting/config.sh
config_h.SH
epoc/config.sh
metaconfig.h
plan9/config_sh.sample
symbian/config.sh
uconfig.sh
win32/config.bc
win32/config.ce
win32/config.gc
win32/config.gc64
win32/config.gc64nox
win32/config.vc
win32/config.vc64

index f68f0e7..74450a9 100755 (executable)
--- 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'
index 8e72449..0462420 100644 (file)
@@ -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=''
index 2c2d1aa..e0cd300 100644 (file)
@@ -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=''
index 1826f81..9134dfa 100644 (file)
@@ -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
index 4e3c8d3..99a9097 100644 (file)
@@ -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=''
index 2f3e5bd..2903587 100755 (executable)
@@ -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
index eedc6a8..5c7f6d5 100644 (file)
@@ -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=''
index 95aba26..d445b34 100644 (file)
@@ -35,6 +35,8 @@
  * LOCALTIME_MAX
  * LOCALTIME_MIN
  * LOCALTIME_R_NEEDS_TZSET
+ * ST_INO_SIGN
+ * ST_INO_SIZE
  * U16SIZE
  * U32SIZE
  * U64SIZE
index 79d8f55..f560115 100644 (file)
@@ -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=''
index 7e47f62..2e531ae 100644 (file)
@@ -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
index 5fb50a0..1798d0d 100644 (file)
@@ -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
index fe74f68..2dc5063 100644 (file)
@@ -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=''
index 5f87f64..47eeb71 100644 (file)
@@ -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=''
index 2c3f9e6..c49a27b 100644 (file)
@@ -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=''
index 876bcda..c883708 100644 (file)
@@ -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=''
index c70aa96..0fe7904 100644 (file)
@@ -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=''
index 6f4ddac..3495a23 100644 (file)
@@ -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=''
index fd90389..c9b1cb7 100644 (file)
@@ -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=''