aboutsummaryrefslogtreecommitdiff
path: root/sys/alpha/include
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/alpha/include
parente7e2b8018452c041381375b0236a226c8ccb352a (diff)
Notes
Diffstat (limited to 'sys/alpha/include')
-rw-r--r--sys/alpha/include/ansi.h2
-rw-r--r--sys/alpha/include/endian.h26
2 files changed, 16 insertions, 12 deletions
diff --git a/sys/alpha/include/ansi.h b/sys/alpha/include/ansi.h
index e9f14d62d404c..c2ec7f2bd4480 100644
--- a/sys/alpha/include/ansi.h
+++ b/sys/alpha/include/ansi.h
@@ -49,6 +49,8 @@
*/
#define _BSD_CLOCK_T_ int /* clock() */
#define _BSD_CLOCKID_T_ int /* clockid_t */
+#define _BSD_IN_ADDR_T_ __uint32_t /* inet(3) functions */
+#define _BSD_IN_PORT_T_ __uint16_t
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */
#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
diff --git a/sys/alpha/include/endian.h b/sys/alpha/include/endian.h
index 068f2f401365d..0ba53cd0e986e 100644
--- a/sys/alpha/include/endian.h
+++ b/sys/alpha/include/endian.h
@@ -56,17 +56,19 @@
#define BYTE_ORDER LITTLE_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
/*
@@ -85,10 +87,10 @@ __END_DECLS
#else
-#define NTOHL(x) (x) = ntohl((in_addr_t)x)
-#define NTOHS(x) (x) = ntohs((in_port_t)x)
-#define HTONL(x) (x) = htonl((in_addr_t)x)
-#define HTONS(x) (x) = htons((in_port_t)x)
+#define NTOHL(x) (x) = ntohl((__uint32_t)x)
+#define NTOHS(x) (x) = ntohs((__uint16_t)x)
+#define HTONL(x) (x) = htonl((__uint32_t)x)
+#define HTONS(x) (x) = htons((__uint16_t)x)
#endif
#endif /* !_POSIX_SOURCE */
#endif /* !_ENDIAN_H_ */