summaryrefslogtreecommitdiff
path: root/sys/arch/arc
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-25 13:11:41 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-25 13:11:41 +0000
commit18f45ad398b05c4efffae0a93e86d74c54b3c8d7 (patch)
treec6c23bbb71a3571cd28044d4d7c93631ebf9e4ce /sys/arch/arc
parentd85e22a85637536532097c45f5dce36b039cf6f4 (diff)
htons et al. works on explicit 16- and 32-bit quantities and not the
machine dependent "short" and "long" integer. Correct and enhance manpage. Change all short and longs to u_int16_t and u_int32_t, respectively. OpenBSD RCSIds
Diffstat (limited to 'sys/arch/arc')
-rw-r--r--sys/arch/arc/include/endian.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/arc/include/endian.h b/sys/arch/arc/include/endian.h
index b03f0c5c78d..199bbf21675 100644
--- a/sys/arch/arc/include/endian.h
+++ b/sys/arch/arc/include/endian.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: endian.h,v 1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: endian.h,v 1.2 1996/11/25 13:11:16 niklas Exp $ */
/* $NetBSD: endian.h,v 1.4 1994/10/26 21:09:38 cgd Exp $ */
/*
@@ -64,10 +64,10 @@
#include <sys/cdefs.h>
__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));
+u_int32_t htonl __P((u_int32_t));
+u_int16_t htons __P((u_int16_t));
+u_int32_t ntohl __P((u_int32_t));
+u_int16_t ntohs __P((u_int16_t));
__END_DECLS
/*
@@ -86,10 +86,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((u_int32_t)x)
+#define NTOHS(x) (x) = ntohs((u_int16_t)x)
+#define HTONL(x) (x) = htonl((u_int32_t)x)
+#define HTONS(x) (x) = htons((u_int16_t)x)
#endif
#endif /* ! _POSIX_SOURCE */
#endif /* !_ENDIAN_H_ */