projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better ASSERT macro.
[gnulib.git]
/
tests
/
test-vprintf-posix.c
diff --git
a/tests/test-vprintf-posix.c
b/tests/test-vprintf-posix.c
index
6f7f141
..
57b6740
100644
(file)
--- a/
tests/test-vprintf-posix.c
+++ b/
tests/test-vprintf-posix.c
@@
-25,11
+25,21
@@
#include <stdarg.h>
#include <stddef.h>
#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) if (!(expr)) abort ();
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ abort (); \
+ } \
+ } \
+ while (0)
static int
my_printf (const char *format, ...)
static int
my_printf (const char *format, ...)