* lib/error.c (error, error_at_line): Avoid fcntl on mingw.
Reported by Bruno Haible.
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-18 Eric Blake <ebb9@byu.net>
+ error: fix mingw build
+ * lib/error.c (error, error_at_line): Avoid fcntl on mingw.
+ Reported by Bruno Haible.
+
error: avoid undefined use of stdout
* lib/error.c (error, error_at_line): Check that fd 1 is open
before flushing stdout. Avoids a crash on cygwin when libsigsegv
0);
#endif
-#if !_LIBC
+#if !_LIBC && defined F_GETFL
/* POSIX states that fflush (stdout) after fclose is unspecified; it
is safe in glibc, but not on all other platforms. fflush (NULL)
is always defined, but too draconian. */
0);
#endif
-#if !_LIBC
+#if !_LIBC && defined F_GETFL
/* POSIX states that fflush (stdout) after fclose is unspecified; it
is safe in glibc, but not on all other platforms. fflush (NULL)
is always defined, but too draconian. */