2 Copyright (C) 2006 John Tsiombikas <nuclear@siggraph.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 /* type.h finds the appropriate way to define sized integer types
20 * and also defines the standard scalar type based on the configuration.
25 #include "3dengfx_config.h"
27 #ifdef SINGLE_PRECISION_MATH
28 typedef float scalar_t;
30 typedef double scalar_t;
31 #endif /* floating point precision */
33 #include <stdlib.h> /* to get __GLIBC__ defined if applicable */
35 #if defined(__MACH__) || defined(__MINGW32__)
37 #endif /* explicitly set stdint.h availability for some platform */
39 #if (__STDC_VERSION__ >= 199900) || defined(__GLIBC__) || defined(HAVE_STDINT_H)
41 #elif defined(unix) || defined(__unix__)
42 #include <sys/types.h>
43 #elif defined(_MSC_VER)
45 typedef __int8 int8_t;
46 typedef unsigned __int8 uint8_t;
47 typedef __int16 int16_t;
48 typedef unsigned __int16 uint16_t;
49 typedef __int32 int32_t;
50 typedef unsigned __int32 uint32_t;
51 typedef __int64 int64_t;
52 typedef unsigned __int64 uint64_t;
54 #include "sdl_config_win32.h"
56 #error "unsupported platform, or detection failed"
57 #endif /* stdint detection */
59 #endif /* FOO_TYPES_H_ */