test-fseeko: fix test for mingw
authorEric Blake <ebb9@byu.net>
Sat, 5 Dec 2009 16:07:28 +0000 (09:07 -0700)
committerEric Blake <ebb9@byu.net>
Sat, 5 Dec 2009 16:41:24 +0000 (09:41 -0700)
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>
ChangeLog
tests/test-fseeko.c

index 3c018093b741f244d1a2a7ba9af060ed78772859..5328a68f9cd5a97230b128eab1c40ecd0ea10f59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-05  Eric Blake  <ebb9@byu.net>
+
+       test-fseeko: fix test for mingw
+       * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather
+       than undefining fseek, so test will pass on mingw.
+
 2009-12-05  Bruno Haible  <bruno@clisp.org>
 
        * lib/progname.h (set_program_name): Clarify specification.
index 93b0adc3613ea4bb1c7b9a928bb7a41fa860a433..4006e1ebed33ebc6264b3a48973ae6995c101a8b 100644 (file)
 
 #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