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 // Define this to use an OS-specific git_powf() power math function. This
23 // is useful if your compiler's powf() doesn't implement every special case
24 // of the C99 standard.
25 // #define USE_OWN_POWF
27 // -------------------------------------------------------------------
29 // Make sure we're compiling for a sane platform. For now, this means
30 // 8-bit bytes and 32-bit pointers. We'll support 64-bit machines at
31 // some point in the future, but we will probably never support machines
32 // that can't read memory 8 bits at a time; it's just too much hassle.
37 #error "Git needs 8-bit bytes"
40 // This check doesn't work on all compilers, unfortunately.
41 // It's checked by an assert() at runtime in initCompiler().
43 // #if sizeof(void*) != 4
44 #error "Git needs 32-bit pointers"
47 // Now we determine what types to use for 8-bit, 16-bit and 32-bit ints.
50 typedef signed char git_sint8;
51 typedef unsigned char git_uint8;
53 #error "Can't find an 8-bit integer type"
57 typedef signed short git_sint16;
58 typedef unsigned short git_uint16;
60 typedef signed int git_sint16;
61 typedef unsigned int git_uint16;
63 #error "Can't find a 16-bit integer type"
66 #if INT_MAX==0x7fffffff
67 typedef signed int git_sint32;
68 typedef unsigned int git_uint32;
69 #elif LONG_MAX==0x7fffffff
70 typedef signed long git_sint32;
71 typedef unsigned long git_uint32;
73 #error "Can't find a 32-bit integer type"
76 // USE_INLINE is pretty simple to deal with.
79 #define GIT_INLINE static inline
81 #define GIT_INLINE static
84 typedef float git_float;
86 #endif // GIT_CONFIG_H