[ostree] Use AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCE



commit 124416d8328866ab54cb8332b56f50993c0f96cf
Author: Colin Walters <walters verbum org>
Date:   Wed Jul 10 13:24:15 2013 -0400

    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 63986ab..385d16f 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 fe76bd4..4e9fdf9 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -20,9 +20,6 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-/* 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 0a8222d..560ac80 100644
--- a/src/libostree/ostree-diff.c
+++ b/src/libostree/ostree-diff.c
@@ -20,8 +20,6 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-#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 70b22d7..6838314 100644
--- a/src/libostree/ostree-repo-traverse.c
+++ b/src/libostree/ostree-repo-traverse.c
@@ -20,8 +20,6 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-#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 54c5ac1..8cb1992 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 <gio/gio.h>
diff --git a/src/ostree/ot-admin-cleanup.c b/src/ostree/ot-admin-cleanup.c
index d8d9e8e..9c2560f 100644
--- a/src/ostree/ot-admin-cleanup.c
+++ b/src/ostree/ot-admin-cleanup.c
@@ -20,7 +20,6 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-#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 3780c2a..4c3cb49 100644
--- a/src/ostree/ot-admin-functions.c
+++ b/src/ostree/ot-admin-functions.c
@@ -20,7 +20,6 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-#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 871871f..affe6db 100644
--- a/src/ostree/ot-admin-util.c
+++ b/src/ostree/ot-admin-util.c
@@ -20,7 +20,6 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-#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 c993c23..c6df559 100644
--- a/src/switchroot/ostree-mount-util.c
+++ b/src/switchroot/ostree-mount-util.c
@@ -20,7 +20,7 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-#define _GNU_SOURCE
+#include "config.h"
 
 #include <stdarg.h>
 #include <errno.h>
diff --git a/src/switchroot/ostree-prepare-root.c b/src/switchroot/ostree-prepare-root.c
index cc885d3..a77da7c 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 <http://www.gnu.org/licenses/>.
  *
  */
-#define _GNU_SOURCE
+
+#include "config.h"
+
 #include <sys/mount.h>
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/switchroot/ostree-remount.c b/src/switchroot/ostree-remount.c
index ff5a06d..6dbeecc 100644
--- a/src/switchroot/ostree-remount.c
+++ b/src/switchroot/ostree-remount.c
@@ -20,7 +20,7 @@
  * Author: Colin Walters <walters verbum org>
  */
 
-#define _GNU_SOURCE
+#include "config.h"
 
 #include <string.h>
 #include <stdio.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]