summaryrefslogtreecommitdiff
path: root/configure.com
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2008-03-28 19:06:35 +0000
committerCraig A. Berry <craigberry@mac.com>2008-03-28 19:06:35 +0000
commita5bd55ee8902ea3fcb2392bf13940a1eed11b8ad (patch)
tree118afcc0302ac2257b35e513d16915cbefaeb16d /configure.com
parentb50d78f710e31d33fee2acc5e8cfddc61da1eb9b (diff)
downloadperl-a5bd55ee8902ea3fcb2392bf13940a1eed11b8ad.tar.gz
Make the nv_preserves... checking on VMS more robust (and more like
what Configure does). Problem using long int without long double reported by Jeremy Begg. p4raw-id: //depot/perl@33591
Diffstat (limited to 'configure.com')
-rw-r--r--configure.com52
1 files changed, 17 insertions, 35 deletions
diff --git a/configure.com b/configure.com
index 4c551e52c3..5adb34806d 100644
--- a/configure.com
+++ b/configure.com
@@ -5485,53 +5485,35 @@ $ 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 <stdlib.h>"
$ WS "#endif"
$ WS "#include <stdio.h>"
$ 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 <stdlib.h>"
-$ WS "#endif"
-$ WS "#include <stdio.h>"
-$ 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"