From: Kaj-Michael Lang Date: Wed, 16 Jan 2008 14:04:44 +0000 (+0200) Subject: Use globaly set _GNU_SOURCE X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34881292b739118cb009f41277c53eda5eadd9d2;p=mapper Use globaly set _GNU_SOURCE --- diff --git a/configure.ac b/configure.ac index e5c62ac..09aaae5 100644 --- a/configure.ac +++ b/configure.ac @@ -26,9 +26,12 @@ AC_PROG_CPP AC_CONFIG_HEADERS(src/config.h) AC_PROG_INSTALL AC_PROG_LIBTOOL -AC_SYS_LARGEFILE +# AC_SYS_LARGEFILE # ^That should do it but for some reason it won't so hack it: -CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" +# CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" + +AC_DEFINE(_FILE_OFFSET_BITS, 64, [Enable LFS]) +AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions]) dnl PKG_PROG_PKG_CONFIG @@ -88,6 +91,8 @@ else AC_DEFINE([WITH_DEVICE_770], 1, [With 770/N800 specific code]) fi +AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) + if test "x$enable_itbtdbus" = "xno" ; then WITH_HILDON_DBUS_BT=no enable_btdbus=yes diff --git a/src/announcements.c b/src/announcements.c index 625c4b5..80b8ac7 100644 --- a/src/announcements.c +++ b/src/announcements.c @@ -22,8 +22,6 @@ #include "config.h" -#define _GNU_SOURCE - #include #include #include diff --git a/src/announcements.h b/src/announcements.h index 537d2e5..c031085 100644 --- a/src/announcements.h +++ b/src/announcements.h @@ -20,8 +20,6 @@ #include "config.h" -#define _GNU_SOURCE - #include void announce_distance_to_destination(gdouble distance, gchar *unit, gdouble climit); diff --git a/src/bt-bluez.c b/src/bt-bluez.c index 845dcb8..9b124bd 100644 --- a/src/bt-bluez.c +++ b/src/bt-bluez.c @@ -1,5 +1,3 @@ -#define _GNU_SOURCE - #include /* XXX: well, we are not using dbus yet, but anyway.. */ diff --git a/src/bt-maemo.c b/src/bt-maemo.c index c216a21..c01e1cd 100644 --- a/src/bt-maemo.c +++ b/src/bt-maemo.c @@ -25,8 +25,6 @@ #include -#define _GNU_SOURCE - #ifdef WITH_HILDON_DBUS_BT #include diff --git a/src/bt.h b/src/bt.h index 11d732c..635de12 100644 --- a/src/bt.h +++ b/src/bt.h @@ -1,7 +1,7 @@ #ifndef _MAPPER_BT_H #define _MAPPER_BT_H -#define _GNU_SOURCE +#include "config.h" #include diff --git a/src/cb.c b/src/cb.c index 85aa881..f4244dc 100644 --- a/src/cb.c +++ b/src/cb.c @@ -25,8 +25,6 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/cb.h b/src/cb.h index 89beba7..07305af 100644 --- a/src/cb.h +++ b/src/cb.h @@ -3,8 +3,6 @@ #include -#define _GNU_SOURCE - #include gboolean window_cb_key_press(GtkWidget * widget, GdkEventKey * event); diff --git a/src/config-gconf.c b/src/config-gconf.c index 71dfa1b..63d79f5 100644 --- a/src/config-gconf.c +++ b/src/config-gconf.c @@ -25,8 +25,6 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/file.c b/src/file.c index 6a46073..68bf5b8 100644 --- a/src/file.c +++ b/src/file.c @@ -23,8 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE - #include #include #include diff --git a/src/filter-gui.c b/src/filter-gui.c index a6eb2ea..4c034b8 100644 --- a/src/filter-gui.c +++ b/src/filter-gui.c @@ -22,8 +22,6 @@ #include "config.h" -#define _GNU_SOURCE - #include #include #include diff --git a/src/gps-browse.c b/src/gps-browse.c index 85934fd..e6f8178 100644 --- a/src/gps-browse.c +++ b/src/gps-browse.c @@ -23,8 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE - #include #include #include diff --git a/src/gps-conn.c b/src/gps-conn.c index fb5d563..5f0b874 100644 --- a/src/gps-conn.c +++ b/src/gps-conn.c @@ -23,8 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE - #include #include #include diff --git a/src/gps-nmea-parse.c b/src/gps-nmea-parse.c index ec2faa2..6aaf3b2 100644 --- a/src/gps-nmea-parse.c +++ b/src/gps-nmea-parse.c @@ -23,8 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE - #include #include #include diff --git a/src/gps-panels.c b/src/gps-panels.c index a614e69..9e99aad 100644 --- a/src/gps-panels.c +++ b/src/gps-panels.c @@ -25,8 +25,6 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/gps.h b/src/gps.h index f30e73f..b9c3603 100644 --- a/src/gps.h +++ b/src/gps.h @@ -1,7 +1,5 @@ #include -#define _GNU_SOURCE - #ifndef _MAPPER_GPS_H #define _MAPPER_GPS_H diff --git a/src/gpx.c b/src/gpx.c index 0f96859..7a2d24d 100644 --- a/src/gpx.c +++ b/src/gpx.c @@ -22,8 +22,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE - #include #include #include diff --git a/src/hildon-wrappers.c b/src/hildon-wrappers.c index 635005f..f44fe03 100644 --- a/src/hildon-wrappers.c +++ b/src/hildon-wrappers.c @@ -24,8 +24,6 @@ /**************************************************************************** * Hildon function Wrappers for non-hildon build ****************************************************************************/ -#define _GNU_SOURCE - #include "config.h" #include diff --git a/src/latlon.c b/src/latlon.c index a73d680..49d490e 100644 --- a/src/latlon.c +++ b/src/latlon.c @@ -26,7 +26,7 @@ * Different Lat/Lon and related functions * (conversion, distances, etc) */ -#define _GNU_SOURCE +#include "config.h" #include #include diff --git a/src/maemo-osso.c b/src/maemo-osso.c index 2e00c32..203cd88 100644 --- a/src/maemo-osso.c +++ b/src/maemo-osso.c @@ -29,8 +29,6 @@ #include -#define _GNU_SOURCE - #include #include diff --git a/src/map-download.c b/src/map-download.c index a713021..f1cac2b 100644 --- a/src/map-download.c +++ b/src/map-download.c @@ -25,8 +25,6 @@ #include "config.h" -#define _GNU_SOURCE - #include #include #include diff --git a/src/map-poi.c b/src/map-poi.c index a0327a6..b6b4cca 100644 --- a/src/map-poi.c +++ b/src/map-poi.c @@ -25,8 +25,6 @@ #include -#define _GNU_SOURCE - #include #include "utils.h" diff --git a/src/map-repo.c b/src/map-repo.c index 8339a11..8164452 100644 --- a/src/map-repo.c +++ b/src/map-repo.c @@ -25,8 +25,6 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/map.c b/src/map.c index e1a779c..ab984d7 100644 --- a/src/map.c +++ b/src/map.c @@ -25,8 +25,6 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/map.h b/src/map.h index 6c6b597..6a83acb 100644 --- a/src/map.h +++ b/src/map.h @@ -1,7 +1,5 @@ #include -#define _GNU_SOURCE - #ifndef _MAPPER_MAP_H #define _MAPPER_MAP_H diff --git a/src/mapper-types.h b/src/mapper-types.h index e4fdec0..fd6b391 100644 --- a/src/mapper-types.h +++ b/src/mapper-types.h @@ -1,7 +1,5 @@ #include "config.h" -#define _GNU_SOURCE - #include #include diff --git a/src/mapper.c b/src/mapper.c index d6e2177..b285c0c 100644 --- a/src/mapper.c +++ b/src/mapper.c @@ -23,8 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE - #include #include #include diff --git a/src/osm-db.c b/src/osm-db.c index 187263d..e080b40 100644 --- a/src/osm-db.c +++ b/src/osm-db.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE +#include "config.h" #include #include diff --git a/src/osm.c b/src/osm.c index 03723a4..5d585d1 100644 --- a/src/osm.c +++ b/src/osm.c @@ -33,8 +33,6 @@ * */ -#define _GNU_SOURCE - #include #include #include diff --git a/src/poi-gui.c b/src/poi-gui.c index 37abe84..32b6a58 100644 --- a/src/poi-gui.c +++ b/src/poi-gui.c @@ -1,7 +1,5 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/poi.c b/src/poi.c index 3465f86..f87d776 100644 --- a/src/poi.c +++ b/src/poi.c @@ -1,7 +1,5 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/route.c b/src/route.c index 33a1b6b..26c30a0 100644 --- a/src/route.c +++ b/src/route.c @@ -1,7 +1,5 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/route.h b/src/route.h index fbfd923..66f2acb 100644 --- a/src/route.h +++ b/src/route.h @@ -1,6 +1,4 @@ -#include - -#define _GNU_SOURCE +#include "config.h" #ifndef _MAPPER_ROUTE_H #define _MAPPER_ROUTE_H diff --git a/src/search.c b/src/search.c index 1229154..69965ed 100644 --- a/src/search.c +++ b/src/search.c @@ -24,8 +24,6 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/settings-gui.c b/src/settings-gui.c index dc6d734..14caacb 100644 --- a/src/settings-gui.c +++ b/src/settings-gui.c @@ -1,7 +1,5 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/settings.h b/src/settings.h index a249ac5..fcb0ab0 100644 --- a/src/settings.h +++ b/src/settings.h @@ -1,7 +1,5 @@ #include "config.h" -#define _GNU_SOURCE - #include #ifndef _MAPPER_SETTINGS_H diff --git a/src/speed-display.c b/src/speed-display.c index cd90b14..dbb4eb0 100644 --- a/src/speed-display.c +++ b/src/speed-display.c @@ -1,7 +1,5 @@ #include "config.h" -#define _GNU_SOURCE - #include #include #include diff --git a/src/ui-common.c b/src/ui-common.c index f051ddb..0ea0f24 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -1,7 +1,5 @@ #include -#define _GNU_SOURCE - #include #include #include diff --git a/src/ui-common.h b/src/ui-common.h index 5ced544..b0adddf 100644 --- a/src/ui-common.h +++ b/src/ui-common.h @@ -1,9 +1,7 @@ #ifndef _MAPPER_UI_COMMON_H #define _MAPPER_UI_COMMON_H -#include - -#define _GNU_SOURCE +#include "config.h" #include #include diff --git a/src/utils.c b/src/utils.c index 0a690ea..65bb756 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,5 +1,3 @@ -#define _GNU_SOURCE - #include #include #include diff --git a/src/utils.h b/src/utils.h index a0ae697..9e9236b 100644 --- a/src/utils.h +++ b/src/utils.h @@ -21,9 +21,7 @@ #ifndef _MAPPER_UTILS_H #define _MAPPER_UTILS_H -#define _GNU_SOURCE - -#include +#include "config.h" #include #include #include