diff options
| author | Dan Kegel <dank@kegel.com> | 2002-06-02 22:35:05 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-06-02 22:35:05 -0700 |
| commit | c8e2aa5971bb27e81e3037d78e8b060ffa676d1f (patch) | |
| tree | fce6a207525ac77fddb78945e20ba929c9013d4a /include/linux/byteorder | |
| parent | 1f986d30ab06d158c4c3ed6156de4dce7beace99 (diff) | |
[PATCH] must be __KERNEL__ for byteorder/generic.h
Here's that patch again (MIME this time, so tabs don't get
lost by my silly gui mailer); applies cleanly against against 2.4.19-pre8.
Nobody commented on it last time I posted it, and it does
make compiling gcc easier, so I guess that makes it trivial patch
monkey fodder. Or am I making a silly mistake?
Diffstat (limited to 'include/linux/byteorder')
| -rw-r--r-- | include/linux/byteorder/generic.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index d3d63a5a1e31..5f33f565d7bf 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h @@ -123,6 +123,7 @@ #endif +#if defined(__KERNEL__) /* * Handle ntohl and suches. These have various compatibility * issues - like we want to give the prototype even though we @@ -146,17 +147,11 @@ * 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__) #define ___htonl(x) __cpu_to_be32(x) @@ -164,17 +159,14 @@ extern unsigned short int htons(unsigned short int); #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 */ |
