diff options
author | Joshua Kinard <kumba@gentoo.org> | 2003-09-16 02:13:21 +0000 |
---|---|---|
committer | Joshua Kinard <kumba@gentoo.org> | 2003-09-16 02:13:21 +0000 |
commit | 074222c2649c5c638517986aefa34fd8df4bce9f (patch) | |
tree | 74cd1a00641aa3185d8df97c19b086d17e68b0a0 /sys-kernel/mips-headers/files | |
parent | Added a patch for big-endian archs needed to build programs and moved 2.4.21-... (diff) | |
download | historical-074222c2649c5c638517986aefa34fd8df4bce9f.tar.gz historical-074222c2649c5c638517986aefa34fd8df4bce9f.tar.bz2 historical-074222c2649c5c638517986aefa34fd8df4bce9f.zip |
Added a patch for big-endian archs needed to build programs and moved 2.4.21-r2 to mips stable
Diffstat (limited to 'sys-kernel/mips-headers/files')
-rw-r--r-- | sys-kernel/mips-headers/files/bigendian-byteorder-fix.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/sys-kernel/mips-headers/files/bigendian-byteorder-fix.patch b/sys-kernel/mips-headers/files/bigendian-byteorder-fix.patch new file mode 100644 index 000000000000..bec279abce81 --- /dev/null +++ b/sys-kernel/mips-headers/files/bigendian-byteorder-fix.patch @@ -0,0 +1,50 @@ +--- linux/include/linux/byteorder/generic.h.orig 2003-08-10 18:15:07.000000000 -0700 ++++ linux/include/linux/byteorder/generic.h 2003-08-10 18:16:36.000000000 -0700 +@@ -122,7 +122,7 @@ + #define be16_to_cpus __be16_to_cpus + #endif + +- ++#if defined(__KERNEL__) + /* + * Handle ntohl and suches. These have various compatibility + * issues - like we want to give the prototype even though we +@@ -146,35 +146,26 @@ + * Do the prototypes. Somebody might want to take the + * address or some such sick thing.. + */ +-#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2) + extern __u32 ntohl(__u32); + extern __u32 htonl(__u32); +-#else +-extern unsigned long int ntohl(unsigned long int); +-extern unsigned long int htonl(unsigned long int); +-#endif + extern unsigned short int ntohs(unsigned short int); + extern unsigned short int htons(unsigned short int); + +- +-#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) && !defined(__STRICT_ANSI__) ++#if defined(__GNUC__) && defined(__OPTIMIZE__) + + #define ___htonl(x) __cpu_to_be32(x) + #define ___htons(x) __cpu_to_be16(x) + #define ___ntohl(x) __be32_to_cpu(x) + #define ___ntohs(x) __be16_to_cpu(x) + +-#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2) + #define htonl(x) ___htonl(x) + #define ntohl(x) ___ntohl(x) +-#else +-#define htonl(x) ((unsigned long)___htonl(x)) +-#define ntohl(x) ((unsigned long)___ntohl(x)) +-#endif + #define htons(x) ___htons(x) + #define ntohs(x) ___ntohs(x) + + #endif /* OPTIMIZE */ + ++#endif /* KERNEL */ ++ + + #endif /* _LINUX_BYTEORDER_GENERIC_H */ |