Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdio Make compile with -DNO_FLOATING_POINT



details:   https://anonhg.NetBSD.org/src/rev/8c20f56efe1c
branches:  trunk
changeset: 790167:8c20f56efe1c
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Sep 23 12:41:37 2013 +0000

description:
Make compile with -DNO_FLOATING_POINT

diffstat:

 lib/libc/stdio/vfwprintf.c |  9 +++++----
 lib/libc/stdio/vfwscanf.c  |  6 ++++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (73 lines):

diff -r 6df3a7f0f26a -r 8c20f56efe1c lib/libc/stdio/vfwprintf.c
--- a/lib/libc/stdio/vfwprintf.c        Mon Sep 23 11:27:45 2013 +0000
+++ b/lib/libc/stdio/vfwprintf.c        Mon Sep 23 12:41:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfwprintf.c,v 1.32 2013/05/17 12:55:57 joerg Exp $     */
+/*     $NetBSD: vfwprintf.c,v 1.33 2013/09/23 12:41:37 pooka Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
 static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
 __FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.27 2007/01/09 00:28:08 imp Exp $");
 #else
-__RCSID("$NetBSD: vfwprintf.c,v 1.32 2013/05/17 12:55:57 joerg Exp $");
+__RCSID("$NetBSD: vfwprintf.c,v 1.33 2013/09/23 12:41:37 pooka Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -821,13 +821,12 @@
 
        _SET_ORIENTATION(fp, -1);
 
-       ndig = -1;      /* XXX gcc */
-
        thousands_sep = '\0';
        grouping = NULL;
 #ifndef NO_FLOATING_POINT
        decimal_point = localeconv_l(loc)->decimal_point;
        expsize = 0;            /* XXXGCC -Wuninitialized [sh3,m68000] */
+       ndig = -1;      /* XXX gcc */
 #endif
        convbuf = NULL;
        /* sorry, f{w,}printf(read_only_file, L"") returns {W,}EOF, not 0 */
@@ -879,9 +878,11 @@
                prec = -1;
                sign = '\0';
                ox[1] = '\0';
+#ifndef NO_FLOATING_POINT
                expchar = '\0';
                lead = 0;
                nseps = nrepeats = 0;
+#endif
                ulval = 0;
                ujval = 0;
                xdigs = NULL;
diff -r 6df3a7f0f26a -r 8c20f56efe1c lib/libc/stdio/vfwscanf.c
--- a/lib/libc/stdio/vfwscanf.c Mon Sep 23 11:27:45 2013 +0000
+++ b/lib/libc/stdio/vfwscanf.c Mon Sep 23 12:41:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfwscanf.c,v 1.10 2013/05/17 12:55:57 joerg Exp $      */
+/*     $NetBSD: vfwscanf.c,v 1.11 2013/09/23 12:41:37 pooka Exp $      */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -42,7 +42,7 @@
 static char sccsid[] = "@(#)ftell.c    8.2 (Berkeley) 5/4/95";
 __FBSDID("$FreeBSD: src/lib/libc/stdio/vfwscanf.c,v 1.12 2004/05/02 20:13:29 obrien Exp $");
 #else
-__RCSID("$NetBSD: vfwscanf.c,v 1.10 2013/05/17 12:55:57 joerg Exp $");
+__RCSID("$NetBSD: vfwscanf.c,v 1.11 2013/09/23 12:41:37 pooka Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -102,7 +102,9 @@
 #define        CT_INT          3       /* %[dioupxX] conversion */
 #define        CT_FLOAT        4       /* %[efgEFG] conversion */
 
+#ifndef NO_FLOATING_POINT
 static int parsefloat(FILE *, wchar_t *, wchar_t *, locale_t);
+#endif
 
 #define        INCCL(_c)       \
        (cclcompl ? (wmemchr(ccls, (_c), (size_t)(ccle - ccls)) == NULL) : \



Home | Main Index | Thread Index | Old Index