ah I just got a (verbose) report about one compilation trouble with old
kernels, the 00_rwsem patch that includes this backwards compatibility
hunk wasn't applied. This is a very very minor issue. Please Linus
include this patch to fix the compilation troubles with the old
compilers:
diff -urN 2.4.10pre10/include/linux/compiler.h rwsem/include/linux/compiler.h
--- 2.4.10pre10/include/linux/compiler.h Thu Jan 1 01:00:00 1970
+++ rwsem/include/linux/compiler.h Tue Sep 18 02:02:08 2001
@@ -0,0 +1,13 @@
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+ a mechanism by which the user can annotate likely branch directions and
+ expect the blocks to be reordered appropriately. Define __builtin_expect
+ to nothing for earlier compilers. */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#endif /* __LINUX_COMPILER_H */
Then you need to simply include <linux/compile.h> from the files that
doesn't compile, this second patch is untested but it should do the
trick (00_rwsem-?? was including compile.h from the rwsem includes that
were in turn included by those files implicitly so I didn't need to add
compile.h in each file):
--- 2.4.10pre11/mm/slab.c.~1~ Tue Sep 18 02:43:04 2001
+++ 2.4.10pre11/mm/slab.c Tue Sep 18 04:00:30 2001
@@ -72,6 +72,7 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/init.h>
+#include <linux/compile.h>
#include <asm/uaccess.h>
/*
--- 2.4.10pre11/mm/page_alloc.c.~1~ Tue Sep 18 02:43:04 2001
+++ 2.4.10pre11/mm/page_alloc.c Tue Sep 18 04:00:20 2001
@@ -17,6 +17,7 @@
#include <linux/pagemap.h>
#include <linux/bootmem.h>
#include <linux/slab.h>
+#include <linux/compile.h>
int nr_swap_pages;
int nr_active_pages;
--- 2.4.10pre11/mm/vmscan.c.~1~ Tue Sep 18 02:43:04 2001
+++ 2.4.10pre11/mm/vmscan.c Tue Sep 18 04:00:47 2001
@@ -21,6 +21,7 @@
#include <linux/init.h>
#include <linux/highmem.h>
#include <linux/file.h>
+#include <linux/compile.h>
#include <asm/pgalloc.h>
Andrea
-
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/