Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add st_ino size/sign probes

Work initiated by Tony Cook
  • Loading branch information...
commit 668fdbe135fd76c7a654bedba52770966925f562 1 parent dd35fa1
@Tux Tux authored
View
74 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'
View
2  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=''
View
2  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=''
View
7 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
View
2  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=''
View
10 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
View
2  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=''
View
2  metaconfig.h
@@ -35,6 +35,8 @@
* LOCALTIME_MAX
* LOCALTIME_MIN
* LOCALTIME_R_NEEDS_TZSET
+ * ST_INO_SIGN
+ * ST_INO_SIZE
* U16SIZE
* U32SIZE
* U64SIZE
View
2  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=''
View
2  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
View
2  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
View
2  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=''
View
2  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=''
View
2  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=''
View
2  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=''
View
2  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=''
View
2  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=''
View
2  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=''
Please sign in to comment.
Something went wrong with that request. Please try again.