This is not a network - use be32toh etc. instead of ntohl...
This commit is contained in:
parent
b611bd6446
commit
4119a9ec98
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: exec_aout.h,v 1.35 2005/02/04 22:35:02 he Exp $ */
|
||||
/* $NetBSD: exec_aout.h,v 1.36 2005/02/10 16:31:41 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994 Christopher G. Demetriou
|
||||
@ -123,18 +123,18 @@ struct exec {
|
||||
*/
|
||||
#define N_GETMAGIC(ex) \
|
||||
((((ex).a_midmag)&0xffff0000) ? \
|
||||
(ntohl((u_int32_t)((ex).a_midmag))&0xffff) : ((ex).a_midmag))
|
||||
(be32toh((u_int32_t)((ex).a_midmag))&0xffff) : ((ex).a_midmag))
|
||||
#define N_GETMAGIC2(ex) \
|
||||
((((ex).a_midmag)&0xffff0000) ? \
|
||||
(ntohl((u_int32_t)((ex).a_midmag))&0xffff) : (((ex).a_midmag) | 0x10000))
|
||||
(be32toh((u_int32_t)((ex).a_midmag))&0xffff) : (((ex).a_midmag) | 0x10000))
|
||||
#define N_GETMID(ex) \
|
||||
((((ex).a_midmag)&0xffff0000) ? \
|
||||
((ntohl((u_int32_t)((ex).a_midmag))>>16)&0x03ff) : MID_ZERO)
|
||||
((be32toh((u_int32_t)((ex).a_midmag))>>16)&0x03ff) : MID_ZERO)
|
||||
#define N_GETFLAG(ex) \
|
||||
((((ex).a_midmag)&0xffff0000) ? \
|
||||
((ntohl((u_int32_t)((ex).a_midmag))>>26)&0x3f) : 0)
|
||||
((be32toh((u_int32_t)((ex).a_midmag))>>26)&0x3f) : 0)
|
||||
#define N_SETMAGIC(ex,mag,mid,flag) \
|
||||
((ex).a_midmag = htonl((u_int32_t) \
|
||||
((ex).a_midmag = htobe32((u_int32_t) \
|
||||
((((flag)&0x3f)<<26)|(((mid)&0x03ff)<<16)|(((mag)&0xffff)))))
|
||||
|
||||
#define N_ALIGN(ex,x) \
|
||||
|
Loading…
Reference in New Issue
Block a user