Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gen When testing __STDC__, consistently use #ifdef ...



details:   https://anonhg.NetBSD.org/src/rev/45a95e2c8421
branches:  trunk
changeset: 525988:45a95e2c8421
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Mon Apr 22 23:31:44 2002 +0000

description:
When testing __STDC__, consistently use #ifdef rather than #if.  The Sun
Workshop 5.0 C compiler defines __STDC__ to 0 unless it's in full-ANSI mode,
and in full ANSI mode it won't give us 64-bit integers (at least on a 32-bit
CPU).

diffstat:

 lib/libc/gen/err.c  |  6 +++---
 lib/libc/gen/errx.c |  8 ++++----
 lib/libc/gen/warn.c |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diffs (90 lines):

diff -r 47999c74012e -r 45a95e2c8421 lib/libc/gen/err.c
--- a/lib/libc/gen/err.c        Mon Apr 22 23:24:10 2002 +0000
+++ b/lib/libc/gen/err.c        Mon Apr 22 23:31:44 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: err.c,v 1.19 2002/01/31 22:43:37 tv Exp $      */
+/*     $NetBSD: err.c,v 1.20 2002/04/22 23:31:44 bjh21 Exp $   */
 
 /*-
  * Copyright (c) 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)err.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: err.c,v 1.19 2002/01/31 22:43:37 tv Exp $");
+__RCSID("$NetBSD: err.c,v 1.20 2002/04/22 23:31:44 bjh21 Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -69,7 +69,7 @@
 #endif
 {
        va_list ap;
-#if __STDC__
+#ifdef __STDC__
        va_start(ap, fmt);
 #else
        int eval;
diff -r 47999c74012e -r 45a95e2c8421 lib/libc/gen/errx.c
--- a/lib/libc/gen/errx.c       Mon Apr 22 23:24:10 2002 +0000
+++ b/lib/libc/gen/errx.c       Mon Apr 22 23:31:44 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: errx.c,v 1.7 2002/01/31 22:43:37 tv Exp $      */
+/*     $NetBSD: errx.c,v 1.8 2002/04/22 23:31:44 bjh21 Exp $   */
 
 /*-
  * Copyright (c) 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)err.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: errx.c,v 1.7 2002/01/31 22:43:37 tv Exp $");
+__RCSID("$NetBSD: errx.c,v 1.8 2002/04/22 23:31:44 bjh21 Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -61,7 +61,7 @@
 #endif
 
 __dead void
-#if __STDC__
+#ifdef __STDC__
 _errx(int eval, const char *fmt, ...)
 #else
 _errx(va_alist)
@@ -69,7 +69,7 @@
 #endif
 {
        va_list ap;
-#if __STDC__
+#ifdef __STDC__
        va_start(ap, fmt);
 #else
        int eval;
diff -r 47999c74012e -r 45a95e2c8421 lib/libc/gen/warn.c
--- a/lib/libc/gen/warn.c       Mon Apr 22 23:24:10 2002 +0000
+++ b/lib/libc/gen/warn.c       Mon Apr 22 23:31:44 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: warn.c,v 1.7 2002/01/31 22:43:39 tv Exp $      */
+/*     $NetBSD: warn.c,v 1.8 2002/04/22 23:31:44 bjh21 Exp $   */
 
 /*-
  * Copyright (c) 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)err.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: warn.c,v 1.7 2002/01/31 22:43:39 tv Exp $");
+__RCSID("$NetBSD: warn.c,v 1.8 2002/04/22 23:31:44 bjh21 Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -69,7 +69,7 @@
 #endif
 {
        va_list ap;
-#if __STDC__
+#ifdef __STDC__
        va_start(ap, fmt);
 #else
        const char *fmt;



Home | Main Index | Thread Index | Old Index