debuggers.hg

view stubdom/grub/osdep.h @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents c8d9ade45781
children
line source
1 #ifndef __OSDEP_H__
2 #define __OSDEP_H__
4 #include <byteswap.h>
5 #define swap32(x) bswap_32(x)
6 #define swap16(x) bswap_16(x)
8 #include <machine/endian.h>
9 #if BYTE_ORDER == BIG_ENDIAN
10 #define htons(x) (x)
11 #define ntohs(x) (x)
12 #define htonl(x) (x)
13 #define ntohl(x) (x)
14 #else
15 #define htons(x) swap16(x)
16 #define ntohs(x) swap16(x)
17 #define htonl(x) swap32(x)
18 #define ntohl(x) swap32(x)
19 #endif
21 typedef unsigned long Address;
23 /* ANSI prototyping macro */
24 #ifdef __STDC__
25 #define P(x) x
26 #else
27 #define P(x) ()
28 #endif
30 #endif