From 3f4eed141a2961899a8df115ae0fc3906118f81b Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Wed, 26 Jan 2005 15:50:56 +0000 Subject: [PATCH] Stefan Fiedler: linux: rediff linux26/75-linux-types_h.patch for linux-2.6.10 - the patch is partially applied in 2.6.10; the pgoff_t part in linux/types.h and the {big,litte}_endian.h patches remain - in big_endian.h, place __constant_cpu_to_be64(x) inside a preprocessor conditional just like the other 64-bit functions [2004123000161517399] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@5485 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- .../base/linux/linux26/75-linux-types_h.patch | 121 +++++++++--------- 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/package/base/linux/linux26/75-linux-types_h.patch b/package/base/linux/linux26/75-linux-types_h.patch index fe2b9c036..1ccdcc028 100644 --- a/package/base/linux/linux26/75-linux-types_h.patch +++ b/package/base/linux/linux26/75-linux-types_h.patch @@ -1,40 +1,13 @@ ---- linux-2.6.9-rock/include/linux/types.h 2004-12-08 18:08:42.000000000 +0100 -+++ usr/include/linux/types.h 2004-12-25 07:15:44.000000000 +0100 -@@ -131,6 +131,12 @@ - #ifndef HAVE_SECTOR_T - typedef unsigned long sector_t; - #endif -+#endif /* __KERNEL_STRICT_NAMES */ -+ -+/* -+ * Below are truly Linux-specific types that should never collide with -+ * any application/library that wants linux/types.h. -+ */ +diff -dur linux-2.6.10/include/linux/byteorder/big_endian.h linux-2.6.10/include/linux-p/byteorder/big_endian.h +--- linux-2.6.10/include/linux/byteorder/big_endian.h 2004-12-27 08:39:23.000000000 +0000 ++++ linux-2.6.10/include/linux-p/byteorder/big_endian.h 2004-12-29 08:03:51.021207112 +0000 +@@ -10,36 +10,62 @@ - /* - * The type of an index into the pagecache. Use a #define so asm/types.h -@@ -150,15 +156,11 @@ - typedef __u16 __bitwise __be16; - typedef __u32 __bitwise __le32; - typedef __u32 __bitwise __be32; -+#if defined(__GNUC__) && !defined(__STRICT_ANSI__) - typedef __u64 __bitwise __le64; - typedef __u64 __bitwise __be64; -+#endif - --#endif /* __KERNEL_STRICT_NAMES */ + #include + #include - --/* -- * Below are truly Linux-specific types that should never collide with -- * any application/library that wants linux/types.h. -- */ - - struct ustat { - __kernel_daddr_t f_tfree; -diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x86-k6-32-desktop-expert/usr/include/linux/byteorder/big_endian.h ---- usr/include/linux/byteorder/big_endian.h 2004-12-08 02:12:31.000000000 +0100 -+++ build/k6-desktop-2.1.0-DEV-x86-k6-32-desktop-expert/usr/include/linux/byteorder/big_endian.h 2004-12-25 08:03:08.694401672 +0100 -@@ -30,31 +15,57 @@ +++ + #define __constant_htonl(x) ((__force __be32)(__u32)(x)) #define __constant_ntohl(x) ((__force __u32)(__be32)(x)) #define __constant_htons(x) ((__force __be16)(__u16)(x)) #define __constant_ntohs(x) ((__force __u16)(__be16)(x)) @@ -50,10 +23,10 @@ diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x #define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32)(__le32)(x)) #define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x))) #define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16)(__le16)(x)) - #define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x)) + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) + + #define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x)) #define __constant_be64_to_cpu(x) ((__force __u64)(__be64)(x)) + +#endif @@ -65,15 +38,15 @@ diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) + - #define __cpu_to_le64(x) ((__force __le64)___swab64((x))) - #define __le64_to_cpu(x) ___swab64((__force __u64)(__le64)(x)) + #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) + #define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x)) + +#endif + - #define __cpu_to_le32(x) ((__force __le32)___swab32((x))) - #define __le32_to_cpu(x) ___swab32((__force __u32)(__le32)(x)) - #define __cpu_to_le16(x) ((__force __le16)___swab16((x))) - #define __le16_to_cpu(x) ___swab16((__force __u16)(__le16)(x)) + #define __cpu_to_le32(x) ((__force __le32)__swab32((x))) + #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) + #define __cpu_to_le16(x) ((__force __le16)__swab16((x))) + #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) + @@ -92,7 +65,7 @@ diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x static inline __le64 __cpu_to_le64p(const __u64 *p) { return (__force __le64)__swab64p(p); -@@ -63,6 +74,9 @@ +@@ -48,6 +74,9 @@ { return __swab64p((__u64 *)p); } @@ -102,7 +75,7 @@ diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x static inline __le32 __cpu_to_le32p(const __u32 *p) { return (__force __le32)__swab32p(p); -@@ -79,6 +93,9 @@ +@@ -64,6 +93,9 @@ { return __swab16p((__u16 *)p); } @@ -112,7 +85,7 @@ diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x static inline __be64 __cpu_to_be64p(const __u64 *p) { return (__force __be64)*p; -@@ -87,6 +104,9 @@ +@@ -72,6 +104,9 @@ { return (__force __u64)*p; } @@ -122,7 +95,7 @@ diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x static inline __be32 __cpu_to_be32p(const __u32 *p) { return (__force __be32)*p; -@@ -103,14 +123,26 @@ +@@ -88,14 +123,26 @@ { return (__force __u16)*p; } @@ -149,10 +122,10 @@ diff -dur /usr/include/linux/byteorder/big_endian.h build/k6-desktop-2.1.0-DEV-x #define __cpu_to_be32s(x) do {} while (0) #define __be32_to_cpus(x) do {} while (0) #define __cpu_to_be16s(x) do {} while (0) -diff -dur /usr/include/linux/byteorder/little_endian.h build/k6-desktop-2.1.0-DEV-x86-k6-32-desktop-expert/usr/include/linux/byteorder/little_endian.h ---- usr/include/linux/byteorder/little_endian.h 2004-12-08 02:12:31.000000000 +0100 -+++ build/k6-desktop-2.1.0-DEV-x86-k6-32-desktop-expert/usr/include/linux/byteorder/little_endian.h 2004-12-25 08:05:34.293267280 +0100 -@@ -30,31 +15,57 @@ +diff -dur linux-2.6.10/include/linux/byteorder/little_endian.h linux-2.6.10/include/linux-p/byteorder/little_endian.h +--- linux-2.6.10/include/linux/byteorder/little_endian.h 2004-12-27 08:39:23.000000000 +0000 ++++ linux-2.6.10/include/linux-p/byteorder/little_endian.h 2004-12-29 08:05:45.593789432 +0000 +@@ -15,31 +15,57 @@ #define __constant_ntohl(x) ___constant_swab32((__force __be32)(x)) #define __constant_htons(x) ((__force __be16)___constant_swab16((x))) #define __constant_ntohs(x) ___constant_swab16((__force __be16)(x)) @@ -195,22 +168,22 @@ diff -dur /usr/include/linux/byteorder/little_endian.h build/k6-desktop-2.1.0-DE + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) + - #define __cpu_to_be64(x) ((__force __be64)___swab64((x))) - #define __be64_to_cpu(x) ___swab64((__force __u64)(__be64)(x)) + #define __cpu_to_be64(x) ((__force __be64)__swab64((x))) + #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) + +#endif + - #define __cpu_to_be32(x) ((__force __be32)___swab32((x))) - #define __be32_to_cpu(x) ___swab32((__force __u32)(__be32)(x)) - #define __cpu_to_be16(x) ((__force __be16)___swab16((x))) - #define __be16_to_cpu(x) ___swab16((__force __u16)(__be16)(x)) + #define __cpu_to_be32(x) ((__force __be32)__swab32((x))) + #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) + #define __cpu_to_be16(x) ((__force __be16)__swab16((x))) + #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) + static inline __le64 __cpu_to_le64p(const __u64 *p) { return (__force __le64)*p; -@@ -63,6 +74,9 @@ +@@ -48,6 +74,9 @@ { return (__force __u64)*p; } @@ -220,7 +193,7 @@ diff -dur /usr/include/linux/byteorder/little_endian.h build/k6-desktop-2.1.0-DE static inline __le32 __cpu_to_le32p(const __u32 *p) { return (__force __le32)*p; -@@ -79,6 +93,9 @@ +@@ -64,6 +93,9 @@ { return (__force __u16)*p; } @@ -230,7 +203,7 @@ diff -dur /usr/include/linux/byteorder/little_endian.h build/k6-desktop-2.1.0-DE static inline __be64 __cpu_to_be64p(const __u64 *p) { return (__force __be64)__swab64p(p); -@@ -87,6 +104,9 @@ +@@ -72,6 +104,9 @@ { return __swab64p((__u64 *)p); } @@ -240,3 +213,33 @@ diff -dur /usr/include/linux/byteorder/little_endian.h build/k6-desktop-2.1.0-DE static inline __be32 __cpu_to_be32p(const __u32 *p) { return (__force __be32)__swab32p(p); +diff -dur linux-2.6.10/include/linux/types.h linux-2.6.10/include/linux-p/types.h +--- linux-2.6.10/include/linux/types.h 2004-12-27 08:39:26.000000000 +0000 ++++ linux-2.6.10/include/linux-p/types.h 2004-12-29 08:07:33.782342272 +0000 +@@ -131,6 +131,12 @@ + #ifndef HAVE_SECTOR_T + typedef unsigned long sector_t; + #endif ++#endif /* __KERNEL_STRICT_NAMES */ ++ ++/* ++ * Below are truly Linux-specific types that should never collide with ++ * any application/library that wants linux/types.h. ++ */ + + /* + * The type of an index into the pagecache. Use a #define so asm/types.h +@@ -140,13 +146,6 @@ + #define pgoff_t unsigned long + #endif + +-#endif /* __KERNEL_STRICT_NAMES */ +- +-/* +- * Below are truly Linux-specific types that should never collide with +- * any application/library that wants linux/types.h. +- */ +- + #ifdef __CHECKER__ + #define __bitwise __attribute__((bitwise)) + #else