Re: [PATCH] 2.5.21 kill warnings 4/19

Thunder from the hill
2002-06-10T21:34:35Z

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