
===========================================================================
Index: linux/Makefile
===========================================================================

--- /usr/tmp/TmpDir.24906-0/linux/Makefile_1.84	Tue Apr 17 10:56:52 2001
+++ linux/Makefile	Tue Apr 17 10:53:39 2001
@@ -26,10 +26,7 @@
 
 AS		= $(CROSS_COMPILE)as
 LD		= $(CROSS_COMPILE)ld
-#comment out this line if compiling on RH 7.0
-CC		= $(CROSS_COMPILE)gcc -V egcs-2.91.66
-# AND uncomment the following line
-#CC		= $(CROSS_COMPILE)kgcc 
+CC		= $(CROSS_COMPILE)gcc 
 CPP		= $(CC) -E
 AR		= $(CROSS_COMPILE)ar
 NM		= $(CROSS_COMPILE)nm

===========================================================================
Index: linux/fs/xfs/linux/xfs_linux.h
===========================================================================

--- /usr/tmp/TmpDir.24906-0/linux/fs/xfs/linux/xfs_linux.h_1.47	Tue Apr 17 10:56:52 2001
+++ linux/fs/xfs/linux/xfs_linux.h	Tue Apr 17 10:24:15 2001
@@ -257,6 +257,68 @@
 #define roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
 
 /* Move the kernel do_div definition off to one side */
+
+#ifdef __I386_DIV64
+/* For ia32 we need to pull some tricks to get past various versions
+ * of the compiler which do not like us using do_div in the middle
+ * of large functions.
+ */
+static inline __u32 xfs_do_div(void *a, __u32 b, int n)
+{
+	__u32	mod;
+
+	switch (n) {
+		case 4:
+			mod = *(__u32 *)a % b;
+			*(__u32 *)a = *(__u32 *)a / b;
+			return mod;
+		case 8:
+			{
+			unsigned long __upper, __low, __high, __mod;
+			__u64	c = *(__u64 *)a;
+			__upper = __high = c >> 32;
+			__low = c;
+			if (__high) {
+				__upper = __high % (b);
+				__high = __high / (b);
+			}
+			asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (b), "0" (__low), "1" (__upper));
+			asm("":"=A" (c):"a" (__low),"d" (__high));
+			*(__u64 *)a = c;
+			return __mod;
+			}
+	}
+
+	/* NOTREACHED */
+	return 0;
+}
+
+/* Side effect free 64 bit mod operation */
+static inline __u32 xfs_do_mod(void *a, __u32 b, int n)
+{
+	switch (n) {
+		case 4:
+			return *(__u32 *)a % b;
+		case 8:
+			{
+			unsigned long __upper, __low, __high, __mod;
+			__u64	c = *(__u64 *)a;
+			__upper = __high = c >> 32;
+			__low = c;
+			if (__high) {
+				__upper = __high % (b);
+				__high = __high / (b);
+			}
+			asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (b), "0" (__low), "1" (__upper));
+			asm("":"=A" (c):"a" (__low),"d" (__high));
+			return __mod;
+			}
+	}
+
+	/* NOTREACHED */
+	return 0;
+}
+#else
 static inline __u32 xfs_do_div(void *a, __u32 b, int n)
 {
 	__u32	mod;
@@ -291,6 +353,7 @@
 	/* NOTREACHED */
 	return 0;
 }
+#endif
 
 #undef do_div
 #define do_div(a, b)	xfs_do_div(&(a), (b), sizeof(a))

===========================================================================
Index: linux/fs/xfs/xfs_log.h
===========================================================================

--- /usr/tmp/TmpDir.24906-0/linux/fs/xfs/xfs_log.h_1.55	Tue Apr 17 10:56:52 2001
+++ linux/fs/xfs/xfs_log.h	Tue Apr 17 10:57:37 2001
@@ -52,7 +52,7 @@
  */
 static
 #ifdef __GNUC__
-# if !((__GNUC__ == 2) && (__GNUC_MINOR__ >= 95))
+# if !((__GNUC__ == 2) && (__GNUC_MINOR__ == 95))
 __inline__
 #endif
 #endif
