[git commit master 1/1] *: stop defining _GNU_SOURCE in source files, it's in CFLAGS anyway

Denys Vlasenko vda.linux at googlemail.com
Fri Jun 18 13:15:24 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=b87c17cd16f1b23a07a65ee90a3e30a49992fa51
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 e2fsprogs/old_e2fsprogs/e2fsck.c |    4 ----
 libbb/get_line_from_file.c       |    5 -----
 modutils/depmod.c                |    2 --
 shell/ash.c                      |    6 ------
 util-linux/hwclock.c             |    7 -------
 5 files changed, 0 insertions(+), 24 deletions(-)

diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c
index 7384bc4..4c4c78d 100644
--- a/e2fsprogs/old_e2fsprogs/e2fsck.c
+++ b/e2fsprogs/old_e2fsprogs/e2fsck.c
@@ -29,10 +29,6 @@
  * Licensed under GPLv2 or later, see file License in this tarball for details.
  */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1 /* get strnlen() */
-#endif
-
 #include "e2fsck.h"	/*Put all of our defines here to clean things up*/
 
 #define _(x) x
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c
index 3cb46d2..cbfb45b 100644
--- a/libbb/get_line_from_file.c
+++ b/libbb/get_line_from_file.c
@@ -9,11 +9,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-/* for getline() [GNUism]
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-*/
 #include "libbb.h"
 
 /* This function reads an entire line from a text file, up to a newline
diff --git a/modutils/depmod.c b/modutils/depmod.c
index 4718c4d..c734f14 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -8,8 +8,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#undef _GNU_SOURCE
-#define _GNU_SOURCE
 #include "libbb.h"
 #include "modutils.h"
 #include <sys/utsname.h> /* uname() */
diff --git a/shell/ash.c b/shell/ash.c
index 74fe861..1717407 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -36,12 +36,6 @@
 
 #define JOBS ENABLE_ASH_JOB_CONTROL
 
-#if DEBUG
-# ifndef _GNU_SOURCE
-#  define _GNU_SOURCE
-# endif
-#endif
-
 #include "busybox.h" /* for applet_names */
 #include <paths.h>
 #include <setjmp.h>
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 416271b..3da2e23 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -12,13 +12,6 @@
 #include <sys/utsname.h>
 #include "rtc_.h"
 
-#if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS
-# ifndef _GNU_SOURCE
-#  define _GNU_SOURCE
-# endif
-#endif
-
-
 /* diff code is disabled: it's not sys/hw clock diff, it's some useless
  * "time between hwclock was started and we saw CMOS tick" quantity.
  * It's useless since hwclock is started at a random moment,
-- 
1.7.1



More information about the busybox-cvs mailing list