summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cc/cc_tools/size-host.h
blob: ae730fccaacb40e553d4331ea4dd88b89ce70fb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* $FreeBSD: src/gnu/usr.bin/cc/cc_tools/size-host.h,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $ */
/* $OpenBSD: size-host.h,v 1.2 2009/11/02 09:50:39 jsg Exp $ */

#ifdef	SIZEOF_INT
# undef	SIZEOF_INT
#endif

#ifdef	SIZEOF_SHORT
# undef	SIZEOF_SHORT
#endif

#ifdef	SIZEOF_LONG
# undef	SIZEOF_LONG
#endif

#ifdef	SIZEOF_VOID_P
# undef	SIZEOF_VOID_P
#endif

#ifdef	SIZEOF_LONG_LONG
# undef	SIZEOF_LONG_LONG
#endif

#define SIZEOF_INT		4
#define SIZEOF_SHORT		2
#define	SIZEOF_LONG_LONG	8

#if __LP64__
#define	SIZEOF_LONG		8
#define	SIZEOF_VOID_P		8
#else
#define	SIZEOF_LONG		4
#define	SIZEOF_VOID_P		4
#endif

#ifdef WORDS_BIGENDIAN
#undef WORDS_BIGENDIAN
#endif

#if defined(__sparc64__) || defined(__ARMEB__)
#define WORDS_BIGENDIAN		1
#endif