* m4/fdopen.m4 (gl_FUNC_FDOPEN): Let the test pass if fdopen(-1,...)
succeeds.
Reported by Rich Felker <dalias@aerifal.cx>.
+2012-06-20 Bruno Haible <bruno@clisp.org>
+
+ fdopen: Allow implementations that don't reject invalid fd arguments.
+ * m4/fdopen.m4 (gl_FUNC_FDOPEN): Let the test pass if fdopen(-1,...)
+ succeeds.
+ Reported by Rich Felker <dalias@aerifal.cx>.
+
2012-06-20 Simon Josefsson <simon@josefsson.org>
* modules/parse-duration-tests (test_parse_duration_LDADD): Don't
-# fdopen.m4 serial 2
+# fdopen.m4 serial 3
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
FILE *fp;
errno = 0;
fp = fdopen (-1, "r");
- if (fp != NULL)
+ if (fp == NULL && errno == 0)
return 1;
- if (errno == 0)
- return 2;
return 0;
}]])],
[gl_cv_func_fdopen_works=yes],