X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=configure.com;h=547e5d4a5564063741eaaae4b6b8fb136d193f3d;hb=c568a9d1864be7bd340b9735735b6a68182a27fe;hp=ee0f1cce535ff92ad2b82f08f96a629bde16efd2;hpb=83d8c2948ced54f03b61a7f8d341392ec3470d96;p=p5sagit%2Fp5-mst-13.2.git diff --git a/configure.com b/configure.com index ee0f1cc..547e5d4 100644 --- a/configure.com +++ b/configure.com @@ -3183,9 +3183,8 @@ $! perllibs should be libs with all non-core libs (such as gdbm) removed. $! $ perllibs=libs $! -$! Are we 64 bit? $! -$ IF use64bitint .OR. use64bitint .EQS. "define" +$ IF archname .NES. "VMS_VAX" $ THEN $ d_PRId64 = "define" $ d_PRIu64 = "define" @@ -3201,7 +3200,11 @@ $ sPRIx64 = """Lx""" $ d_quad = "define" $ quadtype = "long long" $ uquadtype = "unsigned long long" -$ quadkind = "QUAD_IS_LONG_LONG" +$ quadkind = "3" +$! +$ d_frexpl = "define" +$ d_modfl = "define" +$ d_modflproto = "define" $ ELSE $ d_PRId64 = "undef" $ d_PRIXU64 = "undef" @@ -3215,17 +3218,10 @@ $ sPRIo64 = "" $ sPRIu64 = "" $ sPRIx64 = "" $ d_quad = "undef" -$ quadtype = "long" -$ uquadtype = "unsigned long" -$ quadkind = "QUAD_IS_LONG" -$ ENDIF +$ quadtype = "undef" +$ uquadtype = "undef" +$ quadkind = "undef" $! -$ IF archname .NES. "VMS_VAX" -$ THEN -$ d_frexpl = "define" -$ d_modfl = "define" -$ d_modflproto = "define" -$ ELSE $ d_frexpl = "undef" $ d_modfl = "undef" $ d_modflproto = "undef" @@ -3952,6 +3948,12 @@ $ tmp = "sys/mode.h" $ GOSUB inhdr $ i_sysmode = tmp $! +$! Check for poll.h +$! +$ tmp = "sys/poll.h" +$ gosub inhdr +$ i_syspoll = tmp +$! $! Check for sys/access.h $! $ tmp = "sys/access.h" @@ -5483,53 +5485,102 @@ $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)" $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)" $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)" $! -$ echo4 "Checking whether your NVs can preserve your UVs..." +$ d_nv_preserves_uv = "undef" +$ echo4 "Checking how many bits of your UVs your NVs can preserve..." $ OS $ WS "#if defined(__DECC) || defined(__DECCXX)" $ WS "#include " $ WS "#endif" $ WS "#include " $ WS "int main() {" -$ WS " ''uvtype' k = (''uvtype')~0, l;" -$ WS " ''nvtype' d;" -$ WS " l = k;" -$ WS " d = (''nvtype')l;" -$ WS " l = (''uvtype')d;" -$ WS " if (l == k)" -$ WS " printf(""preserve\n"");" +$ WS " ''uvtype' u = 0;" +$ WS " int n = 8 * ''uvsize';" +$ WS " int i;" +$ WS " for (i = 0; i < n; i++) {" +$ WS " u = u << 1 | (''uvtype')1;" +$ WS " if ((''uvtype')(''nvtype')u != u)" +$ WS " break;" +$ WS " }" +$ WS " printf(""%d\n"", i);" $ WS " exit(0);" $ WS "}" $ CS $ GOSUB compile -$ IF tmp .EQS. "preserve" -$ THEN +$ nv_preserves_uv_bits = tmp +$ IF F$INTEGER(nv_preserves_uv_bits) .GE. (F$INTEGER(uvsize) * 8) +$ THEN $ d_nv_preserves_uv = "define" -$ echo "Yes, they can." -$ nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8) +$ echo "Your NVs can preserve all ''nv_preserves_uv_bits' bits of your UVs." $ ELSE -$ d_nv_preserves_uv = "undef" -$ echo "No, they can't." -$ echo4 "Checking how many bits of your UVs your NVs can preserve..." -$ OS -$ WS "#if defined(__DECC) || defined(__DECCXX)" -$ WS "#include " -$ WS "#endif" -$ WS "#include " -$ WS "int main() {" -$ WS " ''uvtype' u = 0;" -$ WS " int n = 8 * ''uvsize';" -$ WS " int i;" -$ WS " for (i = 0; i < n; i++) {" -$ WS " u = u << 1 | (''uvtype')1;" -$ WS " if ((''uvtype')(''nvtype')u != u)" -$ WS " break;" -$ WS " }" -$ WS " printf(""%d\n"", i);" -$ WS " exit(0);" -$ WS "}" -$ CS -$ GOSUB compile -$ nv_preserves_uv_bits = tmp +$ d_nv_preserves_uv = "undef"" +$ echo "Your NVs can preserve only ''nv_preserves_uv_bits' bits of your UVs." +$ ENDIF +$! +$ nv_overflows_integers_at = "0" +$ echo4 "Checking to find the largest integer value your NVs can hold..." +$ OS +$ WS "#include " +$ WS "" +$ WS "typedef ''nvtype' NV;" +$ WS "" +$ WS "int" +$ WS "main() {" +$ WS " NV value = 2;" +$ WS " int count = 1;" +$ WS "" +$ WS " while(count < 256) {" +$ WS " volatile NV up = value + 1.0;" +$ WS " volatile NV negated = -value;" +$ WS " volatile NV down = negated - 1.0;" +$ WS " volatile NV got_up = up - value;" +$ WS " int up_good = got_up == 1.0;" +$ WS " int got_down = down - negated;" +$ WS " int down_good = got_down == -1.0;" +$ WS "" +$ WS " if (down_good != up_good) {" +$ WS " fprintf(stderr," +$ WS " ""Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n""," +$ WS " up_good, (double) got_up, down_good, (double) got_down," +$ WS " count, (double) value);" +$ WS " return 1;" +$ WS " }" +$ WS " if (!up_good) {" +$ WS " while (1) {" +$ WS " if (count > 8) {" +$ WS " count -= 8;" +$ WS " fputs(""256.0"", stdout);" +$ WS " } else {" +$ WS " count--;" +$ WS " fputs(""2.0"", stdout);" +$ WS " }" +$ WS " if (!count) {" +$ WS " puts("""");" +$ WS " return 0;" +$ WS " }" +$ WS " fputs(""*"", stdout);" +$ WS " }" +$ WS " }" +$ WS " value *= 2;" +$ WS " ++count;" +$ WS " }" +$ WS " fprintf(stderr, ""Cannot overflow integer range, even at 2**%d (%.20f)\n""," +$ WS " count, (double) value);" +$ WS " return 1;" +$ WS "}" +$ CS +$ GOSUB compile +$ IF F$LENGTH(tmp) .GT. 0 +$ THEN +$ IF F$EXTRACT(0,1,tmp) .EQS. "2" +$ THEN +$ echo "The largest integer your NVs can preserve is equal to ''tmp'" +$ nv_overflows_integers_at = tmp +$ ELSE +$ echo "Cannot determine the largest integer value your NVs can hold, unexpected output" +$ echo "''tmp'" +$ ENDIF +$ ELSE +$ echo "Cannot determine the largest integer value your NVs can hold" $ ENDIF $! $! Check for signbit (must already know nvtype) @@ -5939,6 +5990,7 @@ $ WC "d_nanosleep='" + d_nanosleep + "'" $ WC "d_nice='define'" $ WC "d_nl_langinfo='" + d_nl_langinfo + "'" $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'" +$ WC "nv_overflows_integers_at='" + nv_overflows_integers_at + "'" $ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'" $ WC "d_nv_zero_is_allbits_zero='define'" $ WC "d_off64_t='" + d_off64_t + "'" @@ -6076,6 +6128,7 @@ $ WC "d_tcsetpgrp='undef'" $ WC "d_telldir='define'" $ WC "d_telldirproto='define'" $ WC "d_time='define'" +$ WC "d_timegm='undef'" $ WC "d_times='define'" $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0") $ THEN @@ -6180,6 +6233,8 @@ $ WC "i_float='define'" $ WC "i_fp='undef'" $ WC "i_fp_class='undef'" $ WC "i_gdbm='undef'" +$ WC "i_gdbm_ndbm='undef'" +$ WC "i_gdbmndbm='undef'" $ WC "i_grp='" + i_grp + "'" $ WC "i_ieeefp='undef'" $ WC "i_inttypes='" + i_inttypes + "'" @@ -6189,6 +6244,7 @@ $ WC "i_limits='define'" $ WC "i_locale='" + i_locale + "'" $ WC "i_machcthr='undef'" $ WC "i_machcthreads='undef'" +$ WC "i_mallocmalloc='undef'" $ WC "i_math='define'" $ WC "i_memory='undef'" $ WC "i_mntent='undef'" @@ -6221,6 +6277,7 @@ $ WC "i_sysmode='" + i_sysmode + "'" $ WC "i_sysmount='undef'" $ WC "i_sysndir='undef'" $ WC "i_sysparam='undef'" +$ WC "i_syspoll='" + i_syspoll + "'" $ WC "i_sysresrc='undef'" $ WC "i_syssecrt='" + i_syssecrt + "'" $ WC "i_sysselct='undef'"