1 /* $FreeBSD: src/gnu/usr.bin/cc/cc_tools/size-host.h,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $ */ 2 /* $OpenBSD: size-host.h,v 1.4 2011/11/09 14:56:13 jasper Exp $ */ 3 4 #ifdef SIZEOF_INT 5 # undef SIZEOF_INT 6 #endif 7 8 #ifdef SIZEOF_SHORT 9 # undef SIZEOF_SHORT 10 #endif 11 12 #ifdef SIZEOF_LONG 13 # undef SIZEOF_LONG 14 #endif 15 16 #ifdef SIZEOF_VOID_P 17 # undef SIZEOF_VOID_P 18 #endif 19 20 #ifdef SIZEOF_LONG_LONG 21 # undef SIZEOF_LONG_LONG 22 #endif 23 24 #define SIZEOF_INT 4 25 #define SIZEOF_SHORT 2 26 #define SIZEOF_LONG_LONG 8 27 28 #if __LP64__ 29 #define SIZEOF_LONG 8 30 #define SIZEOF_VOID_P 8 31 #else 32 #define SIZEOF_LONG 4 33 #define SIZEOF_VOID_P 4 34 #endif 35 36 #ifdef WORDS_BIGENDIAN 37 #undef WORDS_BIGENDIAN 38 #endif 39 40 #if defined(__sparc__) || defined(__sparc64__) 41 #define WORDS_BIGENDIAN 1 42 #endif 43