[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] modules: fcntl: allow being detected by importing projec
From: |
Bruno Haible |
Subject: |
Re: [PATCH 2/2] modules: fcntl: allow being detected by importing projects |
Date: |
Mon, 24 Feb 2020 21:08:52 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) |
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 <address@hidden>
fcntl: Add witness of gnulib override.
Reported by Jens Rehsack <address@hidden> 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