Blob Blame History Raw
From 58842990ab46691b5f474143b145689788a01e11 Mon Sep 17 00:00:00 2001
From: Christopher Meng <i@cicku.me>
Date: Thu, 5 Mar 2015 06:51:50 -0500
Subject: [PATCH] Patch to incorporate with new GLIBC cleaner style

---
 configure.ac              | 8 ++++----
 m4/check_func_argtypes.m4 | 2 +-
 src/__fxstatat.c          | 2 +-
 src/__fxstatat64.c        | 2 +-
 src/__xstat.c             | 2 +-
 src/__xstat64.c           | 2 +-
 src/fts.c                 | 2 +-
 src/getcwd_real.c         | 2 +-
 src/libfakechroot.h       | 2 +-
 src/lstat64.c             | 2 +-
 src/mkdtemp.c             | 2 +-
 src/mkstemp.c             | 2 +-
 src/mkstemp64.c           | 2 +-
 src/mkstemps.c            | 2 +-
 src/mkstemps64.c          | 2 +-
 src/mktemp.c              | 2 +-
 src/popen.c               | 2 +-
 src/rel2absat.c           | 2 +-
 src/stat.c                | 2 +-
 src/stat64.c              | 2 +-
 src/system.c              | 2 +-
 test/src/test-chroot.c    | 2 +-
 test/src/test-clearenv.c  | 2 +-
 test/src/test-fts.c       | 2 +-
 test/src/test-lstat.c     | 2 +-
 test/src/test-mkdtemp.c   | 2 +-
 test/src/test-mkstemp.c   | 2 +-
 test/src/test-mktemp.c    | 2 +-
 test/src/test-popen.c     | 2 +-
 test/src/test-realpath.c  | 2 +-
 test/src/test-scandir.c   | 2 +-
 31 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1cd4f1e..08386d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,7 +97,7 @@ AC_CHECK_HEADERS(m4_normalize([
 ]))
 
 AC_CHECK_HEADERS([fts.h], [], [], [
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 ])
 
 # Checks for typedefs, structures, and compiler characteristics.
@@ -309,7 +309,7 @@ ACX_CHECK_FUNC_ARGTYPES([fts_open],
 
 ACX_CHECK_FUNC_ARGTYPES([readlink],
     [
-#define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
     ], [unistd.h],
     [[ssize_t], [const char *_], [char *_], [size_t _]],
     [[ssize_t], [int]],
@@ -319,7 +319,7 @@ ACX_CHECK_FUNC_ARGTYPES([readlink],
 
 ACX_CHECK_FUNC_ARGTYPES([scandir],
     [
-#define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
     ], [dirent.h],
     [[int], [const char *_], [struct dirent ***_], [int(*_)(const struct dirent *)], [int(*_)(const void *,const void *)]],
     [[int]],
@@ -330,7 +330,7 @@ ACX_CHECK_FUNC_ARGTYPES([scandir],
 
 ACX_CHECK_FUNC_ARGTYPES([scandir64],
     [
-#define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
 #define _GNU_SOURCE 1
     ], [dirent.h],
     [[int], [const char *_], [struct dirent64 ***_], [int(*_)(const struct dirent64 *)], [int(*_)(const void *,const void *)]],
diff --git a/m4/check_func_argtypes.m4 b/m4/check_func_argtypes.m4
index c5461e7..d94c573 100644
--- a/m4/check_func_argtypes.m4
+++ b/m4/check_func_argtypes.m4
@@ -19,7 +19,7 @@
 # Example:
 #
 #   ACX_CHECK_FUNC_ARGTYPES([readlink],
-#       [#define _BSD_SOURCE 1
+#       [#define _DEFAULT_SOURCE 1
 #       ], [unistd.h],
 #       [[ssize_t], [const char *_], [char *_], [size_t _]],
 #       [[ssize_t], [int]],
diff --git a/src/__fxstatat.c b/src/__fxstatat.c
index 50e76b8..7fa9ee1 100644
--- a/src/__fxstatat.c
+++ b/src/__fxstatat.c
@@ -23,7 +23,7 @@
 #ifdef HAVE___FXSTATAT
 
 #define _ATFILE_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/stat.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/__fxstatat64.c b/src/__fxstatat64.c
index ffc5515..5599b50 100644
--- a/src/__fxstatat64.c
+++ b/src/__fxstatat64.c
@@ -24,7 +24,7 @@
 
 #define _ATFILE_SOURCE
 #define _LARGEFILE64_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/stat.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/__xstat.c b/src/__xstat.c
index 679eb3b..a763b59 100644
--- a/src/__xstat.c
+++ b/src/__xstat.c
@@ -23,7 +23,7 @@
 #ifdef HAVE___XSTAT
 
 #define _ATFILE_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/stat.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/__xstat64.c b/src/__xstat64.c
index 0b4c33d..5c7c48b 100644
--- a/src/__xstat64.c
+++ b/src/__xstat64.c
@@ -23,7 +23,7 @@
 #ifdef HAVE___XSTAT64
 
 #define _LARGEFILE64_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/stat.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/fts.c b/src/fts.c
index 3613764..06b610d 100644
--- a/src/fts.c
+++ b/src/fts.c
@@ -31,7 +31,7 @@
 
 #include <config.h>
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/param.h>
 #include <sys/stat.h>
 
diff --git a/src/getcwd_real.c b/src/getcwd_real.c
index c55d35f..f4117a3 100644
--- a/src/getcwd_real.c
+++ b/src/getcwd_real.c
@@ -20,7 +20,7 @@
 
 #include <config.h>
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #define _GNU_SOURCE
 
 #ifdef HAVE___LXSTAT64
diff --git a/src/libfakechroot.h b/src/libfakechroot.h
index 787f954..b2f8d14 100644
--- a/src/libfakechroot.h
+++ b/src/libfakechroot.h
@@ -207,7 +207,7 @@ fakechroot_wrapperfn_t fakechroot_loadfunc (struct fakechroot_wrapper *);
 int fakechroot_localdir (const char *);
 
 
-/* We don't want to define _BSD_SOURCE and include stdio.h */
+/* We don't want to define _DEFAULT_SOURCE and include stdio.h */
 int snprintf(char *, size_t, const char *, ...);
 
 #endif
diff --git a/src/lstat64.c b/src/lstat64.c
index e2308af..02a783a 100644
--- a/src/lstat64.c
+++ b/src/lstat64.c
@@ -23,7 +23,7 @@
 #if defined(HAVE_LSTAT64) && !defined(HAVE___LXSTAT64)
 
 #define _LARGEFILE64_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/stat.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/mkdtemp.c b/src/mkdtemp.c
index afc4650..6cfb029 100644
--- a/src/mkdtemp.c
+++ b/src/mkdtemp.c
@@ -22,7 +22,7 @@
 
 #ifdef HAVE_MKDTEMP
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 
 #include "libfakechroot.h"
diff --git a/src/mkstemp.c b/src/mkstemp.c
index 0122a3e..ffb36ac 100644
--- a/src/mkstemp.c
+++ b/src/mkstemp.c
@@ -20,7 +20,7 @@
 
 #include <config.h>
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 
 #include "libfakechroot.h"
diff --git a/src/mkstemp64.c b/src/mkstemp64.c
index 918da82..e2e3681 100644
--- a/src/mkstemp64.c
+++ b/src/mkstemp64.c
@@ -23,7 +23,7 @@
 #ifdef HAVE_MKSTEMP64
 
 #define _LARGEFILE64_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 
 #include "libfakechroot.h"
diff --git a/src/mkstemps.c b/src/mkstemps.c
index ef6db67..eb8b89e 100644
--- a/src/mkstemps.c
+++ b/src/mkstemps.c
@@ -23,7 +23,7 @@
 #ifdef HAVE_MKSTEMPS
 
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <errno.h>
 #include <stdlib.h>
 
diff --git a/src/mkstemps64.c b/src/mkstemps64.c
index 156ed95..2a77818 100644
--- a/src/mkstemps64.c
+++ b/src/mkstemps64.c
@@ -22,7 +22,7 @@
 
 #ifdef HAVE_MKSTEMPS64
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #define _LARGEFILE64_SOURCE
 #include <errno.h>
 #include <stdlib.h>
diff --git a/src/mktemp.c b/src/mktemp.c
index 03993a2..04c1afa 100644
--- a/src/mktemp.c
+++ b/src/mktemp.c
@@ -20,7 +20,7 @@
 
 #include <config.h>
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 
 #include "libfakechroot.h"
diff --git a/src/popen.c b/src/popen.c
index 677f725..f968849 100644
--- a/src/popen.c
+++ b/src/popen.c
@@ -36,7 +36,7 @@
 #ifdef __GNUC__
 
 #define _POSIX_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/param.h>
 #include <sys/wait.h>
 
diff --git a/src/rel2absat.c b/src/rel2absat.c
index e715d6d..22c6487 100644
--- a/src/rel2absat.c
+++ b/src/rel2absat.c
@@ -22,7 +22,7 @@
 
 #ifdef HAVE_FCHDIR
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #define _GNU_SOURCE
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/src/stat.c b/src/stat.c
index 3f85fa3..3a77f9b 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -22,7 +22,7 @@
 
 #ifndef HAVE___XSTAT
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/stat.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/stat64.c b/src/stat64.c
index ea1a7c9..a72aed7 100644
--- a/src/stat64.c
+++ b/src/stat64.c
@@ -23,7 +23,7 @@
 #if defined(HAVE_STAT64) && !defined(HAVE___XSTAT64)
 
 #define _LARGEFILE64_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/stat.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/system.c b/src/system.c
index 59bc26c..e54f6db 100644
--- a/src/system.c
+++ b/src/system.c
@@ -23,7 +23,7 @@
 #ifdef __GNUC__
 
 #define _POSIX_SOURCE
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
diff --git a/test/src/test-chroot.c b/test/src/test-chroot.c
index 643255a..844c739 100644
--- a/test/src/test-chroot.c
+++ b/test/src/test-chroot.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/test/src/test-clearenv.c b/test/src/test-clearenv.c
index e4df104..6b942f1 100644
--- a/test/src/test-clearenv.c
+++ b/test/src/test-clearenv.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 
diff --git a/test/src/test-fts.c b/test/src/test-fts.c
index 7967674..5c6831b 100644
--- a/test/src/test-fts.c
+++ b/test/src/test-fts.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fts.h>
diff --git a/test/src/test-lstat.c b/test/src/test-lstat.c
index 6184fdd..a15b93f 100644
--- a/test/src/test-lstat.c
+++ b/test/src/test-lstat.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
diff --git a/test/src/test-mkdtemp.c b/test/src/test-mkdtemp.c
index 00763b0..e9d8774 100644
--- a/test/src/test-mkdtemp.c
+++ b/test/src/test-mkdtemp.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 
diff --git a/test/src/test-mkstemp.c b/test/src/test-mkstemp.c
index fe9babc..51f77a9 100644
--- a/test/src/test-mkstemp.c
+++ b/test/src/test-mkstemp.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 
diff --git a/test/src/test-mktemp.c b/test/src/test-mktemp.c
index a37dada..06fc09b 100644
--- a/test/src/test-mktemp.c
+++ b/test/src/test-mktemp.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 
diff --git a/test/src/test-popen.c b/test/src/test-popen.c
index f0b2e44..7553df4 100644
--- a/test/src/test-popen.c
+++ b/test/src/test-popen.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
diff --git a/test/src/test-realpath.c b/test/src/test-realpath.c
index eb301e7..baa91e5 100644
--- a/test/src/test-realpath.c
+++ b/test/src/test-realpath.c
@@ -1,4 +1,4 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <limits.h>
 #include <unistd.h>
 #include <stdlib.h>
diff --git a/test/src/test-scandir.c b/test/src/test-scandir.c
index cb7c152..7941696 100644
--- a/test/src/test-scandir.c
+++ b/test/src/test-scandir.c
@@ -1,4 +1,4 @@
-#define _SVID_SOURCE
+#define _DEFAULT_SOURCE
 #include <dirent.h>
 #include <unistd.h>
 #include <stdlib.h>
-- 
2.3.1