diff options
author | neal <neal> | 2008-01-23 23:12:39 +0000 |
---|---|---|
committer | neal <neal> | 2008-01-23 23:12:39 +0000 |
commit | 53119ad6d5042194c4653bc718799a8bc653a7da (patch) | |
tree | 352fb1b5551144f58619140a674a9bffcc8e39a8 /libc-parts | |
parent | b962fefe8733a2fd7911090b3e8565eff3469048 (diff) |
hurd/
2008-01-23 Neal H. Walfield <neal@gnu.org>
* stddef.h (S_PRINTF): New macro.
(debug): Use S_PRINTF rather than printf.
* Makefile.am (t_addr_CPPFLAGS): Add -DS_PRINTF=printf.
(t_addr_trans_CPPFLAGS): Likewise.
(t_rpc_CPPFLAGS): Likewise.
libc-parts/
2008-01-24 Neal H. Walfield <neal@gnu.org>
* assert.h: Include <hurd/stddef.h>.
(assertx): Use S_PRINTF rather than printf.
libhurd-btree/
2008-01-24 Neal H. Walfield <neal@gnu.org>
* Makefile.am (btree_test_CPPFLAGS): New variable.
(btree_test_LDADD): Remove.
(btree_test_SOURCES): Add btree.c.
* btree.c (node_t): Include <stdio.h>.
libhurd-ihash/
2008-01-24 Neal H. Walfield <neal@gnu.org>
* Makefile.am (t_ihash_SOURCES): Add ihash.c.
(t_ihash_CPPFLAGS): New variable.
* t-ihash.c: Include <stdio.h>.
libhurd-mm/
2008-01-24 Neal H. Walfield <neal@gnu.org>
* as.c (as_alloced_dump): Use s_printf rather than printf.
(as_walk): Likewise.
laden/
2008-01-23 Neal H. Walfield <neal@gnu.org>
* Makefile.am (laden_CPPFLAGS): Add -DS_PRINTF=printf.
ruth/
2008-01-24 Neal H. Walfield <neal@gnu.org>
* output.h (putchar): Rename from this...
(s_putchar): ... to this.
(puts): Rename from this...
(s_puts): ... to this.
(vprintf): Rename from this...
(s_vprintf): ... to this.
(printf): Rename from this...
(s_printf): ... to this.
* output.c (putchar): Rename from this...
(s_putchar): ... to this. Update users.
(puts): Rename from this...
(s_puts): ... to this. Update users.
(vprintf): Rename from this...
(s_vprintf): ... to this. Update users.
(printf): Rename from this...
(s_printf): ... to this.
* Makefile.am (ruth_SOURCES): Add object.h and object.c.
* ia32-cmain.c: Include <stddef.h>.
(cmain): Use s_printf rather than printf.
* panic.c (panic_): Use s_printf and s_vprintf rather than printf
and vprintf.
Diffstat (limited to 'libc-parts')
-rw-r--r-- | libc-parts/ChangeLog | 5 | ||||
-rw-r--r-- | libc-parts/assert.h | 31 |
2 files changed, 23 insertions, 13 deletions
diff --git a/libc-parts/ChangeLog b/libc-parts/ChangeLog index b38c18a..1c1f0b8 100644 --- a/libc-parts/ChangeLog +++ b/libc-parts/ChangeLog @@ -1,3 +1,8 @@ +2008-01-24 Neal H. Walfield <neal@gnu.org> + + * assert.h: Include <hurd/stddef.h>. + (assertx): Use S_PRINTF rather than printf. + 2008-01-23 Neal H. Walfield <neal@gnu.org> * sys/mman.h: New file based on Glibc's <sys/mman.h> and diff --git a/libc-parts/assert.h b/libc-parts/assert.h index 0bdb7ec..4aa6d25 100644 --- a/libc-parts/assert.h +++ b/libc-parts/assert.h @@ -22,17 +22,19 @@ #ifndef _ASSERT_H #define _ASSERT_H 1 -int printf (const char *fmt, ...); +#include <hurd/stddef.h> #ifdef _L4_TEST_ENVIRONMENT # include_next <assert.h> -# define assertx(__ax_expr, __ax_fmt, ...) \ - do \ - { \ - if (! (__ax_expr)) \ - printf (__ax_fmt, ##__VA_ARGS__); \ - assert (__ax_expr); \ - } \ +# define assertx(__ax_expr, __ax_fmt, ...) \ + do \ + { \ + extern int S_PRINTF (const char *fmt, ...); \ + \ + if (! (__ax_expr)) \ + S_PRINTF (__ax_fmt, ##__VA_ARGS__); \ + assert (__ax_expr); \ + } \ while (0) #else @@ -43,17 +45,19 @@ int printf (const char *fmt, ...); # define assertx(__ax_expr, __ax_fmt, ...) \ do { \ extern const char program_name[]; \ + extern int S_PRINTF (const char *fmt, ...); \ + \ if (! (__ax_expr)) \ { \ - printf ("%s (%x):%s:%s:%d: %s failed", \ + S_PRINTF ("%s (%x):%s:%s:%d: %s failed", \ program_name, l4_myself (), \ __FILE__, __func__, __LINE__, \ #__ax_expr); \ if ((__ax_fmt) && *(__ax_fmt)) \ { \ - printf (": " __ax_fmt, ##__VA_ARGS__); \ + S_PRINTF (": " __ax_fmt, ##__VA_ARGS__); \ } \ - printf ("\n"); \ + S_PRINTF ("\n"); \ \ extern int backtrace (void **array, int size); \ \ @@ -61,8 +65,9 @@ int printf (const char *fmt, ...); int count = backtrace (a, sizeof (a) / sizeof (a[0])); \ int i; \ for (i = 0; i < count; i ++) \ - printf ("Backtrace: %p%s", a[i], i == count - 1 ? "" : " -> "); \ - printf ("\n"); \ + S_PRINTF ("Backtrace: %p%s", \ + a[i], i == count - 1 ? "" : " -> "); \ + S_PRINTF ("\n"); \ \ for (;;); \ } \ |