Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gdtoa A few fixes to make this build for vax:
details: https://anonhg.NetBSD.org/src/rev/ef61bfe578c3
branches: trunk
changeset: 778329:ef61bfe578c3
user: he <he%NetBSD.org@localhost>
date: Thu Mar 22 13:09:12 2012 +0000
description:
A few fixes to make this build for vax:
* The fivesbits[] variable is not used for vax
* The decpt variable is only used if INFNAN_CHECK, which isn't
defined for vax
diffstat:
lib/libc/gdtoa/strtodg.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r 2c435d8f39ae -r ef61bfe578c3 lib/libc/gdtoa/strtodg.c
--- a/lib/libc/gdtoa/strtodg.c Thu Mar 22 13:02:15 2012 +0000
+++ b/lib/libc/gdtoa/strtodg.c Thu Mar 22 13:09:12 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtodg.c,v 1.9 2012/03/13 21:13:34 christos Exp $ */
+/* $NetBSD: strtodg.c,v 1.10 2012/03/22 13:09:12 he Exp $ */
/****************************************************************
@@ -37,14 +37,13 @@
#include "locale.h"
#endif
+#ifndef VAX
static CONST int
fivesbits[] = { 0, 3, 5, 7, 10, 12, 14, 17, 19, 21,
24, 26, 28, 31, 33, 35, 38, 40, 42, 45,
47, 49, 52
-#ifdef VAX
- , 54, 56
+ };
#endif
- };
Bigint *
#ifdef KR_headers
@@ -329,7 +328,10 @@
#endif
{
int abe, abits, asub;
- int bb0, bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, denorm;
+#ifdef INFNAN_CHECK
+ int decpt;
+#endif
+ int bb0, bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, denorm;
int dsign, e, e1, e2, emin, esign, finished, i, inex, irv;
int j, k, nbits, nd, nd0, nf, nz, nz0, rd, rvbits, rve, rve1, sign;
int sudden_underflow = 0; /* pacify gcc */
@@ -413,7 +415,10 @@
sudden_underflow = fpi->sudden_underflow;
s0 = s;
y = z = 0;
- for(decpt = nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
+#ifdef INFNAN_CHECK
+ decpt = 0;
+#endif
+ for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
if (nd < 9)
y = 10*y + c - '0';
else if (nd < 16)
@@ -430,7 +435,9 @@
if (c == '.') {
c = *++s;
#endif
+#ifdef INFNAN_CHECK
decpt = 1;
+#endif
if (!nd) {
for(; c == '0'; c = *++s)
nz++;
Home |
Main Index |
Thread Index |
Old Index