aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include/endian.h
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2001-08-30 00:04:19 +0000
committerMike Barcroft <mike@FreeBSD.org>2001-08-30 00:04:19 +0000
commit03516cfeb01dd63a72e120acc0ad027bd5bde63a (patch)
tree2a398220f9e238744c0dfb240b714a2129e1c526 /sys/sparc64/include/endian.h
parente7e2b8018452c041381375b0236a226c8ccb352a (diff)
downloadsrc-03516cfeb01dd63a72e120acc0ad027bd5bde63a.tar.gz
src-03516cfeb01dd63a72e120acc0ad027bd5bde63a.zip
o Remove some GCCisms in src/powerpc/include/endian.h.
o Unify <machine/endian.h>'s across all architectures. o Make bswapXX() functions use a different spelling of u_int16_t and friends to reduce namespace pollution. The bswapXX() functions don't actually exist, but we'll probably import these at some point. Atleast one driver (if_de) depends on bswapXX() for big endian cases. o Deprecate byteorder(3) prototypes from <sys/types.h>, these are now prototyped indirectly in <arpa/inet.h>. o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these are now typedef'd in <arpa/inet.h>. o Change byteorder(3) prototypes to use standards compliant uint32_t (spelled __uint32_t to reduce namespace pollution). o Document new preferred headers and standards compliance. Discussed with: bde PR: 29946 Reviewed by: bmilekic
Notes
Notes: svn path=/head/; revision=82530
Diffstat (limited to 'sys/sparc64/include/endian.h')
-rw-r--r--sys/sparc64/include/endian.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/sparc64/include/endian.h b/sys/sparc64/include/endian.h
index 0e8e1f193391..b63b68ec27c5 100644
--- a/sys/sparc64/include/endian.h
+++ b/sys/sparc64/include/endian.h
@@ -47,17 +47,19 @@
#define BYTE_ORDER BIG_ENDIAN
+#ifndef _KERNEL
#include <sys/cdefs.h>
-#include <sys/types.h>
+#endif
+#include <machine/ansi.h>
__BEGIN_DECLS
-in_addr_t htonl __P((in_addr_t));
-in_port_t htons __P((in_port_t));
-in_addr_t ntohl __P((in_addr_t));
-in_port_t ntohs __P((in_port_t));
-u_int16_t bswap16 __P((u_int16_t));
-u_int32_t bswap32 __P((u_int32_t));
-u_int64_t bswap64 __P((u_int64_t));
+__uint32_t htonl __P((__uint32_t));
+__uint16_t htons __P((__uint16_t));
+__uint32_t ntohl __P((__uint32_t));
+__uint16_t ntohs __P((__uint16_t));
+__uint16_t bswap16 __P((__uint16_t));
+__uint32_t bswap32 __P((__uint32_t));
+__uint64_t bswap64 __P((__uint64_t));
__END_DECLS
/*