patch-2.4.19 linux-2.4.19/fs/udf/udfend.h

Next file: linux-2.4.19/fs/udf/udftime.c
Previous file: linux-2.4.19/fs/udf/udfdecl.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/fs/udf/udfend.h linux-2.4.19/fs/udf/udfend.h
@@ -1,60 +1,9 @@
 #ifndef __UDF_ENDIAN_H
 #define __UDF_ENDIAN_H
 
-#ifndef __KERNEL__ 
-
-#include <sys/types.h>
-
-#if __BYTE_ORDER == 0
-
-#error "__BYTE_ORDER must be defined"
-
-#elif __BYTE_ORDER == __BIG_ENDIAN
-
-#define le16_to_cpu(x) \
-	((Uint16)((((Uint16)(x) & 0x00FFU) << 8) | \
-		  (((Uint16)(x) & 0xFF00U) >> 8)))
- 
-#define le32_to_cpu(x) \
-	((Uint32)((((Uint32)(x) & 0x000000FFU) << 24) | \
-		  (((Uint32)(x) & 0x0000FF00U) <<  8) | \
-		  (((Uint32)(x) & 0x00FF0000U) >>  8) | \
-		  (((Uint32)(x) & 0xFF000000U) >> 24)))
-
-#define le64_to_cpu(x) \
-	((Uint64)((((Uint64)(x) & 0x00000000000000FFULL) << 56) | \
-		  (((Uint64)(x) & 0x000000000000FF00ULL) << 40) | \
-		  (((Uint64)(x) & 0x0000000000FF0000ULL) << 24) | \
-		  (((Uint64)(x) & 0x00000000FF000000ULL) <<  8) | \
-		  (((Uint64)(x) & 0x000000FF00000000ULL) >>  8) | \
-		  (((Uint64)(x) & 0x0000FF0000000000ULL) >> 24) | \
-		  (((Uint64)(x) & 0x00FF000000000000ULL) >> 40) | \
-		  (((Uint64)(x) & 0xFF00000000000000ULL) >> 56)))		
-
-#define cpu_to_le16(x) (le16_to_cpu(x))
-#define cpu_to_le32(x) (le32_to_cpu(x))
-#define cpu_to_le64(x) (le64_to_cpu(x))
-
-#else /* __BYTE_ORDER == __LITTLE_ENDIAN */
-
-#define le16_to_cpu(x) (x)
-#define le32_to_cpu(x) (x)
-#define le64_to_cpu(x) (x)
-#define cpu_to_le16(x) (x)
-#define cpu_to_le32(x) (x)
-#define cpu_to_le64(x) (x)
-
-#endif /* __BYTE_ORDER == 0 */
-
-#include <string.h>
-
-#else /* __KERNEL__ */
-
 #include <asm/byteorder.h>
 #include <linux/string.h>
 
-#endif /* ! __KERNEL__ */
-
 static inline lb_addr lelb_to_cpu(lb_addr in)
 {
 	lb_addr out;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)