[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] extern-inline: Pull __header_inline definition
From: |
Roman Bolshakov |
Subject: |
[PATCH] extern-inline: Pull __header_inline definition |
Date: |
Wed, 10 Feb 2021 02:57:00 +0300 |
* m4/extern-inline.m4 (gl_EXTERN_INLINE): __header_inline is defined in
<sys/cdefs.h> but the header is not included and as result
_GL_EXTERN_INLINE doesn't work as intended on macOS.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
---
Hi,
The issue prevents -O1/-O0 compilation of libtasn1 on macOS:
https://gitlab.com/gnutls/libtasn1/-/issues/28#note_505357689
Thanks,
Roman
m4/extern-inline.m4 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index a2acf126c..b2ac5e0fe 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -7,6 +7,8 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_EXTERN_INLINE],
[
+ AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
+
AH_VERBATIM([extern_inline],
[/* Please see the Gnulib manual for how to use these macros.
@@ -51,6 +53,12 @@ AC_DEFUN([gl_EXTERN_INLINE],
warning: to disable this warning use -fgnu89-inline or the gnu_inline
function attribute
It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
*/
+
+/* Pull __header_inline definition */
+#ifdef HAVE_SYS_CDEFS_H
+# include <sys/cdefs.h>
+#endif
+
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
&& (defined __header_inline \
--
2.30.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] extern-inline: Pull __header_inline definition,
Roman Bolshakov <=