X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fflush.c;h=a6c0e18abb15f9f3a7336f9c3751eced75a0e129;hb=8ea6bf995cf561a525abc8f716e98c8a9b917496;hp=38bedd975f953c95ff04d701bde439308b2d20f4;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/tests/test-fflush.c b/tests/test-fflush.c index 38bedd975..a6c0e18ab 100644 --- a/tests/test-fflush.c +++ b/tests/test-fflush.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible fflush() function. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,9 @@ #include +/* None of the files accessed by this test are large, so disable the + ftell link warning if we are not using the gnulib ftell module. */ +#define _GL_NO_LARGE_FILES #include #include "signature.h" @@ -47,7 +50,8 @@ main (void) if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5) { fputs ("Failed initial read of sample file.\n", stderr); - fclose (f); + if (f) + fclose (f); unlink ("test-fflush.txt"); return 1; }