swab.h

Mircea Damian (dmircea@kappa.ro)
Tue, 15 Sep 1998 14:47:54 +0300


Hello everyone,

I do remember that something was discussed on the list about swab.h but
didn't payed to much attention to it.

I was building telnetd from netkit-telnet-0.12 when I observed a lot of
warnings coming from swab.h:

/usr/include/linux/byteorder/swab.h:100: warning: no previous prototype for
`__fswab16'
... etc.

I think is better to place a function prototype for each at line 75..
something like this:

--- swab.h.orig Tue Sep 15 14:22:52 1998
+++ swab.h Tue Sep 15 14:24:44 1998
@@ -73,6 +73,16 @@
#endif


+extern __inline__ __const__ __u16 __fswab16(__u16 x);
+extern __inline__ __u16 __swab16p(__u16 *x);
+extern __inline__ void __swab16s(__u16 *addr);
+extern __inline__ __const__ __u32 __fswab32(__u32 x);
+extern __inline__ __u32 __swab32p(__u32 *x);
+extern __inline__ void __swab32s(__u32 *addr);
+extern __inline__ __const__ __u64 __fswab64(__u64 x);
+extern __inline__ __u64 __swab64p(__u64 *x);
+extern __inline__ void __swab64s(__u64 *addr);
+
/*
* Allow constant folding
*/

Am I right or I miss something?

Mircea

PS: I use
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
with kernel 2.1.121 and libc-5.4.44

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/