1 // $Id: config.h,v 1.4 2003/10/18 23:19:52 iain Exp $
2 // Platform-dependent configuration for Git
7 // Various compile-time options. You can define them in the
8 // makefile or uncomment them here, whichever's easiest.
10 // Define if we're big-endian and can read and write unaligned data.
11 // #define USE_BIG_ENDIAN_UNALIGNED
13 // Define this to use GCC's labels-as-values extension for a big speedup.
14 // #define USE_DIRECT_THREADING
16 // Define this if we can use the "inline" keyword.
19 // Define this to memory-map the game file to speed up loading. (Unix-specific)
22 // -------------------------------------------------------------------
24 // Make sure we're compiling for a sane platform. For now, this means
25 // 8-bit bytes and 32-bit pointers. We'll support 64-bit machines at
26 // some point in the future, but we will probably never support machines
27 // that can't read memory 8 bits at a time; it's just too much hassle.
32 #error "Git needs 8-bit bytes"
35 // This check doesn't work on all compilers, unfortunately.
36 // It's checked by an assert() at runtime in initCompiler().
38 // #if sizeof(void*) != 4
39 #error "Git needs 32-bit pointers"
42 // Now we determine what types to use for 8-bit, 16-bit and 32-bit ints.
45 typedef signed char git_sint8;
46 typedef unsigned char git_uint8;
48 #error "Can't find an 8-bit integer type"
52 typedef signed short git_sint16;
53 typedef unsigned short git_uint16;
55 typedef signed int git_sint16;
56 typedef unsigned int git_uint16;
58 #error "Can't find a 16-bit integer type"
61 #if INT_MAX==0x7fffffff
62 typedef signed int git_sint32;
63 typedef unsigned int git_uint32;
64 #elif LONG_MAX==0x7fffffff
65 typedef signed long git_sint32;
66 typedef unsigned long git_uint32;
68 #error "Can't find a 32-bit integer type"
71 // USE_INLINE is pretty simple to deal with.
74 #define GIT_INLINE static inline
76 #define GIT_INLINE static
79 #endif // GIT_CONFIG_H