mirror of https://github.com/encounter/SDL.git
Avoid clashing with system headers when redefining standard library functions
This commit is contained in:
parent
4cb57bf199
commit
ffab9f46b5
|
@ -43,21 +43,6 @@
|
||||||
typedef LONG NTSTATUS;
|
typedef LONG NTSTATUS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* SDL C runtime functions */
|
|
||||||
#include "SDL_stdinc.h"
|
|
||||||
|
|
||||||
#define calloc SDL_calloc
|
|
||||||
#define free SDL_free
|
|
||||||
#define malloc SDL_malloc
|
|
||||||
#define memcpy SDL_memcpy
|
|
||||||
#define memset SDL_memset
|
|
||||||
#define strcmp SDL_strcmp
|
|
||||||
#define strlen SDL_strlen
|
|
||||||
#define strstr SDL_strstr
|
|
||||||
#define strtol SDL_strtol
|
|
||||||
#define wcscmp SDL_wcscmp
|
|
||||||
#define _wcsdup SDL_wcsdup
|
|
||||||
|
|
||||||
/* The maximum number of characters that can be passed into the
|
/* The maximum number of characters that can be passed into the
|
||||||
HidD_Get*String() functions without it failing.*/
|
HidD_Get*String() functions without it failing.*/
|
||||||
#define MAX_STRING_WCHARS 0xFFF
|
#define MAX_STRING_WCHARS 0xFFF
|
||||||
|
@ -94,11 +79,26 @@ extern "C" {
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "../hidapi/hidapi.h"
|
||||||
|
|
||||||
/*#include <stdio.h>*/
|
/*#include <stdio.h>*/
|
||||||
/*#include <stdlib.h>*/
|
/*#include <stdlib.h>*/
|
||||||
|
|
||||||
|
/* SDL C runtime functions */
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
#define calloc SDL_calloc
|
||||||
|
#define free SDL_free
|
||||||
|
#define malloc SDL_malloc
|
||||||
|
#define memcpy SDL_memcpy
|
||||||
|
#define memset SDL_memset
|
||||||
|
#define strcmp SDL_strcmp
|
||||||
|
#define strlen SDL_strlen
|
||||||
|
#define strstr SDL_strstr
|
||||||
|
#define strtol SDL_strtol
|
||||||
|
#define wcscmp SDL_wcscmp
|
||||||
|
#define _wcsdup SDL_wcsdup
|
||||||
|
|
||||||
#include "../hidapi/hidapi.h"
|
|
||||||
|
|
||||||
#undef MIN
|
#undef MIN
|
||||||
#define MIN(x,y) ((x) < (y)? (x): (y))
|
#define MIN(x,y) ((x) < (y)? (x): (y))
|
||||||
|
|
Loading…
Reference in New Issue