patch-2.4.20 linux-2.4.20/include/asm-x86_64/div64.h
Next file: linux-2.4.20/include/asm-x86_64/dma.h
Previous file: linux-2.4.20/include/asm-x86_64/desc.h
Back to the patch index
Back to the overall index
-  Lines: 15
-  Date:
Thu Nov 28 15:53:15 2002
-  Orig file: 
linux-2.4.19/include/asm-x86_64/div64.h
-  Orig date: 
Wed Dec 31 16:00:00 1969
diff -urN linux-2.4.19/include/asm-x86_64/div64.h linux-2.4.20/include/asm-x86_64/div64.h
@@ -0,0 +1,14 @@
+#ifndef __X86_64_DIV64
+#define __X86_64_DIV64
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+	int __res; \
+	__res = ((unsigned long) (n)) % (unsigned) (base); \
+	(n) = ((unsigned long) (n)) / (unsigned) (base); \
+	__res; })
+
+#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)