From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Jens Rehsack <sno@netbsd.org>
Subject: Re: [PATCH 2/2] modules: fcntl: allow being detected by importing projects
Date: Mon, 24 Feb 2020 21:08:52 +0100 [thread overview]
Message-ID: <2770786.0FvDkCl2kk@omega> (raw)
In-Reply-To: <20200224125649.19109-2-sno@netbsd.org>
Jens Rehsack wrote:
> battle of compatibility layers.
Yes, we need C preprocessor macros to avoid conflicts between compatibility
layers.
It's preferable to have this witness macro defined through the .h file.
2020-02-24 Bruno Haible <bruno@clisp.org>
fcntl: Add witness of gnulib override.
Reported by Jens Rehsack <sno@netbsd.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00137.html>.
* lib/fcntl.in.h (GNULIB_defined_rpl_fcntl, GNULIB_defined_fcntl): New
macros.
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index b2e1e51..0a21c95 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -116,9 +116,15 @@ _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
# endif
_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
+# if !GNULIB_defined_rpl_fcntl
+# define GNULIB_defined_rpl_fcntl 1
+# endif
# else
# if !@HAVE_FCNTL@
_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
+# if !GNULIB_defined_fcntl
+# define GNULIB_defined_fcntl 1
+# endif
# endif
_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
# endif
next prev parent reply other threads:[~2020-02-24 20:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 12:56 [PATCH 1/2] m4/getloadavg.m4: restrict AIX specific test on AIX Jens Rehsack
2020-02-24 12:56 ` [PATCH 2/2] modules: fcntl: allow being detected by importing projects Jens Rehsack
2020-02-24 20:08 ` Bruno Haible [this message]
2020-02-24 20:20 ` [PATCH 1/2] m4/getloadavg.m4: restrict AIX specific test on AIX Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2770786.0FvDkCl2kk@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=sno@netbsd.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).