Debian Codegraph @

stubdom/grub/osdep.h

raw
1 #ifndef __OSDEP_H__
2 #define __OSDEP_H__
3
4 #include <byteswap.h>
5 #define swap32(x) bswap_32(x)
6 #define swap16(x) bswap_16(x)
7
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
20
21 typedef unsigned long Address;
22
23 /* ANSI prototyping macro */
24 #ifdef __STDC__
25 #define P(x) x
26 #else
27 #define P(x) ()
28 #endif
29
30 #endif