diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-07-20 19:31:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-07-20 19:31:07 +0000 |
commit | 8840759c6147277a1e8b1c2a315e42daf4e0b794 (patch) | |
tree | 7327a27989e75b2ec938bde8d64e6043f613bb64 | |
parent | eea561871b45a2335ab6a09f14dad627ffcdc1cd (diff) | |
download | busybox-w32-8840759c6147277a1e8b1c2a315e42daf4e0b794.tar.gz busybox-w32-8840759c6147277a1e8b1c2a315e42daf4e0b794.tar.bz2 busybox-w32-8840759c6147277a1e8b1c2a315e42daf4e0b794.zip |
move lchown/chown define out of specific files and into platform.h where it belongs
-rw-r--r-- | coreutils/chgrp.c | 5 | ||||
-rw-r--r-- | include/platform.h | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 46db4081a..5064f2d6e 100644 --- a/coreutils/chgrp.c +++ b/coreutils/chgrp.c | |||
@@ -16,11 +16,6 @@ | |||
16 | #include <unistd.h> | 16 | #include <unistd.h> |
17 | #include "busybox.h" | 17 | #include "busybox.h" |
18 | 18 | ||
19 | /* Don't use lchown glibc older then 2.1.x */ | ||
20 | #if (__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 1) | ||
21 | #define lchown chown | ||
22 | #endif | ||
23 | |||
24 | static int fileAction(const char *fileName, struct stat *statbuf, void* junk) | 19 | static int fileAction(const char *fileName, struct stat *statbuf, void* junk) |
25 | { | 20 | { |
26 | if (lchown(fileName, statbuf->st_uid, *((long *) junk)) == 0) { | 21 | if (lchown(fileName, statbuf->st_uid, *((long *) junk)) == 0) { |
diff --git a/include/platform.h b/include/platform.h index 7157f8a45..8890d4ffd 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -171,7 +171,7 @@ typedef unsigned long long int uintmax_t; | |||
171 | #endif | 171 | #endif |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | /* uclibc does not implement daemon for no-mmu systems. | 174 | /* uclibc does not implement daemon() for no-mmu systems. |
175 | * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably. | 175 | * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably. |
176 | * For earlier versions there is no reliable way to check if we are building | 176 | * For earlier versions there is no reliable way to check if we are building |
177 | * for a mmu-less system; the user should pass EXTRA_CFLAGS="-DBB_NOMMU" | 177 | * for a mmu-less system; the user should pass EXTRA_CFLAGS="-DBB_NOMMU" |
@@ -187,6 +187,12 @@ typedef unsigned long long int uintmax_t; | |||
187 | * out of the tree, so stop saying it should be. */ | 187 | * out of the tree, so stop saying it should be. */ |
188 | #define fdprintf dprintf | 188 | #define fdprintf dprintf |
189 | 189 | ||
190 | /* Don't use lchown with glibc older then 2.1.x ... uC-libc lacks it */ | ||
191 | #if (defined __GLIBC__ && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 1) || \ | ||
192 | defined __UC_LIBC__ | ||
193 | # define lchown chown | ||
194 | #endif | ||
195 | |||
190 | /* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */ | 196 | /* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */ |
191 | /* FIXME: fix tar.c! */ | 197 | /* FIXME: fix tar.c! */ |
192 | #ifndef FNM_LEADING_DIR | 198 | #ifndef FNM_LEADING_DIR |