[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #110392] Define _NETBSD_SOURCE and _OPENBSD_SOURCE in AC_USE_SYSTEM_
From: |
Julien ÉLIE |
Subject: |
[sr #110392] Define _NETBSD_SOURCE and _OPENBSD_SOURCE in AC_USE_SYSTEM_EXTENSIONS |
Date: |
Sun, 6 Dec 2020 04:08:30 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15 |
URL:
<https://savannah.gnu.org/support/?110392>
Summary: Define _NETBSD_SOURCE and _OPENBSD_SOURCE in
AC_USE_SYSTEM_EXTENSIONS
Project: Autoconf
Submitted by: iulius
Submitted on: Sun 06 Dec 2020 09:08:28 AM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
Hi,
A few prototypes are available on NetBSD only when _NETBSD_SOURCE or
_OPENBSD_SOURCE are set.
Would it be possible to add them to AC_USE_SYSTEM_EXTENSIONS?
--- specific.m4.old 2020-12-06 09:54:37.394649064 +0100
+++ specific.m4 2020-12-06 09:59:35.490562935 +0100
@@ -396,6 +396,14 @@
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable NetBSD extensions on NetBSD. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD extensions on NetBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
@@ -456,6 +464,8 @@
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_NETBSD_SOURCE])
+ AC_DEFINE([_OPENBSD_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
Seems like a few projects already use it locally:
http://tug.ctan.org/tex-archive/macros/texinfo/texinfo/gnulib/m4/extensions.m4
And we recently encountered a build issue with reallocarray (NetBSD preferring
reallocarr):
https://git.eyrie.org/?p=devel/rra-c-util.git;a=commitdiff;h=f8a922cf31804dcc25ac176dcc22fdcdffcb5fdf
Thanks beforehand,
--
Julien ÉLIE
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?110392>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [sr #110392] Define _NETBSD_SOURCE and _OPENBSD_SOURCE in AC_USE_SYSTEM_EXTENSIONS,
Julien ÉLIE <=