Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libkern Do as Joerg said and kill the __STDC__ block...



details:   https://anonhg.NetBSD.org/src/rev/6645479a2590
branches:  trunk
changeset: 769895:6645479a2590
user:      jym <jym%NetBSD.org@localhost>
date:      Sun Sep 25 20:31:18 2011 +0000

description:
Do as Joerg said and kill the __STDC__ blocks. They only make sense for
things used by assembler, which won't be the case for these macros.

diffstat:

 sys/lib/libkern/libkern.h |  17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)

diffs (51 lines):

diff -r c9b08a0d35c1 -r 6645479a2590 sys/lib/libkern/libkern.h
--- a/sys/lib/libkern/libkern.h Sun Sep 25 20:26:04 2011 +0000
+++ b/sys/lib/libkern/libkern.h Sun Sep 25 20:31:18 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: libkern.h,v 1.99 2011/09/01 22:35:17 jym Exp $ */
+/*     $NetBSD: libkern.h,v 1.100 2011/09/25 20:31:18 jym Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -177,13 +177,8 @@
 #ifdef NDEBUG                                          /* tradition! */
 #define        assert(e)       ((void)0)
 #else
-#ifdef __STDC__
 #define        assert(e)       (__predict_true((e)) ? (void)0 :                    \
                            kern_assert("", __FILE__, __LINE__, #e))
-#else
-#define        assert(e)       (__predict_true((e)) ? (void)0 :                    \
-                           kern_assert("", __FILE__, __LINE__, "e"))
-#endif
 #endif
 
 #ifdef __COVERITY__
@@ -209,13 +204,8 @@
        if (__predict_false(!(e)))      \
                panic msg;              \
        } while (/*CONSTCOND*/ 0)
-#ifdef __STDC__
 #define        KASSERT(e)      (__predict_true((e)) ? (void)0 :                    \
                            kern_assert("diagnostic ", __FILE__, __LINE__, #e))
-#else
-#define        KASSERT(e)      (__predict_true((e)) ? (void)0 :                    \
-                           kern_assert("diagnostic ", __FILE__, __LINE__,"e"))
-#endif
 #endif
 
 #ifndef DEBUG
@@ -231,13 +221,8 @@
        if (__predict_false(!(e)))      \
                panic msg;              \
        } while (/*CONSTCOND*/ 0)
-#ifdef __STDC__
 #define        KDASSERT(e)     (__predict_true((e)) ? (void)0 :                    \
                            kern_assert("debugging ", __FILE__, __LINE__, #e))
-#else
-#define        KDASSERT(e)     (__predict_true((e)) ? (void)0 :                    \
-                           kern_assert("debugging ", __FILE__, __LINE__, "e"))
-#endif
 #endif
 /*
  * XXX: For compatibility we use SMALL_RANDOM by default.



Home | Main Index | Thread Index | Old Index