summaryrefslogtreecommitdiffstats
path: root/sys/sys/imgact_aout.h
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-02-27 17:16:18 +0000
committertmm <tmm@FreeBSD.org>2002-02-27 17:16:18 +0000
commit3ed05b7b8966710c5cffbf0ba479dd2e07c91c0a (patch)
tree46353f300fd15b6b132ccde617d8726a2e38d224 /sys/sys/imgact_aout.h
parente9d577adb2ffdd3b7300415775c1212a087ce0dc (diff)
downloadFreeBSD-src-3ed05b7b8966710c5cffbf0ba479dd2e07c91c0a.zip
FreeBSD-src-3ed05b7b8966710c5cffbf0ba479dd2e07c91c0a.tar.gz
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
Diffstat (limited to 'sys/sys/imgact_aout.h')
-rw-r--r--sys/sys/imgact_aout.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/imgact_aout.h b/sys/sys/imgact_aout.h
index 4b20b87..07d03d0 100644
--- a/sys/sys/imgact_aout.h
+++ b/sys/sys/imgact_aout.h
@@ -50,13 +50,13 @@
((mag) & 0xffff) )
#define N_GETMAGIC_NET(ex) \
- (__ntohl((ex).a_midmag) & 0xffff)
+ (ntohl((ex).a_midmag) & 0xffff)
#define N_GETMID_NET(ex) \
- ((__ntohl((ex).a_midmag) >> 16) & 0x03ff)
+ ((ntohl((ex).a_midmag) >> 16) & 0x03ff)
#define N_GETFLAG_NET(ex) \
- ((__ntohl((ex).a_midmag) >> 26) & 0x3f)
+ ((ntohl((ex).a_midmag) >> 26) & 0x3f)
#define N_SETMAGIC_NET(ex,mag,mid,flag) \
- ( (ex).a_midmag = __htonl( (((flag)&0x3f)<<26) | (((mid)&0x03ff)<<16) \
+ ( (ex).a_midmag = htonl( (((flag)&0x3f)<<26) | (((mid)&0x03ff)<<16) \
| (((mag)&0xffff)) ) )
#define N_ALIGN(ex,x) \
OpenPOWER on IntegriCloud