fix {FLT,DBL}_ULONG_MAX tests properly

This commit is contained in:
naddy 2001-10-12 17:01:42 +00:00
parent 0fc6fc44f1
commit 399d8f5141
2 changed files with 33 additions and 38 deletions

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-bin_package,v 1.1.1.1 2001/07/12 19:17:24 naddy Exp $ $OpenBSD: patch-bin_package,v 1.2 2001/10/12 17:01:42 naddy Exp $
--- bin/package.orig Tue Jul 10 16:47:25 2001 --- bin/package.orig Thu Aug 23 08:43:30 2001
+++ bin/package Tue Jul 10 16:47:34 2001 +++ bin/package Fri Oct 12 18:48:50 2001
@@ -12,7 +12,7 @@ version=2001-06-20 @@ -12,7 +12,7 @@ version=2001-08-11
src="cmd contrib etc lib" src="cmd contrib etc lib"
use="/home /usr/common /exp /usr/local /usr/add-on /usr/addon /usr/tools /usr /opt" use="/home /usr/common /exp /usr/local /usr/add-on /usr/addon /usr/tools /usr /opt"

View File

@ -1,35 +1,30 @@
$OpenBSD: patch-src_lib_libast_features_float,v 1.1 2001/10/11 01:39:15 naddy Exp $ $OpenBSD: patch-src_lib_libast_features_float,v 1.2 2001/10/12 17:01:43 naddy Exp $
--- src/lib/libast/features/float.orig Wed Jun 13 21:50:59 2001 --- src/lib/libast/features/float.orig Wed Jun 13 21:50:59 2001
+++ src/lib/libast/features/float Wed Oct 10 15:35:57 2001 +++ src/lib/libast/features/float Fri Oct 12 18:49:24 2001
@@ -125,6 +125,7 @@ tst - output{ @@ -132,7 +132,7 @@ tst - output{
else f *= 2;
printf("#define UINTMAX_DIG ULONG_DIG\n"); pw = w;
printf("\n"); w *= 2;
+ #if !defined(__alpha__) /* ksh93 doesn't use this */ - } while (w == (_ast_intmax_t)f);
f = 1; + } while (w == f);
w = 1; w = (pw - 1) + pw;
do u = ~0;
@@ -145,6 +146,7 @@ tst - output{ if (u > w)
} @@ -263,7 +263,7 @@ tst - output{
else d *= 2;
printf("#define FLT_UINTMAX_MAX FLT_ULONG_MAX\n"); pw = w;
+ #endif w *= 2;
#ifdef FLT_DIG - } while (w == (_ast_intmax_t)d);
s = FLT_DIG; + } while (w == d);
#else w = (pw - 1) + pw;
@@ -256,6 +258,7 @@ tst - output{ u = ~0;
printf("#endif\n"); if (u > w)
@@ -391,7 +391,7 @@ tst - output{
printf("\n"); l *= 2;
+ #if !defined(__alpha__) /* ksh93 doesn't use this */ pw = w;
d = 1.0; w *= 2;
w = 1; - } while (w == (_ast_intmax_t)l);
do + } while (w == l);
@@ -276,6 +279,7 @@ tst - output{ w = (pw - 1) + pw;
} u = ~0;
else if (u > w)
printf("#define DBL_UINTMAX_MAX DBL_ULONG_MAX\n");
+ #endif
#ifdef DBL_DIG
s = DBL_DIG;
#else