SDL standard library

Dependents:   H261_encoder

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SDL_config.h Source File

SDL_config.h

00001 /*
00002   Simple DirectMedia Layer
00003   Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
00004 
00005   This software is provided 'as-is', without any express or implied
00006   warranty.  In no event will the authors be held liable for any damages
00007   arising from the use of this software.
00008 
00009   Permission is granted to anyone to use this software for any purpose,
00010   including commercial applications, and to alter it and redistribute it
00011   freely, subject to the following restrictions:
00012 
00013   1. The origin of this software must not be misrepresented; you must not
00014      claim that you wrote the original software. If you use this software
00015      in a product, an acknowledgment in the product documentation would be
00016      appreciated but is not required.
00017   2. Altered source versions must be plainly marked as such, and must not be
00018      misrepresented as being the original software.
00019   3. This notice may not be removed or altered from any source distribution.
00020 */
00021 
00022 #ifndef _SDL_config_windows_h
00023 #define _SDL_config_windows_h
00024 
00025 #include "SDL_platform.h"
00026 
00027 /* This is a set of defines to configure the SDL features */
00028 
00029 #if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
00030 #if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
00031 #define HAVE_STDINT_H   1
00032 #elif defined(_MSC_VER)
00033 typedef signed __int8 int8_t;
00034 typedef unsigned __int8 uint8_t;
00035 typedef signed __int16 int16_t;
00036 typedef unsigned __int16 uint16_t;
00037 typedef signed __int32 int32_t;
00038 typedef unsigned __int32 uint32_t;
00039 typedef signed __int64 int64_t;
00040 typedef unsigned __int64 uint64_t;
00041 #ifndef _UINTPTR_T_DEFINED
00042 #ifdef  _WIN64
00043 typedef unsigned __int64 uintptr_t;
00044 #else
00045 typedef unsigned int uintptr_t;
00046 #endif
00047 #define _UINTPTR_T_DEFINED
00048 #endif
00049 /* Older Visual C++ headers don't have the Win64-compatible typedefs... */
00050 #if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
00051 #define DWORD_PTR DWORD
00052 #endif
00053 #if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
00054 #define LONG_PTR LONG
00055 #endif
00056 #else /* !__GNUC__ && !_MSC_VER */
00057 typedef signed char int8_t;
00058 typedef unsigned char uint8_t;
00059 typedef signed short int16_t;
00060 typedef unsigned short uint16_t;
00061 typedef signed int int32_t;
00062 typedef unsigned int uint32_t;
00063 typedef signed long long int64_t;
00064 typedef unsigned long long uint64_t;
00065 #ifndef _SIZE_T_DEFINED_
00066 #define _SIZE_T_DEFINED_
00067 typedef unsigned int size_t;
00068 #endif
00069 typedef unsigned int uintptr_t;
00070 #endif /* __GNUC__ || _MSC_VER */
00071 #endif /* !_STDINT_H_ && !HAVE_STDINT_H */
00072 
00073 #ifdef _WIN64
00074 # define SIZEOF_VOIDP 8
00075 #else
00076 # define SIZEOF_VOIDP 4
00077 #endif
00078 
00079 /* This is disabled by default to avoid C runtime dependencies and manifest requirements */
00080 #ifdef HAVE_LIBC
00081 /* Useful headers */
00082 #define HAVE_STDIO_H 1
00083 #define STDC_HEADERS 1
00084 #define HAVE_STRING_H 1
00085 #define HAVE_CTYPE_H 1
00086 #define HAVE_MATH_H 1
00087 #define HAVE_SIGNAL_H 1
00088 
00089 /* C library functions */
00090 #define HAVE_MALLOC 1
00091 #define HAVE_CALLOC 1
00092 #define HAVE_REALLOC 1
00093 #define HAVE_FREE 1
00094 #define HAVE_ALLOCA 1
00095 #define HAVE_QSORT 1
00096 #define HAVE_ABS 1
00097 #define HAVE_MEMSET 1
00098 #define HAVE_MEMCPY 1
00099 #define HAVE_MEMMOVE 1
00100 #define HAVE_MEMCMP 1
00101 #define HAVE_STRLEN 1
00102 #define HAVE__STRREV 1
00103 #define HAVE__STRUPR 1
00104 #define HAVE__STRLWR 1
00105 #define HAVE_STRCHR 1
00106 #define HAVE_STRRCHR 1
00107 #define HAVE_STRSTR 1
00108 #define HAVE__LTOA 1
00109 #define HAVE__ULTOA 1
00110 #define HAVE_STRTOL 1
00111 #define HAVE_STRTOUL 1
00112 #define HAVE_STRTOD 1
00113 #define HAVE_ATOI 1
00114 #define HAVE_ATOF 1
00115 #define HAVE_STRCMP 1
00116 #define HAVE_STRNCMP 1
00117 #define HAVE__STRICMP 1
00118 #define HAVE__STRNICMP 1
00119 #define HAVE_ATAN 1
00120 #define HAVE_ATAN2 1
00121 #define HAVE_ACOS  1
00122 #define HAVE_ASIN  1
00123 #define HAVE_CEIL 1
00124 #define HAVE_COS 1
00125 #define HAVE_COSF 1
00126 #define HAVE_FABS 1
00127 #define HAVE_FLOOR 1
00128 #define HAVE_LOG 1
00129 #define HAVE_POW 1
00130 #define HAVE_SIN 1
00131 #define HAVE_SINF 1
00132 #define HAVE_SQRT 1
00133 #if _MSC_VER >= 1800
00134 #define HAVE_STRTOLL 1
00135 #define HAVE_VSSCANF 1
00136 #define HAVE_COPYSIGN 1
00137 #define HAVE_SCALBN 1
00138 #endif
00139 #if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
00140 #define HAVE_M_PI 1
00141 #endif
00142 #else
00143 #define HAVE_STDARG_H   1
00144 #define HAVE_STDDEF_H   1
00145 #endif
00146 
00147 /* Enable various audio drivers */
00148 #define SDL_AUDIO_DRIVER_DSOUND 1
00149 #define SDL_AUDIO_DRIVER_XAUDIO2    1
00150 #define SDL_AUDIO_DRIVER_WINMM  1
00151 #define SDL_AUDIO_DRIVER_DISK   1
00152 #define SDL_AUDIO_DRIVER_DUMMY  1
00153 
00154 /* Enable various input drivers */
00155 #define SDL_JOYSTICK_DINPUT 1
00156 #define SDL_HAPTIC_DINPUT   1
00157 
00158 /* Enable various shared object loading systems */
00159 #define SDL_LOADSO_WINDOWS  1
00160 
00161 /* Enable various threading systems */
00162 #define SDL_THREAD_WINDOWS  1
00163 
00164 /* Enable various timer systems */
00165 #define SDL_TIMER_WINDOWS   1
00166 
00167 /* Enable various video drivers */
00168 #define SDL_VIDEO_DRIVER_DUMMY  1
00169 #define SDL_VIDEO_DRIVER_WINDOWS    1
00170 
00171 #ifndef SDL_VIDEO_RENDER_D3D
00172 #define SDL_VIDEO_RENDER_D3D    1
00173 #endif
00174 
00175 /* Enable OpenGL support */
00176 #ifndef SDL_VIDEO_OPENGL
00177 #define SDL_VIDEO_OPENGL    1
00178 #endif
00179 #ifndef SDL_VIDEO_OPENGL_WGL
00180 #define SDL_VIDEO_OPENGL_WGL    1
00181 #endif
00182 #ifndef SDL_VIDEO_RENDER_OGL
00183 #define SDL_VIDEO_RENDER_OGL    1
00184 #endif
00185 #ifndef SDL_VIDEO_RENDER_OGL_ES2
00186 #define SDL_VIDEO_RENDER_OGL_ES2    1
00187 #endif
00188 #ifndef SDL_VIDEO_OPENGL_ES2
00189 #define SDL_VIDEO_OPENGL_ES2    1
00190 #endif
00191 #ifndef SDL_VIDEO_OPENGL_EGL
00192 #define SDL_VIDEO_OPENGL_EGL    1
00193 #endif
00194 
00195 
00196 /* Enable system power support */
00197 #define SDL_POWER_WINDOWS 1
00198 
00199 /* Enable filesystem support */
00200 #define SDL_FILESYSTEM_WINDOWS  1
00201 
00202 /* Enable assembly routines (Win64 doesn't have inline asm) */
00203 #ifndef _WIN64
00204 #define SDL_ASSEMBLY_ROUTINES   1
00205 #endif
00206 
00207 #endif /* _SDL_config_windows_h */