patch-2.1.10 linux/include/asm-alpha/byteorder.h
Next file: linux/include/asm-alpha/uaccess.h
Previous file: linux/include/asm-alpha/bitops.h
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Thu Nov 14 15:36:13 1996
- Orig file:
v2.1.9/linux/include/asm-alpha/byteorder.h
- Orig date:
Mon Jul 1 20:06:05 1996
diff -u --recursive --new-file v2.1.9/linux/include/asm-alpha/byteorder.h linux/include/asm-alpha/byteorder.h
@@ -7,12 +7,30 @@
#undef htons
#ifndef __LITTLE_ENDIAN
-#define __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
#endif
#ifndef __LITTLE_ENDIAN_BITFIELD
#define __LITTLE_ENDIAN_BITFIELD
#endif
+
+#ifdef __KERNEL__
+
+/*
+ * 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 /* __KERNEL__ */
extern unsigned long int ntohl(unsigned long int);
extern unsigned short int ntohs(unsigned short int);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov