X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fputc.c;h=befb58255158b6c25618dd4e626f468f8b0c1306;hb=refs%2Fheads%2Fmaster;hp=6e009d85d238d800f3164e6b742ca0c6cd168034;hpb=9e30dc1496f3b844fc6b309373cfc5d255b3dce5;p=gnulib.git diff --git a/tests/test-fputc.c b/tests/test-fputc.c index 6e009d85d..befb58255 100644 --- a/tests/test-fputc.c +++ b/tests/test-fputc.c @@ -1,5 +1,5 @@ /* Test of fputc() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 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 @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #include @@ -37,7 +36,8 @@ main (int argc, char **argv) /* We don't have an fputc() function that installs an invalid parameter handler so far. So install that handler here, explicitly. */ -#if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ + && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING gl_msvc_inval_ensure_handler (); #endif @@ -70,7 +70,9 @@ main (int argc, char **argv) } } { - FILE *fp = fdopen (99, "w"); + FILE *fp; + close (99); + fp = fdopen (99, "w"); if (fp != NULL) { setvbuf (fp, NULL, _IONBF, 0);