summaryrefslogtreecommitdiff
path: root/libc-parts
diff options
context:
space:
mode:
authorneal <neal>2007-10-17 12:55:08 +0000
committerneal <neal>2007-10-17 12:55:08 +0000
commitb449429418f2de14f5deae434dc42912d1453d12 (patch)
tree40ac7ad7355113764620a510f679a12d3cfecde3 /libc-parts
parent302db3389ed915389b8ee04101fce093f6d7cecb (diff)
2007-10-17 Neal H. Walfield <neal@gnu.org>
* assert.h [_L4_TEST_ENVIRONMENT]: Include the next <assert.h>.
Diffstat (limited to 'libc-parts')
-rw-r--r--libc-parts/ChangeLog4
-rw-r--r--libc-parts/assert.h20
2 files changed, 17 insertions, 7 deletions
diff --git a/libc-parts/ChangeLog b/libc-parts/ChangeLog
index 2622f81..f792f7c 100644
--- a/libc-parts/ChangeLog
+++ b/libc-parts/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-17 Neal H. Walfield <neal@gnu.org>
+
+ * assert.h [_L4_TEST_ENVIRONMENT]: Include the next <assert.h>.
+
2005-01-12 Neal H. Walfield <neal@gnu.org>
* assert.h: Include prototype for printf.
diff --git a/libc-parts/assert.h b/libc-parts/assert.h
index 591a38f..8172ba0 100644
--- a/libc-parts/assert.h
+++ b/libc-parts/assert.h
@@ -1,5 +1,5 @@
/* assert.h - Assert declaration for libc-parts.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
Written by Neal H. Walfield <neal@gnu.org>.
This file is part of the GNU Hurd.
@@ -24,8 +24,12 @@
int printf (const char *fmt, ...);
-#ifndef NDEBUG
-#define assert(expr) \
+#ifdef _L4_TEST_ENVIRONMENT
+# include_next <assert.h>
+#else
+
+# ifndef NDEBUG
+# define assert(expr) \
do { \
if (! (expr)) \
{ \
@@ -34,9 +38,11 @@ int printf (const char *fmt, ...);
for (;;); \
} \
} while (0)
-#else
-#define assert(expr) do { } while (0)
-#endif
-#define assert_perror(err) assert(err == 0)
+# else
+# define assert(expr) do { } while (0)
+# endif
+# define assert_perror(err) assert(err == 0)
+
+#endif /* _L4_TEST_ENVIRONMENT */
#endif /* _ASSERT_H */