Re: [PATCH] 2.5.21 kill warnings 4/19

From: Thunder from the hill (thunder@ngforever.de)
Date: Mon Jun 10 2002 - 16:34:21 EST


Hi,

On Mon, 10 Jun 2002, Tom Rini wrote:
> Right. Maybe it should even go in <linux/compiler.h> if it's not
> already there.

You want this?

Index: include/linux/compiler.h
===================================================================
RCS file: /var/cvs/thunder-2.5/include/linux/compiler.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 compiler.h
--- include/linux/compiler.h 10 Jun 2002 15:19:48 -0000 1.1.1.1
+++ include/linux/compiler.h 10 Jun 2002 21:33:38 -0000
@@ -8,7 +8,15 @@

 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
 #define __builtin_expect(x, expected_value) (x)
-#endif
+#endif /* GCC < 2.96 */
+
+/*
+ * There may or may not be a __func__. For GCC < 2.95, there is none, so
we
+ * define it as __FUNCTION__ there, even though it's NOT equivalent.
+ */
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 95
+#define __func__ __FUNCTION__
+#endif /* GCC < 2.95 */

 #define likely(x) __builtin_expect((x),1)
 #define unlikely(x) __builtin_expect((x),0)

Regards,
Thunder

-- 
German attitude becoming        |	Thunder from the hill at ngforever
rightaway popular:		|
       "Get outa my way,  	|	free inhabitant not directly
    for I got a mobile phone!"	|	belonging anywhere

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:19 EST