2006-02-24 07:26:31 +00:00
|
|
|
/*
|
2011-04-08 13:03:26 -07:00
|
|
|
Simple DirectMedia Layer
|
|
|
|
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
|
2006-02-24 07:26:31 +00:00
|
|
|
|
2011-04-08 13:03:26 -07:00
|
|
|
This software is provided 'as-is', without any express or implied
|
|
|
|
warranty. In no event will the authors be held liable for any damages
|
|
|
|
arising from the use of this software.
|
2006-02-24 07:26:31 +00:00
|
|
|
|
2011-04-08 13:03:26 -07:00
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
|
|
including commercial applications, and to alter it and redistribute it
|
|
|
|
freely, subject to the following restrictions:
|
2006-02-24 07:26:31 +00:00
|
|
|
|
2011-04-08 13:03:26 -07:00
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
|
|
claim that you wrote the original software. If you use this software
|
|
|
|
in a product, an acknowledgment in the product documentation would be
|
|
|
|
appreciated but is not required.
|
|
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
|
|
misrepresented as being the original software.
|
|
|
|
3. This notice may not be removed or altered from any source distribution.
|
2006-02-24 07:26:31 +00:00
|
|
|
*/
|
|
|
|
|
2011-01-24 15:46:11 -08:00
|
|
|
#ifndef _SDL_config_windows_h
|
|
|
|
#define _SDL_config_windows_h
|
2006-03-23 21:55:13 +00:00
|
|
|
|
|
|
|
#include "SDL_platform.h"
|
2006-02-24 07:26:31 +00:00
|
|
|
|
|
|
|
/* This is a set of defines to configure the SDL features */
|
|
|
|
|
2009-08-02 12:54:59 +00:00
|
|
|
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
2009-12-15 20:14:50 +00:00
|
|
|
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
2006-06-25 17:14:39 +00:00
|
|
|
#define HAVE_STDINT_H 1
|
|
|
|
#elif defined(_MSC_VER)
|
2006-07-10 21:04:37 +00:00
|
|
|
typedef signed __int8 int8_t;
|
|
|
|
typedef unsigned __int8 uint8_t;
|
|
|
|
typedef signed __int16 int16_t;
|
|
|
|
typedef unsigned __int16 uint16_t;
|
|
|
|
typedef signed __int32 int32_t;
|
|
|
|
typedef unsigned __int32 uint32_t;
|
|
|
|
typedef signed __int64 int64_t;
|
|
|
|
typedef unsigned __int64 uint64_t;
|
2006-03-04 08:24:35 +00:00
|
|
|
#ifndef _UINTPTR_T_DEFINED
|
|
|
|
#ifdef _WIN64
|
2006-07-10 21:04:37 +00:00
|
|
|
typedef unsigned __int64 uintptr_t;
|
2006-03-04 08:24:35 +00:00
|
|
|
#else
|
2006-07-10 21:04:37 +00:00
|
|
|
typedef unsigned int uintptr_t;
|
2006-02-24 18:24:57 +00:00
|
|
|
#endif
|
2006-03-04 08:24:35 +00:00
|
|
|
#define _UINTPTR_T_DEFINED
|
2007-06-29 11:08:53 +00:00
|
|
|
#endif
|
2007-06-21 18:21:49 +00:00
|
|
|
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
|
|
|
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
|
|
|
#define DWORD_PTR DWORD
|
|
|
|
#endif
|
|
|
|
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
|
|
|
#define LONG_PTR LONG
|
|
|
|
#endif
|
2006-07-10 21:04:37 +00:00
|
|
|
#else /* !__GNUC__ && !_MSC_VER */
|
2006-03-04 08:24:35 +00:00
|
|
|
typedef signed char int8_t;
|
|
|
|
typedef unsigned char uint8_t;
|
|
|
|
typedef signed short int16_t;
|
|
|
|
typedef unsigned short uint16_t;
|
|
|
|
typedef signed int int32_t;
|
|
|
|
typedef unsigned int uint32_t;
|
|
|
|
typedef signed long long int64_t;
|
|
|
|
typedef unsigned long long uint64_t;
|
2006-03-06 07:42:36 +00:00
|
|
|
#ifndef _SIZE_T_DEFINED_
|
|
|
|
#define _SIZE_T_DEFINED_
|
2006-03-04 08:24:35 +00:00
|
|
|
typedef unsigned int size_t;
|
2006-03-06 07:42:36 +00:00
|
|
|
#endif
|
2006-03-06 06:00:45 +00:00
|
|
|
typedef unsigned int uintptr_t;
|
2006-06-25 17:14:39 +00:00
|
|
|
#endif /* __GNUC__ || _MSC_VER */
|
2009-08-02 12:54:59 +00:00
|
|
|
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
2009-06-09 17:33:44 +00:00
|
|
|
|
|
|
|
#ifdef _WIN64
|
|
|
|
# define SIZEOF_VOIDP 8
|
|
|
|
#else
|
|
|
|
# define SIZEOF_VOIDP 4
|
|
|
|
#endif
|
2006-02-24 07:26:31 +00:00
|
|
|
|
2006-03-06 07:42:36 +00:00
|
|
|
/* Enabled for SDL 1.2 (binary compatibility) */
|
2008-08-31 16:03:55 +00:00
|
|
|
//#define HAVE_LIBC 1
|
Fixed bug #176
[I'm fixing this for the public headers, but I'm not going to bother for the SDL library code (yet)]
To clarify: Normaly, GCC (or, to be precise, the preprocessor) will ignore
this, and compile the code happily. However, one can specify -Wundef to get a
warning about this.
One can probably argue whether to consider this a bug or not; but I think that
(a) from a semantic point of view, using "#if FOO" when FOO is not defined is
strange, and (b) since it is possible to trigger a warning about this, and a
trivial fix exists, it should be corrected.
I can think of two alternative patches, BTW:
1) Simply use #define HAVE_FOO 0, instead of not defining HAVE_FOO at all
2) Change
#if HAVE_FOO
to
#if HAVE_FOO+0
which always does the right thing.
But I think I still prefer the attached patch :-).
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401633
2006-04-13 13:38:40 +00:00
|
|
|
#ifdef HAVE_LIBC
|
2006-02-24 07:26:31 +00:00
|
|
|
/* Useful headers */
|
2006-03-06 07:42:36 +00:00
|
|
|
#define HAVE_STDIO_H 1
|
|
|
|
#define STDC_HEADERS 1
|
|
|
|
#define HAVE_STRING_H 1
|
|
|
|
#define HAVE_CTYPE_H 1
|
|
|
|
#define HAVE_MATH_H 1
|
|
|
|
#ifndef _WIN32_WCE
|
|
|
|
#define HAVE_SIGNAL_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* C library functions */
|
|
|
|
#define HAVE_MALLOC 1
|
|
|
|
#define HAVE_CALLOC 1
|
|
|
|
#define HAVE_REALLOC 1
|
|
|
|
#define HAVE_FREE 1
|
|
|
|
#define HAVE_ALLOCA 1
|
|
|
|
#define HAVE_QSORT 1
|
|
|
|
#define HAVE_ABS 1
|
|
|
|
#define HAVE_MEMSET 1
|
|
|
|
#define HAVE_MEMCPY 1
|
|
|
|
#define HAVE_MEMMOVE 1
|
|
|
|
#define HAVE_MEMCMP 1
|
|
|
|
#define HAVE_STRLEN 1
|
|
|
|
#define HAVE__STRREV 1
|
|
|
|
#define HAVE__STRUPR 1
|
|
|
|
#define HAVE__STRLWR 1
|
|
|
|
#define HAVE_STRCHR 1
|
|
|
|
#define HAVE_STRRCHR 1
|
|
|
|
#define HAVE_STRSTR 1
|
|
|
|
#define HAVE_ITOA 1
|
|
|
|
#define HAVE__LTOA 1
|
|
|
|
#define HAVE__ULTOA 1
|
|
|
|
#define HAVE_STRTOL 1
|
|
|
|
#define HAVE_STRTOUL 1
|
|
|
|
#define HAVE_STRTOLL 1
|
|
|
|
#define HAVE_STRTOD 1
|
|
|
|
#define HAVE_ATOI 1
|
|
|
|
#define HAVE_ATOF 1
|
|
|
|
#define HAVE_STRCMP 1
|
|
|
|
#define HAVE_STRNCMP 1
|
2006-03-13 02:06:33 +00:00
|
|
|
#define HAVE__STRICMP 1
|
2006-03-13 02:12:39 +00:00
|
|
|
#define HAVE__STRNICMP 1
|
2006-03-06 07:42:36 +00:00
|
|
|
#define HAVE_SSCANF 1
|
2009-01-10 18:32:24 +00:00
|
|
|
#define HAVE_M_PI 1
|
2010-08-29 16:55:58 -07:00
|
|
|
#define HAVE_ATAN 1
|
|
|
|
#define HAVE_ATAN2 1
|
2009-01-12 08:46:28 +00:00
|
|
|
#define HAVE_CEIL 1
|
2009-01-10 18:32:24 +00:00
|
|
|
#define HAVE_COPYSIGN 1
|
|
|
|
#define HAVE_COS 1
|
|
|
|
#define HAVE_COSF 1
|
|
|
|
#define HAVE_FABS 1
|
|
|
|
#define HAVE_FLOOR 1
|
|
|
|
#define HAVE_LOG 1
|
|
|
|
#define HAVE_POW 1
|
|
|
|
#define HAVE_SCALBN 1
|
|
|
|
#define HAVE_SIN 1
|
|
|
|
#define HAVE_SINF 1
|
|
|
|
#define HAVE_SQRT 1
|
2006-03-06 07:42:36 +00:00
|
|
|
#else
|
2006-02-24 07:26:31 +00:00
|
|
|
#define HAVE_STDARG_H 1
|
|
|
|
#define HAVE_STDDEF_H 1
|
2006-03-06 07:42:36 +00:00
|
|
|
#endif
|
2006-02-24 07:26:31 +00:00
|
|
|
|
|
|
|
/* Enable various audio drivers */
|
|
|
|
#ifndef _WIN32_WCE
|
|
|
|
#define SDL_AUDIO_DRIVER_DSOUND 1
|
|
|
|
#endif
|
2006-11-11 06:48:57 +00:00
|
|
|
#define SDL_AUDIO_DRIVER_WINWAVEOUT 1
|
2006-03-14 08:53:33 +00:00
|
|
|
#define SDL_AUDIO_DRIVER_DISK 1
|
|
|
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
2006-02-24 07:26:31 +00:00
|
|
|
|
|
|
|
/* Enable various input drivers */
|
2006-03-11 23:46:45 +00:00
|
|
|
#ifdef _WIN32_WCE
|
2008-08-26 11:40:37 +00:00
|
|
|
#define SDL_JOYSTICK_DISABLED 1
|
2008-08-25 09:55:03 +00:00
|
|
|
#define SDL_HAPTIC_DUMMY 1
|
2006-03-11 23:46:45 +00:00
|
|
|
#else
|
2008-08-26 11:40:37 +00:00
|
|
|
#define SDL_JOYSTICK_DINPUT 1
|
2008-08-25 09:55:03 +00:00
|
|
|
#define SDL_HAPTIC_DINPUT 1
|
2006-03-11 23:46:45 +00:00
|
|
|
#endif
|
2006-02-24 07:26:31 +00:00
|
|
|
|
|
|
|
/* Enable various shared object loading systems */
|
2011-01-20 18:04:05 -08:00
|
|
|
#define SDL_LOADSO_WINDOWS 1
|
2006-02-24 07:26:31 +00:00
|
|
|
|
|
|
|
/* Enable various threading systems */
|
2011-01-20 18:04:05 -08:00
|
|
|
#define SDL_THREAD_WINDOWS 1
|
2006-02-24 07:26:31 +00:00
|
|
|
|
|
|
|
/* Enable various timer systems */
|
|
|
|
#ifdef _WIN32_WCE
|
|
|
|
#define SDL_TIMER_WINCE 1
|
|
|
|
#else
|
2011-01-20 18:04:05 -08:00
|
|
|
#define SDL_TIMER_WINDOWS 1
|
2006-02-24 07:26:31 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Enable various video drivers */
|
2006-03-14 16:19:32 +00:00
|
|
|
#define SDL_VIDEO_DRIVER_DUMMY 1
|
2011-01-20 18:04:05 -08:00
|
|
|
#define SDL_VIDEO_DRIVER_WINDOWS 1
|
2006-07-10 21:04:37 +00:00
|
|
|
|
2011-01-31 22:53:45 -08:00
|
|
|
#ifndef _WIN32_WCE
|
2011-01-24 17:38:18 -08:00
|
|
|
#ifndef SDL_VIDEO_RENDER_D3D
|
2006-07-10 21:04:37 +00:00
|
|
|
#define SDL_VIDEO_RENDER_D3D 1
|
2011-01-24 15:46:11 -08:00
|
|
|
#endif
|
2011-01-24 17:38:18 -08:00
|
|
|
#endif
|
2006-02-24 07:26:31 +00:00
|
|
|
|
|
|
|
/* Enable OpenGL support */
|
2006-03-04 08:24:35 +00:00
|
|
|
#ifndef _WIN32_WCE
|
2011-01-24 17:38:18 -08:00
|
|
|
#ifndef SDL_VIDEO_OPENGL
|
2006-02-24 07:26:31 +00:00
|
|
|
#define SDL_VIDEO_OPENGL 1
|
2011-01-24 17:38:18 -08:00
|
|
|
#endif
|
|
|
|
#ifndef SDL_VIDEO_OPENGL_WGL
|
2006-02-24 07:26:31 +00:00
|
|
|
#define SDL_VIDEO_OPENGL_WGL 1
|
2011-01-24 17:38:18 -08:00
|
|
|
#endif
|
|
|
|
#ifndef SDL_VIDEO_RENDER_OGL
|
2006-07-10 21:04:37 +00:00
|
|
|
#define SDL_VIDEO_RENDER_OGL 1
|
2006-03-04 08:24:35 +00:00
|
|
|
#endif
|
2011-01-24 17:38:18 -08:00
|
|
|
#endif
|
2006-02-24 07:26:31 +00:00
|
|
|
|
2009-06-07 06:06:35 +00:00
|
|
|
/* Enable system power support */
|
|
|
|
#define SDL_POWER_WINDOWS 1
|
|
|
|
|
2006-03-07 05:21:32 +00:00
|
|
|
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
|
|
|
#ifndef _WIN64
|
2006-02-24 07:26:31 +00:00
|
|
|
#define SDL_ASSEMBLY_ROUTINES 1
|
2006-03-07 05:21:32 +00:00
|
|
|
#endif
|
2006-02-24 07:26:31 +00:00
|
|
|
|
2011-01-24 15:46:11 -08:00
|
|
|
#endif /* _SDL_config_windows_h */
|