summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include/endian.h
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-30 22:41:57 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-30 22:41:57 +0000
commit072b56c97e17e8e69ddab5a735b5297387a88a70 (patch)
tree22eaee09956502609c240ddff8a108d8733521f9 /sys/arch/alpha/include/endian.h
parentb85b15782739220b5bf2563ccdc7ac9e256a31d2 (diff)
Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.
Diffstat (limited to 'sys/arch/alpha/include/endian.h')
-rw-r--r--sys/arch/alpha/include/endian.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/arch/alpha/include/endian.h b/sys/arch/alpha/include/endian.h
index 4cbdb950046..ec524c5f64e 100644
--- a/sys/arch/alpha/include/endian.h
+++ b/sys/arch/alpha/include/endian.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: endian.h,v 1.2 1996/07/29 22:58:40 niklas Exp $ */
-/* $NetBSD: endian.h,v 1.1 1995/02/13 23:07:36 cgd Exp $ */
+/* $OpenBSD: endian.h,v 1.3 1996/10/30 22:39:03 niklas Exp $ */
+/* $NetBSD: endian.h,v 1.3 1996/10/13 19:57:59 cgd Exp $ */
/*
* Copyright (c) 1987, 1991, 1993
@@ -58,11 +58,14 @@
#include <sys/cdefs.h>
+typedef u_int32_t in_addr_t;
+typedef u_int16_t in_port_t;
+
__BEGIN_DECLS
-unsigned long htonl __P((unsigned long));
-unsigned short htons __P((unsigned short));
-unsigned long ntohl __P((unsigned long));
-unsigned short ntohs __P((unsigned short));
+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));
__END_DECLS
/*
@@ -81,10 +84,10 @@ __END_DECLS
#else
-#define NTOHL(x) (x) = ntohl((u_long)x)
-#define NTOHS(x) (x) = ntohs((u_short)x)
-#define HTONL(x) (x) = htonl((u_long)x)
-#define HTONS(x) (x) = htons((u_short)x)
+#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)
#endif
#endif /* !_POSIX_SOURCE */
#endif /* !_ENDIAN_H_ */