diff options
Diffstat (limited to 'libc-parts')
-rw-r--r-- | libc-parts/ChangeLog | 4 | ||||
-rw-r--r-- | libc-parts/assert.h | 20 |
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 */ |