diff options
Diffstat (limited to 'm4/fopen.m4')
-rw-r--r-- | m4/fopen.m4 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/m4/fopen.m4 b/m4/fopen.m4 index 0d09e4e..2be602c 100644 --- a/m4/fopen.m4 +++ b/m4/fopen.m4 @@ -1,5 +1,5 @@ -# fopen.m4 serial 9 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +# fopen.m4 serial 10 +dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -27,7 +27,11 @@ AC_DEFUN([gl_FUNC_FOPEN], #include <stdio.h> int main () { - return fopen ("conftest.sl/", "w") != NULL; + FILE *fp = fopen ("conftest.sl/", "w"); + int result = (fp != NULL); + if (fp != NULL) + fclose (fp); + return result; }]])], [gl_cv_func_fopen_slash=yes], [gl_cv_func_fopen_slash=no], |