[libgweather] Consolidate feature test macros
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather] Consolidate feature test macros
- Date: Mon, 27 Apr 2015 01:17:59 +0000 (UTC)
commit b2b362fc44544c8a0cd3abaaed6ca96e14b23001
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun Apr 26 17:58:40 2015 -0700
Consolidate feature test macros
The fact that we need POSIX 2008 with XSI extensions does not
change, but we keep the configure checks for the GNU extensions
we really want (like tm.tm_gmtoff and LC_MEASUREMENT). And
for some interesting reason, _DEFAULT_SOURCE (BSD+SVID) is
enough to get those on GNU, so at least we don't have a blanket
_GNU_SOURCE.
https://bugzilla.gnome.org/show_bug.cgi?id=747890
libgweather/Makefile.am | 2 ++
libgweather/weather-owm.c | 1 -
libgweather/weather-yahoo.c | 1 -
libgweather/weather-yrno.c | 1 -
4 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libgweather/Makefile.am b/libgweather/Makefile.am
index 3853f9a..4210b36 100644
--- a/libgweather/Makefile.am
+++ b/libgweather/Makefile.am
@@ -6,6 +6,8 @@ noinst_PROGRAMS = test_metar test_locations test_sun_moon
AM_CPPFLAGS = \
-DGWEATHER_COMPILATION \
+ -D_XOPEN_SOURCE=700 \
+ -D_DEFAULT_SOURCE \
$(DEPS_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir) \
diff --git a/libgweather/weather-owm.c b/libgweather/weather-owm.c
index 4ad94e9..6628653 100644
--- a/libgweather/weather-owm.c
+++ b/libgweather/weather-owm.c
@@ -20,7 +20,6 @@
#include <config.h>
#endif
-#define _GNU_SOURCE /* for strptime */
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
diff --git a/libgweather/weather-yahoo.c b/libgweather/weather-yahoo.c
index 77c0b2b..67c305b 100644
--- a/libgweather/weather-yahoo.c
+++ b/libgweather/weather-yahoo.c
@@ -22,7 +22,6 @@
#include <config.h>
#endif
-#define _GNU_SOURCE /* for strptime */
#include <time.h>
#include <stdlib.h>
#include <string.h>
diff --git a/libgweather/weather-yrno.c b/libgweather/weather-yrno.c
index 2e62926..da6a943 100644
--- a/libgweather/weather-yrno.c
+++ b/libgweather/weather-yrno.c
@@ -22,7 +22,6 @@
#include <config.h>
#endif
-#define _GNU_SOURCE /* for strptime */
#include <time.h>
#include <stdlib.h>
#include <string.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]