summaryrefslogtreecommitdiff
path: root/configure.com
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2011-08-12 07:51:10 -0500
committerCraig A. Berry <craigberry@mac.com>2011-08-12 07:51:10 -0500
commit1766075810712c2dd8a5fd6ced3ee862f7de045c (patch)
treeb5b819f66efbe5f55863c4660fd5e1b8a15d3d8f /configure.com
parenteb796c7f1a47acbd996034731639c1bb76e31a19 (diff)
downloadperl-1766075810712c2dd8a5fd6ced3ee862f7de045c.tar.gz
Better st_ino_size probe in configure.com.
Follow-up to adf2bd2837. This is being used for compile-time comparisons; sizeof may be compile-time, but is apparently not available before macro substitution, leading to problems like: ....^ %CC-I-IGNOREEXTRA, Spurious token(s) ignored on preprocessor directive line. at line number 2837 in file MDA0:[SMOKE.blead]pp_sys.c;1
Diffstat (limited to 'configure.com')
-rw-r--r--configure.com34
1 files changed, 28 insertions, 6 deletions
diff --git a/configure.com b/configure.com
index b298ffa764..2e41dae26a 100644
--- a/configure.com
+++ b/configure.com
@@ -5113,6 +5113,33 @@ $ echo4 "I'm disabling large file support."
$ uselargefiles = "undef"
$ ENDIF
$!
+$! Check for st_ino size.
+$!
+$ st_ino_size = 4
+$ OS
+$ WS "#include <sys/stat.h>"
+$ WS "#include <stdio.h>"
+$ WS "#if defined(__DECC) || defined(__DECCXX)"
+$ WS "#include <stdlib.h>
+$ WS "#endif"
+$ WS "int main() {
+$ WS "#''uselargefiles' _LARGEFILE"
+$ WS "#ifdef _LARGEFILE"
+$ WS " printf(""%d\n"", sizeof(__ino64_t));"
+$ WS "#else"
+$ WS " printf(""%d\n"", sizeof(unsigned short)*3);"
+$ WS "#endif"
+$ WS " exit(0);"
+$ WS "}"
+$ CS
+$ GOSUB link_ok
+$ IF link_status .EQ. good_link
+$ THEN
+$ GOSUB just_mcr_it
+$ st_ino_size = tmp
+$ ENDIF
+$ echo "Your st_ino size is ''st_ino_size' bytes."
+$!
$! Tests for hard link, symbolic links, and 7.3 + CRTL features
$!
$ d_lchown = "undef"
@@ -6709,12 +6736,7 @@ $ WC "src='" + src + "'"
$ WC "ssizetype='int'"
$ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
$ WC "static_ext='" + static_ext + "'"
-$ IF uselargefiles .OR. uselargefiles .eqs. "define"
-$ THEN
-$ WC "st_ino_size='sizeof(__ino64_t)'"
-$ ELSE
-$ WC "st_ino_size='(sizeof(unsigned short)*3)'"
-$ ENDIF
+$ WC "st_ino_size='" + st_ino_size + "'"
$ WC "st_ino_sign='1'"
$ WC "stdchar='" + stdchar + "'"
$ WC "stdio_base='((*fp)->_base)'"