diff options
-rw-r--r-- | include/linux/byteorder/generic.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index e86e4a938373..3dc715b02500 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h | |||
@@ -124,19 +124,8 @@ | |||
124 | #define be32_to_cpus __be32_to_cpus | 124 | #define be32_to_cpus __be32_to_cpus |
125 | #define cpu_to_be16s __cpu_to_be16s | 125 | #define cpu_to_be16s __cpu_to_be16s |
126 | #define be16_to_cpus __be16_to_cpus | 126 | #define be16_to_cpus __be16_to_cpus |
127 | #endif | ||
128 | 127 | ||
129 | |||
130 | #if defined(__KERNEL__) | ||
131 | /* | 128 | /* |
132 | * Handle ntohl and suches. These have various compatibility | ||
133 | * issues - like we want to give the prototype even though we | ||
134 | * also have a macro for them in case some strange program | ||
135 | * wants to take the address of the thing or something.. | ||
136 | * | ||
137 | * Note that these used to return a "long" in libc5, even though | ||
138 | * long is often 64-bit these days.. Thus the casts. | ||
139 | * | ||
140 | * They have to be macros in order to do the constant folding | 129 | * They have to be macros in order to do the constant folding |
141 | * correctly - if the argument passed into a inline function | 130 | * correctly - if the argument passed into a inline function |
142 | * it is no longer constant according to gcc.. | 131 | * it is no longer constant according to gcc.. |
@@ -147,17 +136,6 @@ | |||
147 | #undef htonl | 136 | #undef htonl |
148 | #undef htons | 137 | #undef htons |
149 | 138 | ||
150 | /* | ||
151 | * Do the prototypes. Somebody might want to take the | ||
152 | * address or some such sick thing.. | ||
153 | */ | ||
154 | extern __u32 ntohl(__be32); | ||
155 | extern __be32 htonl(__u32); | ||
156 | extern __u16 ntohs(__be16); | ||
157 | extern __be16 htons(__u16); | ||
158 | |||
159 | #if defined(__GNUC__) && defined(__OPTIMIZE__) | ||
160 | |||
161 | #define ___htonl(x) __cpu_to_be32(x) | 139 | #define ___htonl(x) __cpu_to_be32(x) |
162 | #define ___htons(x) __cpu_to_be16(x) | 140 | #define ___htons(x) __cpu_to_be16(x) |
163 | #define ___ntohl(x) __be32_to_cpu(x) | 141 | #define ___ntohl(x) __be32_to_cpu(x) |
@@ -168,9 +146,6 @@ extern __be16 htons(__u16); | |||
168 | #define htons(x) ___htons(x) | 146 | #define htons(x) ___htons(x) |
169 | #define ntohs(x) ___ntohs(x) | 147 | #define ntohs(x) ___ntohs(x) |
170 | 148 | ||
171 | #endif /* OPTIMIZE */ | ||
172 | |||
173 | #endif /* KERNEL */ | 149 | #endif /* KERNEL */ |
174 | 150 | ||
175 | |||
176 | #endif /* _LINUX_BYTEORDER_GENERIC_H */ | 151 | #endif /* _LINUX_BYTEORDER_GENERIC_H */ |