]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(EBADF): Fail with `#error ...' if it's not defined,
authorJim Meyering <jim@meyering.net>
Mon, 22 Nov 2004 14:24:04 +0000 (14:24 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 22 Nov 2004 14:24:04 +0000 (14:24 +0000)
asking the user to report the problem.

lib/closeout.c

index 14aa1d3624b047ec96adc44a5aac2dcf7a1b1b1b..06ae79cd312a1427ab6cb9c5bc84fb14bbec06d7 100644 (file)
 # include "unlocked-io.h"
 #endif
 
+/* If EBADF is not defined then the code below can't possibly work --
+   we'll need to know what value errno is set to when fclose fails to
+   close an already-closed stream.  Ask the user to report it.  */
+#ifndef EBADF
+# error "EBADF is not defined: please report this to bug-gnulib@gnu.org"
+#endif
+
 static const char *file_name;
 
 /* Set the file name to be reported in the event an error is detected