[PATCH] compatibility fix for compilers with __NO_INLINE__
Joe Krahn
krahn at niehs.nih.gov
Wed Mar 5 08:54:12 PST 2008
Some GCC compilers do not honor inlining, in which case they are supposed to define __NO_INLINE__.
In that case, inline keywords can generate a lot of warnings. This patch skips the inline
declarations for those compilers.
--- busybox-1.9.1.orig/include/platform.h 2008-02-12 11:03:10.000000000 -0500
+++ busybox-1.9.1/include/platform.h 2008-03-04 11:56:27.000000000 -0500
@@ -52,7 +52,7 @@
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
# define ATTRIBUTE_PACKED __attribute__ ((__packed__))
# define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
-# if __GNUC_PREREQ (3,0)
+#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
mailing list