summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-12-05 09:07:28 -0700
committerEric Blake <ebb9@byu.net>2009-12-05 09:41:24 -0700
commite4488f1827bff93fe4c251a202f47e715ca1ed9e (patch)
treea785fe321b3245b6431db5e91572fa3b845512f1 /tests
parent9a1388f4b37df005c0a31b68bab2e9ad2ab8a658 (diff)
downloadgnulib-e4488f1827bff93fe4c251a202f47e715ca1ed9e.tar.gz
test-fseeko: fix test for mingw
Undefining fseek made test-fseeko.sh fail when testing on pipes. * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather than undefining fseek, so test will pass on mingw. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-fseeko.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c
index 93b0adc361..4006e1ebed 100644
--- a/tests/test-fseeko.c
+++ b/tests/test-fseeko.c
@@ -18,25 +18,26 @@
#include <config.h>
-#include <stdio.h>
-#include <stdlib.h>
-
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
#if !GNULIB_FSEEK
-# undef fseek
+# undef GL_LINK_WARNING
+# define GL_LINK_WARNING(ignored) ((void) 0)
#endif
+#include <stdio.h>
+#include <stdlib.h>
+
#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
+ do \
+ { \
+ if (!(expr)) \
+ { \
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
+ fflush (stderr); \
+ abort (); \
+ } \
+ } \
while (0)
#ifndef FUNC_UNGETC_BROKEN