X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-snprintf-posix.c;h=593f20f526e2023a2d75ba2c23d4a0a9d8862736;hb=11dbc24bbfd94e0e8d36754fe17bb1fdeb58fe5e;hp=3913515e489f57e7afccc5a2545a12b165fd9c41;hpb=2c542d447fa0cfe8bd98d37a346e7fa6f2152db5;p=gnulib.git diff --git a/tests/test-snprintf-posix.c b/tests/test-snprintf-posix.c index 3913515e4..593f20f52 100644 --- a/tests/test-snprintf-posix.c +++ b/tests/test-snprintf-posix.c @@ -17,18 +17,28 @@ /* Written by Bruno Haible , 2007. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include +#include #include +#include #include #include #include -#define ASSERT(expr) if (!(expr)) abort (); +#define SIZEOF(array) (sizeof (array) / sizeof (array[0])) +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) #include "test-snprintf-posix.h"