Silence some warnings introduced by #33507
[p5sagit/p5-mst-13.2.git] / configure.com
index 800f054..37668b5 100644 (file)
@@ -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"
@@ -5532,6 +5528,73 @@ $   GOSUB compile
 $   nv_preserves_uv_bits = tmp
 $ ENDIF
 $!
+$ nv_overflows_integers_at = "0"
+$ echo4 "Checking to find the largest integer value your NVs can hold..."
+$ OS
+$ WS "#include <stdio.h>"
+$ 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)
 $!
 $ echo4 "Checking to see if you have signbit() available to work on ''nvtype'..."
@@ -5939,6 +6002,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 + "'"
@@ -6127,6 +6191,7 @@ $ WC "dlobj='" + dlobj + "'"
 $ WC "dlsrc='dl_vms.c'"
 $ WC "doublesize='" + doublesize + "'"
 $ WC "drand01='" + drand01 + "'"
+$ WC "dtrace='" + "'"
 $!
 $! The extensions symbol may be quite long
 $!
@@ -6442,6 +6507,7 @@ $ WC "usedebugging_perl='"+use_debugging_perl+"'"
 $ WC "usedefaulttypes='" + usedefaulttypes + "'"    ! VMS-specific
 $ WC "usecrosscompile='undef'"
 $ WC "usedl='" + usedl + "'"
+$ WC "usedtrace='undef'"
 $ WC "usefaststdio='" + usefaststdio + "'"
 $ WC "useieee='" + useieee + "'"                    ! VMS-specific
 $ WC "useithreads='" + useithreads + "'"