# HG changeset patch # User Eric Blake # Date 1260029248 25200 # Node ID c14905650e6d1e54109da9278b2c87d41ecaa0fb # Parent fd9b53de94157b8294114127a4d37716421c422b 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 diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-05 Eric Blake + + 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 * lib/progname.h (set_program_name): Clarify specification. diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c --- a/tests/test-fseeko.c +++ b/tests/test-fseeko.c @@ -18,25 +18,26 @@ #include -#include -#include - /* 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 +#include + #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