summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-11-22 14:24:04 +0000
committerJim Meyering <jim@meyering.net>2004-11-22 14:24:04 +0000
commitb2a9a7f98605fcb24a3de632c2719febb66cc31a (patch)
tree7f11543fb542d4906b4e180146cda7c8bf4f52d7
parent9f0568e81e68ab3be0a202f59aba7b8cf81de720 (diff)
downloadcoreutils-b2a9a7f98605fcb24a3de632c2719febb66cc31a.tar.xz
(EBADF): Fail with `#error ...' if it's not defined,
asking the user to report the problem.
-rw-r--r--lib/closeout.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/closeout.c b/lib/closeout.c
index 14aa1d362..06ae79cd3 100644
--- a/lib/closeout.c
+++ b/lib/closeout.c
@@ -39,6 +39,13 @@
# 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