From 124416d8328866ab54cb8332b56f50993c0f96cf Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 10 Jul 2013 13:24:15 -0400 Subject: [PATCH] Use AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCE It's less copy/paste, works everywhere, etc. Also fix some missing #include "config.h". --- configure.ac | 1 + src/libostree/ostree-core.c | 3 --- src/libostree/ostree-diff.c | 2 -- src/libostree/ostree-repo-traverse.c | 2 -- src/libotutil/ot-unix-utils.c | 2 -- src/ostree/ot-admin-cleanup.c | 1 - src/ostree/ot-admin-functions.c | 1 - src/ostree/ot-admin-util.c | 1 - src/switchroot/ostree-mount-util.c | 2 +- src/switchroot/ostree-prepare-root.c | 4 +++- src/switchroot/ostree-remount.c | 2 +- 11 files changed, 6 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 63986ab7..385d16f7 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,7 @@ AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.11 -Wno-portability foreign no-define tar-ustar no-dist-gzip dist-xz]) AM_MAINTAINER_MODE([enable]) AM_SILENT_RULES([yes]) +AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_PROG_CC diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index fe76bd46..4e9fdf98 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -20,9 +20,6 @@ * Author: Colin Walters */ -/* for mkdtemp */ -#define _GNU_SOURCE - #include "config.h" #include "ostree.h" diff --git a/src/libostree/ostree-diff.c b/src/libostree/ostree-diff.c index 0a8222da..560ac808 100644 --- a/src/libostree/ostree-diff.c +++ b/src/libostree/ostree-diff.c @@ -20,8 +20,6 @@ * Author: Colin Walters */ -#define _GNU_SOURCE - #include "config.h" #include "ostree.h" diff --git a/src/libostree/ostree-repo-traverse.c b/src/libostree/ostree-repo-traverse.c index 70b22d7a..6838314d 100644 --- a/src/libostree/ostree-repo-traverse.c +++ b/src/libostree/ostree-repo-traverse.c @@ -20,8 +20,6 @@ * Author: Colin Walters */ -#define _GNU_SOURCE - #include "config.h" #include "ostree.h" diff --git a/src/libotutil/ot-unix-utils.c b/src/libotutil/ot-unix-utils.c index 54c5ac14..8cb19926 100644 --- a/src/libotutil/ot-unix-utils.c +++ b/src/libotutil/ot-unix-utils.c @@ -22,8 +22,6 @@ #include "config.h" -#define _GNU_SOURCE - #include "otutil.h" #include diff --git a/src/ostree/ot-admin-cleanup.c b/src/ostree/ot-admin-cleanup.c index d8d9e8e3..9c2560f3 100644 --- a/src/ostree/ot-admin-cleanup.c +++ b/src/ostree/ot-admin-cleanup.c @@ -20,7 +20,6 @@ * Author: Colin Walters */ -#define _GNU_SOURCE #include "config.h" #include "ot-admin-functions.h" diff --git a/src/ostree/ot-admin-functions.c b/src/ostree/ot-admin-functions.c index 3780c2a9..4c3cb49d 100644 --- a/src/ostree/ot-admin-functions.c +++ b/src/ostree/ot-admin-functions.c @@ -20,7 +20,6 @@ * Author: Colin Walters */ -#define _GNU_SOURCE #include "config.h" #include "ot-admin-functions.h" diff --git a/src/ostree/ot-admin-util.c b/src/ostree/ot-admin-util.c index 871871fd..affe6db0 100644 --- a/src/ostree/ot-admin-util.c +++ b/src/ostree/ot-admin-util.c @@ -20,7 +20,6 @@ * Author: Colin Walters */ -#define _GNU_SOURCE #include "config.h" #include "ot-admin-functions.h" diff --git a/src/switchroot/ostree-mount-util.c b/src/switchroot/ostree-mount-util.c index c993c238..c6df559c 100644 --- a/src/switchroot/ostree-mount-util.c +++ b/src/switchroot/ostree-mount-util.c @@ -20,7 +20,7 @@ * Author: Colin Walters */ -#define _GNU_SOURCE +#include "config.h" #include #include diff --git a/src/switchroot/ostree-prepare-root.c b/src/switchroot/ostree-prepare-root.c index cc885d3c..a77da7c6 100644 --- a/src/switchroot/ostree-prepare-root.c +++ b/src/switchroot/ostree-prepare-root.c @@ -23,7 +23,9 @@ * along with this program. If not, see . * */ -#define _GNU_SOURCE + +#include "config.h" + #include #include #include diff --git a/src/switchroot/ostree-remount.c b/src/switchroot/ostree-remount.c index ff5a06da..6dbeecc0 100644 --- a/src/switchroot/ostree-remount.c +++ b/src/switchroot/ostree-remount.c @@ -20,7 +20,7 @@ * Author: Colin Walters */ -#define _GNU_SOURCE +#include "config.h" #include #include