premake/config/SDL_config_windows.template.h
author Sam Lantinga
Thu, 01 Sep 2016 01:26:56 -0700
changeset 10304 ee83e0b4a36f
parent 9998 f67cf37e9cd4
permissions -rw-r--r--
wayland: Add support for relative mouse mode, by Jonas Ã…dahl <jadahl@gmail.com>

Generate the C protocol files from the protocol XML files installed by
wayland-protocols, and use them to implement support for relative pointer
motions and pointer locking.

Note that at the time, the protocol is unstable and may change in the future.
Any future breaking changes will, however, fail gracefully and result in no
regressions compared to before this patch.
icculus@7925
     1
/*
icculus@7925
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
icculus@7925
     4
icculus@7925
     5
  This software is provided 'as-is', without any express or implied
icculus@7925
     6
  warranty.  In no event will the authors be held liable for any damages
icculus@7925
     7
  arising from the use of this software.
icculus@7925
     8
icculus@7925
     9
  Permission is granted to anyone to use this software for any purpose,
icculus@7925
    10
  including commercial applications, and to alter it and redistribute it
icculus@7925
    11
  freely, subject to the following restrictions:
icculus@7925
    12
icculus@7925
    13
  1. The origin of this software must not be misrepresented; you must not
icculus@7925
    14
     claim that you wrote the original software. If you use this software
icculus@7925
    15
     in a product, an acknowledgment in the product documentation would be
icculus@7925
    16
     appreciated but is not required.
icculus@7925
    17
  2. Altered source versions must be plainly marked as such, and must not be
icculus@7925
    18
     misrepresented as being the original software.
icculus@7925
    19
  3. This notice may not be removed or altered from any source distribution.
icculus@7925
    20
*/
icculus@7925
    21
icculus@7925
    22
#ifndef _SDL_config_windows_h
icculus@7925
    23
#define _SDL_config_windows_h
icculus@7925
    24
icculus@7925
    25
#include "SDL_platform.h"
icculus@7925
    26
icculus@7925
    27
/* This is a set of defines to configure the SDL features */
icculus@7925
    28
icculus@7925
    29
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
icculus@7925
    30
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
icculus@7925
    31
#define HAVE_STDINT_H   1
icculus@7925
    32
#elif defined(_MSC_VER)
icculus@7925
    33
typedef signed __int8 int8_t;
icculus@7925
    34
typedef unsigned __int8 uint8_t;
icculus@7925
    35
typedef signed __int16 int16_t;
icculus@7925
    36
typedef unsigned __int16 uint16_t;
icculus@7925
    37
typedef signed __int32 int32_t;
icculus@7925
    38
typedef unsigned __int32 uint32_t;
icculus@7925
    39
typedef signed __int64 int64_t;
icculus@7925
    40
typedef unsigned __int64 uint64_t;
icculus@7925
    41
#ifndef _UINTPTR_T_DEFINED
icculus@7925
    42
#ifdef  _WIN64
icculus@7925
    43
typedef unsigned __int64 uintptr_t;
icculus@7925
    44
#else
icculus@7925
    45
typedef unsigned int uintptr_t;
icculus@7925
    46
#endif
icculus@7925
    47
#define _UINTPTR_T_DEFINED
icculus@7925
    48
#endif
icculus@7925
    49
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
icculus@7925
    50
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
icculus@7925
    51
#define DWORD_PTR DWORD
icculus@7925
    52
#endif
icculus@7925
    53
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
icculus@7925
    54
#define LONG_PTR LONG
icculus@7925
    55
#endif
icculus@7925
    56
#else /* !__GNUC__ && !_MSC_VER */
icculus@7925
    57
typedef signed char int8_t;
icculus@7925
    58
typedef unsigned char uint8_t;
icculus@7925
    59
typedef signed short int16_t;
icculus@7925
    60
typedef unsigned short uint16_t;
icculus@7925
    61
typedef signed int int32_t;
icculus@7925
    62
typedef unsigned int uint32_t;
icculus@7925
    63
typedef signed long long int64_t;
icculus@7925
    64
typedef unsigned long long uint64_t;
icculus@7925
    65
#ifndef _SIZE_T_DEFINED_
icculus@7925
    66
#define _SIZE_T_DEFINED_
icculus@7925
    67
typedef unsigned int size_t;
icculus@7925
    68
#endif
icculus@7925
    69
typedef unsigned int uintptr_t;
icculus@7925
    70
#endif /* __GNUC__ || _MSC_VER */
icculus@7925
    71
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
icculus@7925
    72
icculus@7925
    73
#ifdef _WIN64
icculus@7925
    74
# define SIZEOF_VOIDP 8
icculus@7925
    75
#else
icculus@7925
    76
# define SIZEOF_VOIDP 4
icculus@7925
    77
#endif
icculus@7925
    78
icculus@7925
    79
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
icculus@7925
    80
#ifdef HAVE_LIBC
icculus@7925
    81
/* Useful headers */
icculus@7925
    82
#define HAVE_STDIO_H 1
icculus@7925
    83
#define STDC_HEADERS 1
icculus@7925
    84
#define HAVE_STRING_H 1
icculus@7925
    85
#define HAVE_CTYPE_H 1
icculus@7925
    86
#define HAVE_MATH_H 1
icculus@7925
    87
#define HAVE_SIGNAL_H 1
icculus@7925
    88
icculus@7925
    89
/* C library functions */
icculus@7925
    90
#define HAVE_MALLOC 1
icculus@7925
    91
#define HAVE_CALLOC 1
icculus@7925
    92
#define HAVE_REALLOC 1
icculus@7925
    93
#define HAVE_FREE 1
icculus@7925
    94
#define HAVE_ALLOCA 1
icculus@7925
    95
#define HAVE_QSORT 1
icculus@7925
    96
#define HAVE_ABS 1
icculus@7925
    97
#define HAVE_MEMSET 1
icculus@7925
    98
#define HAVE_MEMCPY 1
icculus@7925
    99
#define HAVE_MEMMOVE 1
icculus@7925
   100
#define HAVE_MEMCMP 1
icculus@7925
   101
#define HAVE_STRLEN 1
icculus@7925
   102
#define HAVE__STRREV 1
icculus@7925
   103
#define HAVE__STRUPR 1
icculus@7925
   104
#define HAVE__STRLWR 1
icculus@7925
   105
#define HAVE_STRCHR 1
icculus@7925
   106
#define HAVE_STRRCHR 1
icculus@7925
   107
#define HAVE_STRSTR 1
icculus@7925
   108
#define HAVE_ITOA 1
icculus@7925
   109
#define HAVE__LTOA 1
icculus@7925
   110
#define HAVE__ULTOA 1
icculus@7925
   111
#define HAVE_STRTOL 1
icculus@7925
   112
#define HAVE_STRTOUL 1
icculus@7925
   113
#define HAVE_STRTOLL 1
icculus@7925
   114
#define HAVE_STRTOD 1
icculus@7925
   115
#define HAVE_ATOI 1
icculus@7925
   116
#define HAVE_ATOF 1
icculus@7925
   117
#define HAVE_STRCMP 1
icculus@7925
   118
#define HAVE_STRNCMP 1
icculus@7925
   119
#define HAVE__STRICMP 1
icculus@7925
   120
#define HAVE__STRNICMP 1
icculus@8089
   121
#define HAVE_VSSCANF 1
icculus@7925
   122
#define HAVE_M_PI 1
icculus@7925
   123
#define HAVE_ATAN 1
icculus@7925
   124
#define HAVE_ATAN2 1
icculus@7925
   125
#define HAVE_CEIL 1
icculus@7925
   126
#define HAVE_COPYSIGN 1
icculus@7925
   127
#define HAVE_COS 1
icculus@7925
   128
#define HAVE_COSF 1
icculus@7925
   129
#define HAVE_FABS 1
icculus@7925
   130
#define HAVE_FLOOR 1
icculus@7925
   131
#define HAVE_LOG 1
icculus@7925
   132
#define HAVE_POW 1
icculus@7925
   133
#define HAVE_SCALBN 1
icculus@7925
   134
#define HAVE_SIN 1
icculus@7925
   135
#define HAVE_SINF 1
icculus@7925
   136
#define HAVE_SQRT 1
icculus@7925
   137
#else
icculus@7925
   138
#define HAVE_STDARG_H   1
icculus@7925
   139
#define HAVE_STDDEF_H   1
icculus@7925
   140
#endif
icculus@7925
   141
icculus@7925
   142
/* Paste generated code here */
icculus@7925
   143
icculus@7925
   144
/* Enable assembly routines (Win64 doesn't have inline asm) */
icculus@7925
   145
#ifndef _WIN64
icculus@7925
   146
#define SDL_ASSEMBLY_ROUTINES   1
icculus@7925
   147
#endif
icculus@7925
   148
icculus@7925
   149
#endif /* _SDL_config_windows_h */