patch-2.1.10 linux/include/asm-i386/byteorder.h
Next file: linux/include/asm-i386/uaccess.h
Previous file: linux/include/asm-i386/bitops.h
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Fri Nov 15 15:55:00 1996
- Orig file:
v2.1.9/linux/include/asm-i386/byteorder.h
- Orig date:
Mon Sep 30 11:19:00 1996
diff -u --recursive --new-file v2.1.9/linux/include/asm-i386/byteorder.h linux/include/asm-i386/byteorder.h
@@ -17,6 +17,21 @@
/* For avoiding bswap on i386 */
#ifdef __KERNEL__
#include <linux/config.h>
+
+/*
+ * In-kernel byte order macros to handle stuff like
+ * byte-order-dependent filesystems etc.
+ */
+#define cpu_to_le32(x) (x)
+#define le32_to_cpu(x) (x)
+#define cpu_to_le16(x) (x)
+#define le16_to_cpu(x) (x)
+
+#define cpu_to_be32(x) htonl((x))
+#define be32_to_cpu(x) ntohl((x))
+#define cpu_to_be16(x) htons((x))
+#define be16_to_cpu(x) ntohs((x))
+
#endif
extern unsigned long int ntohl(unsigned long int);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov