path: root/sys/sparc64/include/endian.h
diff options
authorThomas Moestl <tmm@FreeBSD.org>2002-02-27 17:16:18 +0000
committerThomas Moestl <tmm@FreeBSD.org>2002-02-27 17:16:18 +0000
commit90ce56c287b065fe63716ac95ec28e6de3da0d3f (patch)
tree46353f300fd15b6b132ccde617d8726a2e38d224 /sys/sparc64/include/endian.h
parent51aa959f050e4977c82b33dfe0152c4f89475b52 (diff)
Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike
Notes: svn path=/head/; revision=91394
Diffstat (limited to 'sys/sparc64/include/endian.h')
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/sparc64/include/endian.h b/sys/sparc64/include/endian.h
index 532daabd9bb9..fc51c7ed7d71 100644
--- a/sys/sparc64/include/endian.h
+++ b/sys/sparc64/include/endian.h
@@ -57,9 +57,4 @@
#endif /* !_POSIX_SOURCE */
-#define __htonl(x) (x)
-#define __htons(x) (x)
-#define __ntohl(x) (x)
-#define __ntohs(x) (x)
#endif /* !_MACHINE_ENDIAN_H_ */