patch-2.3.35 linux/include/asm-sparc64/div64.h

Next file: linux/include/asm-sparc64/dma.h
Previous file: linux/include/asm-sparc64/auxio.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.34/linux/include/asm-sparc64/div64.h linux/include/asm-sparc64/div64.h
@@ -0,0 +1,14 @@
+#ifndef __SPARC64_DIV64
+#define __SPARC64_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 /* __SPARC64_DIV64 */

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])