summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2013-05-22 18:03:19 +0300
committerKristian Høgsberg <krh@bitplanet.net>2013-06-05 01:16:34 -0400
commitc228e23b055f54d29f2df839cf76a2660917b9f6 (patch)
tree6f810a3fd6061b2dadb8cc654a795530654debf1 /shared
parent5238b683e20e619cca92eea2691ba7ca947ead84 (diff)
configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS
AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar macros to expose the largest extent of functionality supported by the underlying system. This is required since these macros are often limiting rather than merely additive, e.g. _XOPEN_SOURCE will actually on some systems hide declarations which are not part of the X/Open spec. Since this goes into config.h rather than the command line, ensure all source is consistently including config.h before anything else, including system libraries. This doesn't need to be guarded by a HAVE_CONFIG_H ifdef, which was only ever a hangover from the X.Org modular transition. Signed-off-by: Daniel Stone <daniel@fooishbar.org> [pq: rebased and converted more files]
Diffstat (limited to 'shared')
-rw-r--r--shared/cairo-util.c2
-rw-r--r--shared/config-parser.c3
-rw-r--r--shared/image-loader.c2
-rw-r--r--shared/matrix.c2
-rw-r--r--shared/option-parser.c2
-rw-r--r--shared/os-compatibility.c2
6 files changed, 9 insertions, 4 deletions
diff --git a/shared/cairo-util.c b/shared/cairo-util.c
index 8b41f413..c3a966a3 100644
--- a/shared/cairo-util.c
+++ b/shared/cairo-util.c
@@ -21,7 +21,7 @@
* OF THIS SOFTWARE.
*/
-#include "../config.h"
+#include "config.h"
#include <stdint.h>
#include <stdlib.h>
diff --git a/shared/config-parser.c b/shared/config-parser.c
index 1d88eed0..0ff96eeb 100644
--- a/shared/config-parser.c
+++ b/shared/config-parser.c
@@ -20,7 +20,8 @@
* OF THIS SOFTWARE.
*/
-#define _GNU_SOURCE /* for stchrnul() */
+#include "config.h"
+
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/shared/image-loader.c b/shared/image-loader.c
index 9f65dead..35dadd3d 100644
--- a/shared/image-loader.c
+++ b/shared/image-loader.c
@@ -21,7 +21,7 @@
* OF THIS SOFTWARE.
*/
-#include "../config.h"
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
diff --git a/shared/matrix.c b/shared/matrix.c
index 3ff4089a..4f0b6b79 100644
--- a/shared/matrix.c
+++ b/shared/matrix.c
@@ -21,6 +21,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <float.h>
#include <string.h>
#include <stdlib.h>
diff --git a/shared/option-parser.c b/shared/option-parser.c
index a7e497ff..c00349a8 100644
--- a/shared/option-parser.c
+++ b/shared/option-parser.c
@@ -20,6 +20,8 @@
* OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c
index 21d4d029..4f96dd4c 100644
--- a/shared/os-compatibility.c
+++ b/shared/os-compatibility.c
@@ -20,7 +20,7 @@
* OF THIS SOFTWARE.
*/
-#define _GNU_SOURCE
+#include "config.h"
#include <sys/types.h>
#include <sys/socket.h>