svn commit: trunk/busybox: findutils include
vda at busybox.net
vda at busybox.net
Thu Mar 20 06:13:09 PDT 2008
Author: vda
Date: 2008-03-20 06:13:09 -0700 (Thu, 20 Mar 2008)
New Revision: 21409
Log:
gcc compat fix and warning suppression
by Joe Krahn <krahn AT niehs.nih.gov>
Modified:
trunk/busybox/findutils/find.c
trunk/busybox/include/platform.h
Changeset:
Modified: trunk/busybox/findutils/find.c
===================================================================
--- trunk/busybox/findutils/find.c 2008-03-20 12:47:01 UTC (rev 21408)
+++ trunk/busybox/findutils/find.c 2008-03-20 13:13:09 UTC (rev 21409)
@@ -517,7 +517,10 @@
unsigned cur_action = 0;
USE_FEATURE_FIND_NOT( bool invert_flag = 0; )
- /* 'static' doesn't work here! (gcc 4.1.2) */
+ /* This is the only place in busybox where we use nested function.
+ * So far more standard alternatives were bigger. */
+ /* Suppress a warning "func without a prototype" */
+ auto action* alloc_action(int sizeof_struct, action_fp f);
action* alloc_action(int sizeof_struct, action_fp f)
{
action *ap;
Modified: trunk/busybox/include/platform.h
===================================================================
--- trunk/busybox/include/platform.h 2008-03-20 12:47:01 UTC (rev 21408)
+++ trunk/busybox/include/platform.h 2008-03-20 13:13:09 UTC (rev 21409)
@@ -52,7 +52,8 @@
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
# define ATTRIBUTE_PACKED __attribute__ ((__packed__))
# define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
-# if __GNUC_PREREQ (3,0)
+/* __NO_INLINE__: some gcc's do not honor inlining! :( */
+# if __GNUC_PREREQ (3,0) && !defined(__NO_INLINE__)
# define ALWAYS_INLINE __attribute__ ((always_inline)) inline
/* I've seen a toolchain where I needed __noinline__ instead of noinline */
# define NOINLINE __attribute__((__noinline__))
More information about the busybox-cvs
mailing list