bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ENODATA


From: Jim Meyering
Subject: Re: ENODATA
Date: Tue, 25 Oct 2011 12:28:42 +0200

Jim Meyering wrote:

> Bruno Haible wrote:
>
>> Hi Jim,
>>
>>> The gnulib update induced a new (coreutils-specific) syntax-check failure:
>>>
>>>     src/system.h:# define ENODATA (-1)
>>>     make[3]: *** [sc_prohibit_always-defined_macros] Error 1
>>>
>>> because gnulib now defines that symbol, so I have also removed
>>> that definition from coreutils:
>>>
>>> -
>>> -/* Some systems don't define this; POSIX mentions it but says it is
>>> -   obsolete, so gnulib does not provide it either.  */
>>> -#ifndef ENODATA
>>> -# define ENODATA (-1)
>>> -#endif
>>> -
>>
>> Actually, gnulib's errno.h defines ENODATA only on native Windows systems,
>> because MSVC 10 does it as well - to avoid interoperability problems.
>> It doesn't guarantee the existence of this macro, and there is no intention
>> that it does. ENODATA is not POSIX. It is merely an error code defined
>> on _some_ systems. Just like EOTHER, ETOOMANYREFS, ENOSTR are error
>> codes defined on _some_ systems.
>>
>> I would get rid of the syntax-check failure in a different way.
>
> Oh!  Thank you.
> I'll definitely revert that part.

I've done the following to exempt ENODATA from that test in maint.mk.
Exempting the entire system.h file via coreutils' cfg.mk
would not have been appropriate, since that's precisely
where such definitions are most likely to be.

>From f1a5c91522554791317dc2ee763fe8c017c7b810 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 25 Oct 2011 12:26:49 +0200
Subject: [PATCH] maint.mk: exempt ENODATA from a syntax-check rule

* top/maint.mk (gl_extract_significant_defines_): Also exempt ENODATA
from the sc_prohibit_always-defined_macros syntax-check rule.
Add a comment.  See this for more details:
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739/focus=28795
---
 ChangeLog    |    8 ++++++++
 top/maint.mk |    4 +++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a4ac818..337cd03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-10-25  Jim Meyering  <address@hidden>
+
+       maint.mk: exempt ENODATA from a syntax-check rule
+       * top/maint.mk (gl_extract_significant_defines_): Also exempt ENODATA
+       from the sc_prohibit_always-defined_macros syntax-check rule.
+       Add a comment.  See this for more details:
+       http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739/focus=28795
+
 2011-10-23  Jim Meyering  <address@hidden>

        fts: close parent dir FD before returning from post-traversal fts_read
diff --git a/top/maint.mk b/top/maint.mk
index d51fec6..be348dd 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -749,10 +749,12 @@ gl_other_headers_ ?= \

 # Perl -lne code to extract "significant" cpp-defined symbols from a
 # gnulib header file, eliminating a few common false-positives.
+# The exempted names below are defined only conditionally in gnulib,
+# and hence sometimes must/may be defined in application code.
 gl_extract_significant_defines_ = \
   /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\
     && $$2 !~ /(?:rpl_|_used_without_)/\
-    && $$1 !~ /^(?:NSIG)$$/\
+    && $$1 !~ /^(?:NSIG|ENODATA)$$/\
     && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\
     and print $$1

--
1.7.7.419.g87009



reply via email to

[Prev in Thread] Current Thread [Next in Thread]