svn commit: trunk/busybox: coreutils include
vapier at busybox.net
vapier at busybox.net
Thu Jul 20 19:31:08 UTC 2006
Author: vapier
Date: 2006-07-20 12:31:07 -0700 (Thu, 20 Jul 2006)
New Revision: 15736
Log:
move lchown/chown define out of specific files and into platform.h where it belongs
Modified:
trunk/busybox/coreutils/chgrp.c
trunk/busybox/include/platform.h
Changeset:
Modified: trunk/busybox/coreutils/chgrp.c
===================================================================
--- trunk/busybox/coreutils/chgrp.c 2006-07-20 19:02:24 UTC (rev 15735)
+++ trunk/busybox/coreutils/chgrp.c 2006-07-20 19:31:07 UTC (rev 15736)
@@ -16,11 +16,6 @@
#include <unistd.h>
#include "busybox.h"
-/* Don't use lchown glibc older then 2.1.x */
-#if (__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 1)
-#define lchown chown
-#endif
-
static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
{
if (lchown(fileName, statbuf->st_uid, *((long *) junk)) == 0) {
Modified: trunk/busybox/include/platform.h
===================================================================
--- trunk/busybox/include/platform.h 2006-07-20 19:02:24 UTC (rev 15735)
+++ trunk/busybox/include/platform.h 2006-07-20 19:31:07 UTC (rev 15736)
@@ -171,7 +171,7 @@
#endif
#endif
-/* uclibc does not implement daemon for no-mmu systems.
+/* uclibc does not implement daemon() for no-mmu systems.
* For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
* For earlier versions there is no reliable way to check if we are building
* for a mmu-less system; the user should pass EXTRA_CFLAGS="-DBB_NOMMU"
@@ -187,6 +187,12 @@
* out of the tree, so stop saying it should be. */
#define fdprintf dprintf
+/* Don't use lchown with glibc older then 2.1.x ... uC-libc lacks it */
+#if (defined __GLIBC__ && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 1) || \
+ defined __UC_LIBC__
+# define lchown chown
+#endif
+
/* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */
/* FIXME: fix tar.c! */
#ifndef FNM_LEADING_DIR
More information about the busybox-cvs
mailing list