From: Jim Meyering Date: Mon, 22 Nov 2004 14:24:04 +0000 (+0000) Subject: (EBADF): Fail with `#error ...' if it's not defined, X-Git-Tag: v5.3.0~351 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2a9a7f98605fcb24a3de632c2719febb66cc31a;p=thirdparty%2Fcoreutils.git (EBADF): Fail with `#error ...' if it's not defined, asking the user to report the problem. --- diff --git a/lib/closeout.c b/lib/closeout.c index 14aa1d3624..06ae79cd31 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