]> granicus.if.org Git - p11-kit/commitdiff
build: Allow use of _GNU_SOURCE
authorDaiki Ueno <dueno@redhat.com>
Fri, 9 Jun 2017 12:44:04 +0000 (14:44 +0200)
committerDaiki Ueno <ueno@gnu.org>
Mon, 12 Jun 2017 09:30:42 +0000 (11:30 +0200)
This reverts commit 6b457ffc, which forbids the use of GNU extension
for the incompatibility of strerror_r.  However, now that strerror_l
is used instead on glibc systems, it has no point to do that.

common/compat.h
common/unix-peer.c
configure.ac

index acbccf9e81980d530ac669da0e7449e03c8611ad..15b31063eb16e41430294b19dc88a724d3606833 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef _GNU_SOURCE
-#error Make the crap stop. _GNU_SOURCE is completely unportable and breaks all sorts of behavior
-#endif
-
 #if !defined(__cplusplus) && (__GNUC__ > 2)
 #define GNUC_PRINTF(x, y) __attribute__((__format__(__printf__, x, y)))
 #else
index ce0de3ba72377af1ddee52b236d88ac2dc74e655..f8f20e69428fa82173d0632667143d5a8efd551d 100644 (file)
 
 #include "config.h"
 
-/* needed for struct ucred */
-#if defined(__linux__) && !defined(_GNU_SOURCE)
-#define _GNU_SOURCE
-#endif
-
 #include "unix-peer.h"
 
 #include <unistd.h>
index 2fab9e99c65f97396a9b2b28de4e6a674e8cb20d..57536645f4bb1207f76aedd34c0b8b8ee9893eeb 100644 (file)
@@ -27,6 +27,9 @@ AM_SANITY_CHECK
 AM_MAINTAINER_MODE([enable])
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
 
+dnl Enable platform specific extensions.
+AC_USE_SYSTEM_EXTENSIONS
+
 LT_PREREQ([2.2.6])
 LT_INIT([dlopen disable-static])