Skip to content
Permalink
Browse files

Use SDL_ prefixed versions of C library functions.

FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
  • Loading branch information
slouken committed Feb 7, 2006
1 parent 57f0f66 commit 41ee6dff2ec1941e60acfcae4a4bde8fa6ad3bd6
Showing with 1,840 additions and 1,884 deletions.
  1. +7 −5 include/SDL_config.h
  2. +1 −36 include/SDL_getenv.h
  3. +13 −8 include/SDL_stdlib.h
  4. +26 −47 include/SDL_string.h
  5. +2 −2 src/SDL.c
  6. +12 −12 src/SDL_error.c
  7. +12 −12 src/audio/SDL_audio.c
  8. +8 −8 src/audio/SDL_audiodev.c
  9. +2 −2 src/audio/SDL_audiomem.c
  10. +1 −1 src/audio/SDL_sysaudio.h
  11. +11 −11 src/audio/SDL_wave.c
  12. +1 −1 src/audio/SDL_wave.h
  13. +9 −9 src/audio/alsa/SDL_alsa_audio.c
  14. +10 −10 src/audio/amigaos/SDL_ahiaudio.c
  15. +8 −8 src/audio/arts/SDL_artsaudio.c
  16. +9 −9 src/audio/baudio/SDL_beaudio.cc
  17. +19 −19 src/audio/dart/SDL_dart.c
  18. +8 −8 src/audio/dc/SDL_dcaudio.c
  19. +14 −14 src/audio/disk/SDL_diskaudio.c
  20. +9 −9 src/audio/dma/SDL_dmaaudio.c
  21. +8 −8 src/audio/dmedia/SDL_irixaudio.c
  22. +8 −8 src/audio/dsp/SDL_dspaudio.c
  23. +9 −9 src/audio/esd/SDL_esdaudio.c
  24. +12 −12 src/audio/macosx/SDL_coreaudio.c
  25. +16 −16 src/audio/macrom/SDL_romaudio.c
  26. +4 −4 src/audio/mint/SDL_mintaudio.c
  27. +10 −10 src/audio/mint/SDL_mintaudio_dma8.c
  28. +10 −10 src/audio/mint/SDL_mintaudio_gsxb.c
  29. +10 −10 src/audio/mint/SDL_mintaudio_mcsn.c
  30. +10 −10 src/audio/mint/SDL_mintaudio_stfa.c
  31. +11 −11 src/audio/mint/SDL_mintaudio_xbios.c
  32. +8 −8 src/audio/mme/SDL_mmeaudio.c
  33. +8 −8 src/audio/nas/SDL_nasaudio.c
  34. +12 −12 src/audio/nto/SDL_nto_audio.c
  35. +8 −8 src/audio/openbsd/SDL_openbsdaudio.c
  36. +9 −9 src/audio/paudio/SDL_paudio.c
  37. +10 −10 src/audio/sun/SDL_sunaudio.c
  38. +14 −14 src/audio/ums/SDL_umsaudio.c
  39. +13 −13 src/audio/windib/SDL_dibaudio.c
  40. +17 −17 src/audio/windx5/SDL_dx5audio.c
  41. +4 −4 src/cdrom/SDL_cdrom.c
  42. +1 −1 src/cdrom/SDL_syscdrom.h
  43. +20 −20 src/cdrom/aix/SDL_syscdrom.c
  44. +10 −10 src/cdrom/beos/SDL_syscdrom.cc
  45. +12 −12 src/cdrom/bsdi/SDL_syscdrom.c
  46. +9 −9 src/cdrom/freebsd/SDL_syscdrom.c
  47. +27 −27 src/cdrom/linux/SDL_syscdrom.c
  48. +17 −17 src/cdrom/macos/SDL_syscdrom.c
  49. +5 −5 src/cdrom/macosx/AudioFilePlayer.c
  50. +10 −10 src/cdrom/macosx/AudioFileReaderThread.c
  51. +3 −3 src/cdrom/macosx/SDLOSXCAGuard.c
  52. +9 −9 src/cdrom/openbsd/SDL_syscdrom.c
  53. +8 −8 src/cdrom/os2/SDL_syscdrom.c
  54. +12 −12 src/cdrom/osf/SDL_syscdrom.c
  55. +10 −10 src/cdrom/qnx/SDL_syscdrom.c
  56. +5 −5 src/cdrom/win32/SDL_syscdrom.c
  57. +1 −1 src/events/SDL_active.c
  58. +4 −4 src/events/SDL_events.c
  59. +4 −4 src/events/SDL_keyboard.c
  60. +2 −2 src/events/SDL_mouse.c
  61. +1 −1 src/events/SDL_sysevents.h
  62. +9 −9 src/file/SDL_rwops.c
  63. +20 −20 src/joystick/SDL_joystick.c
  64. +1 −1 src/joystick/SDL_sysjoystick.h
  65. +2 −2 src/joystick/amigaos/SDL_sysjoystick.c
  66. +11 −11 src/joystick/beos/SDL_bejoystick.cc
  67. +15 −15 src/joystick/bsd/SDL_sysjoystick.c
  68. +3 −3 src/joystick/dc/SDL_sysjoystick.c
  69. +26 −26 src/joystick/linux/SDL_sysjoystick.c
  70. +4 −4 src/joystick/macos/SDL_sysjoystick.c
  71. +3 −3 src/joystick/mint/SDL_sysjoystick.c
  72. +4 −4 src/joystick/os2/SDL_sysjoystick.c
  73. +2 −2 src/joystick/riscos/SDL_sysjoystick.c
  74. +10 −10 src/joystick/win32/SDL_mmjoystick.c
  75. +2 −2 src/loadso/macos/SDL_loadso.c
  76. +40 −40 src/loadso/macosx/SDL_loadso.c
  77. +9 −9 src/loadso/windows/SDL_loadso.c
  78. +1 −1 src/main/macos/SDL_main.c
  79. +16 −16 src/main/win32/SDL_win32_main.c
  80. +6 −6 src/stdlib/SDL_getenv.c
  81. +5 −0 src/stdlib/SDL_malloc.c
  82. +11 −11 src/stdlib/SDL_qsort.c
  83. +18 −18 src/stdlib/SDL_string.c
  84. +13 −13 src/thread/SDL_thread.c
  85. +3 −3 src/thread/amigaos/SDL_syssem.c
  86. +12 −12 src/thread/amigaos/SDL_thread.c
  87. +3 −3 src/thread/beos/SDL_syssem.c
  88. +7 −7 src/thread/bsdi/SDL_syssem.c
  89. +2 −2 src/thread/dc/SDL_syscond.c
  90. +2 −2 src/thread/dc/SDL_sysmutex.c
  91. +2 −2 src/thread/generic/SDL_syscond.c
  92. +3 −3 src/thread/generic/SDL_sysmutex.c
  93. +2 −2 src/thread/generic/SDL_syssem.c
  94. +3 −3 src/thread/linux/SDL_syscond.c
  95. +2 −2 src/thread/linux/SDL_sysmutex.c
  96. +7 −7 src/thread/linux/SDL_syssem.c
  97. +3 −3 src/thread/linux/SDL_systhread.c
  98. +2 −2 src/thread/os2/SDL_syscond.c
  99. +3 −3 src/thread/os2/SDL_sysmutex.c
  100. +3 −3 src/thread/os2/SDL_syssem.c
  101. +2 −2 src/thread/os2/SDL_systhread.c
  102. +3 −3 src/thread/pth/SDL_syscond.c
  103. +3 −3 src/thread/pth/SDL_sysmutex.c
  104. +3 −3 src/thread/riscos/SDL_syscond.c
  105. +2 −2 src/thread/riscos/SDL_sysmutex.c
  106. +3 −3 src/thread/riscos/SDL_syssem.c
  107. +3 −3 src/thread/win32/SDL_sysmutex.c
  108. +3 −3 src/thread/win32/SDL_syssem.c
  109. +2 −2 src/thread/win32/SDL_systhread.c
  110. +4 −4 src/timer/SDL_timer.c
  111. +2 −2 src/timer/linux/SDL_systimer.c
  112. +12 −12 src/video/SDL_RLEaccel.c
  113. +1 −1 src/video/SDL_blit_0.c
  114. +2 −2 src/video/SDL_blit_N.c
  115. +3 −3 src/video/SDL_bmp.c
  116. +13 −13 src/video/SDL_cursor.c
  117. +7 −7 src/video/SDL_gamma.c
  118. +19 −19 src/video/SDL_pixels.c
  119. +11 −11 src/video/SDL_surface.c
  120. +37 −37 src/video/SDL_video.c
  121. +3 −3 src/video/SDL_yuv.c
  122. +10 −10 src/video/SDL_yuv_sw.c
  123. +4 −4 src/video/Xext/Xv/Xv.c
  124. +4 −4 src/video/Xext/Xxf86dga/XF86DGA.c
  125. +14 −14 src/video/aalib/SDL_aavideo.c
  126. +4 −4 src/video/ataricommon/SDL_atarievents.c
  127. +4 −4 src/video/ataricommon/SDL_atarigl.c
  128. +4 −4 src/video/ataricommon/SDL_biosevents.c
  129. +4 −4 src/video/ataricommon/SDL_gemdosevents.c
  130. +1 −1 src/video/ataricommon/SDL_ikbdevents.c
  131. +1 −1 src/video/bwindow/SDL_BWin.h
  132. +11 −11 src/video/bwindow/SDL_sysmouse.cc
  133. +15 −15 src/video/bwindow/SDL_sysvideo.cc
  134. +1 −1 src/video/bwindow/SDL_sysyuv.cc
  135. +1 −1 src/video/cybergfx/SDL_amigamouse.c
  136. +4 −4 src/video/cybergfx/SDL_cgxaccel.c
  137. +12 −12 src/video/cybergfx/SDL_cgximage.c
  138. +6 −6 src/video/cybergfx/SDL_cgxmodes.c
  139. +15 −15 src/video/cybergfx/SDL_cgxvideo.c
  140. +11 −11 src/video/cybergfx/SDL_cgxwm.c
  141. +5 −5 src/video/cybergfx/SDL_cgxyuv.c
  142. +1 −1 src/video/dc/SDL_dcevents.c
  143. +8 −8 src/video/dc/SDL_dcvideo.c
  144. +20 −20 src/video/dga/SDL_dgavideo.c
  145. +7 −7 src/video/directfb/SDL_DirectFB_video.c
  146. +14 −14 src/video/dummy/SDL_nullvideo.c
  147. +13 −13 src/video/epoc/SDL_epocvideo.cpp
  148. +10 −10 src/video/fbcon/SDL_fbelo.c
  149. +15 −15 src/video/fbcon/SDL_fbevents.c
  150. +53 −53 src/video/fbcon/SDL_fbvideo.c
  151. +18 −18 src/video/gapi/SDL_gapivideo.c
  152. +5 −5 src/video/gem/SDL_gemevents.c
  153. +5 −5 src/video/gem/SDL_gemmouse.c
  154. +14 −14 src/video/gem/SDL_gemvideo.c
  155. +8 −8 src/video/ggi/SDL_ggivideo.c
  156. +2 −2 src/video/ipod/SDL_ipodvideo.c
  157. +5 −5 src/video/maccommon/SDL_macmouse.c
  158. +1 −1 src/video/maccommon/SDL_macwm.c
  159. +14 −14 src/video/macdsp/SDL_dspvideo.c
  160. +11 −11 src/video/macrom/SDL_romvideo.c
  161. +39 −39 src/video/os2fslib/SDL_os2fslib.c
  162. +1 −1 src/video/photon/SDL_ph_gl.c
  163. +11 −11 src/video/photon/SDL_ph_image.c
  164. +2 −2 src/video/photon/SDL_ph_modes.c
  165. +5 −5 src/video/photon/SDL_ph_mouse.c
  166. +14 −14 src/video/photon/SDL_ph_video.c
  167. +1 −1 src/video/photon/SDL_ph_wm.c
  168. +4 −4 src/video/photon/SDL_phyuv.c
  169. +2 −2 src/video/picogui/SDL_pgevents.c
  170. +7 −7 src/video/picogui/SDL_pgvideo.c
  171. +8 −8 src/video/ps2gs/SDL_gsevents.c
  172. +12 −12 src/video/ps2gs/SDL_gsvideo.c
  173. +8 −8 src/video/ps2gs/SDL_gsyuv.c
  174. +4 −4 src/video/qtopia/SDL_QWin.cc
  175. +2 −2 src/video/qtopia/SDL_sysevents.cc
  176. +11 −11 src/video/qtopia/SDL_sysvideo.cc
  177. +12 −12 src/video/riscos/SDL_riscosFullScreenVideo.c
  178. +1 −1 src/video/riscos/SDL_riscosevents.c
  179. +5 −5 src/video/riscos/SDL_riscosmouse.c
  180. +4 −4 src/video/riscos/SDL_riscossprite.c
  181. +22 −22 src/video/riscos/SDL_riscostask.c
  182. +8 −8 src/video/riscos/SDL_riscosvideo.c
  183. +1 −1 src/video/riscos/SDL_wimppoll.c
  184. +6 −6 src/video/riscos/SDL_wimpvideo.c
  185. +3 −3 src/video/svga/SDL_svgaevents.c
  186. +15 −15 src/video/svga/SDL_svgavideo.c
  187. +2 −2 src/video/vgl/SDL_vglevents.c
  188. +17 −17 src/video/vgl/SDL_vglvideo.c
  189. +3 −3 src/video/wincommon/SDL_lowvideo.h
  190. +7 −7 src/video/wincommon/SDL_sysevents.c
  191. +11 −11 src/video/wincommon/SDL_sysmouse.c
  192. +3 −3 src/video/wincommon/SDL_syswm.c
  193. +6 −6 src/video/wincommon/SDL_wingl.c
  194. +5 −5 src/video/windib/SDL_dibevents.c
  195. +27 −27 src/video/windib/SDL_dibvideo.c
  196. +7 −7 src/video/windx5/SDL_dx5events.c
  197. +46 −46 src/video/windx5/SDL_dx5video.c
  198. +9 −9 src/video/windx5/SDL_dx5yuv.c
  199. +20 −20 src/video/wscons/SDL_wsconsvideo.c
  200. +2 −2 src/video/x11/SDL_x11dga.c
  201. +3 −3 src/video/x11/SDL_x11events.c
  202. +8 −8 src/video/x11/SDL_x11gl.c
  203. +2 −2 src/video/x11/SDL_x11image.c
  204. +17 −17 src/video/x11/SDL_x11modes.c
  205. +13 −13 src/video/x11/SDL_x11mouse.c
  206. +35 −35 src/video/x11/SDL_x11video.c
  207. +1 −1 src/video/x11/SDL_x11video.h
  208. +8 −8 src/video/x11/SDL_x11wm.c
  209. +10 −10 src/video/x11/SDL_x11yuv.c
  210. +21 −21 src/video/xbios/SDL_xbios.c
  211. +2 −2 src/video/xbios/SDL_xbios_centscreen.c
  212. +1 −1 src/video/xbios/SDL_xbios_sb3.c
@@ -54,16 +54,16 @@
#endif /* !_WIN32_WCE */

/* Features provided by SDL_stdlib.h */
#if !defined(_WIN32) /* Don't use C runtime versions of these on Windows */
#define HAVE_GETENV
#define HAVE_PUTENV
#endif
#define HAVE_MALLOC
#define HAVE_REALLOC
#define HAVE_FREE
#ifndef HAVE_ALLOCA
#define HAVE_ALLOCA
#endif
#if !defined(_WIN32) /* Don't use C runtime versions of these on Windows */
#define HAVE_GETENV
#define HAVE_PUTENV
#endif
/*#define HAVE_QSORT*/

/* Features provided by SDL_string.h */
@@ -74,6 +74,8 @@
#define HAVE_STRLEN
#define HAVE_STRCPY
#define HAVE_STRNCPY
#define HAVE_STRCAT
#define HAVE_STRNCAT
/*#define HAVE__STRREV*/
/*#define HAVE__STRUPR*/
/*#define HAVE__STRLWR*/
@@ -94,7 +96,7 @@
/*#define HAVE_STRCASECMP*/
#define HAVE_SSCANF
/*#define HAVE_SNPRINTF*/
#define HAVE_VSNPRINTF
/*#define HAVE_VSNPRINTF*/

#endif /* HAVE_LIBC */

@@ -20,39 +20,4 @@
slouken@libsdl.org
*/

#ifndef _SDL_getenv_h
#define _SDL_getenv_h

#include "SDL_config.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif

#ifdef HAVE_GETENV
#define SDL_getenv getenv
#else
#define getenv SDL_getenv
extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
#endif

#ifdef HAVE_PUTENV
#define SDL_putenv putenv
#else
#define putenv SDL_putenv
extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
#endif

/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include "close_code.h"

#endif /* _SDL_getenv_h */
#include "SDL_stdlib.h"
@@ -49,9 +49,6 @@ char *alloca ();
#endif

#include "SDL_types.h"
#include "SDL_stdarg.h"
#include "SDL_getenv.h"


#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -62,36 +59,44 @@ extern "C" {
#ifdef HAVE_MALLOC
#define SDL_malloc malloc
#else
#define malloc SDL_malloc
extern DECLSPEC void * SDLCALL SDL_malloc(size_t size);
#endif

#ifdef HAVE_REALLOC
#define SDL_realloc realloc
#else
#define realloc SDL_realloc
extern DECLSPEC void * SDLCALL SDL_realloc(void *mem, size_t size);
#endif

#ifdef HAVE_FREE
#define SDL_free free
#else
#define free SDL_free
extern DECLSPEC void SDLCALL SDL_free(void *mem);
#endif

#ifdef HAVE_ALLOCA
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count)
#define SDL_stack_free(data)
#else
#define SDL_stack_alloc(type, count) SDL_malloc(sizeof(type)*count)
#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*count)
#define SDL_stack_free(data) SDL_free(data)
#endif

#ifdef HAVE_GETENV
#define SDL_getenv getenv
#else
extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
#endif

#ifdef HAVE_PUTENV
#define SDL_putenv putenv
#else
extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
#endif

#ifdef HAVE_QSORT
#define SDL_qsort qsort
#else
#define qsort SDL_qsort
extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
int (*compare)(const void *, const void *));
#endif
@@ -44,10 +44,9 @@
extern "C" {
#endif

#ifndef HAVE_MEMSET
#define memset SDL_memset
#endif
#ifndef SDL_memset
#ifdef HAVE_MEMSET
#define SDL_memset memset
#else
extern DECLSPEC void * SDLCALL SDL_memset(void *dst, int c, size_t len);
#endif

@@ -98,23 +97,14 @@ do { \
: "0" ((unsigned)(len)/4), "q" (len), "1" (dst),"2" (src) \
: "memory" ); \
} while(0)
#define SDL_memcpy4(dst, src, len) \
do { \
int ecx, edi, esi; \
__asm__ __volatile__ ( \
"cld\n\t" \
"rep ; movsl" \
: "=&c" (ecx), "=&D" (edi), "=&S" (esi) \
: "0" ((unsigned)(len)), "1" (dst), "2" (src) \
: "memory" ); \
} while(0)
#endif
#ifndef HAVE_MEMCPY
#define memcpy SDL_memcpy
#endif
#ifndef SDL_memcpy
#ifdef HAVE_MEMCPY
#define SDL_memcpy memcpy
#else
extern DECLSPEC void * SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
#endif
#endif

#if defined(__GNUC__) && defined(i386)
#define SDL_memcpy4(dst, src, len) \
@@ -162,9 +152,9 @@ do { \
extern DECLSPEC void * SDLCALL SDL_revcpy(void *dst, const void *src, size_t len);
#endif

#ifndef HAVE_MEMMOVE
#define memmove SDL_memmove
#endif
#ifdef HAVE_MEMMOVE
#define SDL_memmove memmove
#else
#define SDL_memmove(dst, src, len) \
do { \
if ( dst < src ) { \
@@ -173,109 +163,107 @@ do { \
SDL_revcpy(dst, src, len); \
} \
} while(0)

#ifndef HAVE_MEMCMP
#define memcmp SDL_memcmp
#endif
#ifndef SDL_memcmp

#ifdef HAVE_MEMCMP
#define SDL_memcmp memcmp
#else
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
#endif

#ifdef HAVE_STRLEN
#define SDL_strlen strlen
#else
#define strlen SDL_strlen
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string);
#endif

#ifdef HAVE_STRCPY
#define SDL_strcpy strcpy
#else
#define strcpy SDL_strcpy
extern DECLSPEC char * SDLCALL SDL_strcpy(char *dst, const char *src);
#endif

#ifdef HAVE_STRNCPY
#define SDL_strncpy strncpy
#else
#define strncpy SDL_strncpy
extern DECLSPEC char * SDLCALL SDL_strncpy(char *dst, const char *src, size_t maxlen);
#endif

#ifdef HAVE_STRCAT
#define SDL_strcat strcat
#else
#define SDL_strcat(dst, src) (SDL_strcpy(dst+SDL_strlen(dst), src), dst)
#endif

#ifdef HAVE_STRNCAT
#define SDL_strncat strncat
#else
#define SDL_strncat(dst, src, n) (SDL_strncpy(dst+SDL_strlen(dst), src, n), dst)
#endif

#ifdef HAVE__STRREV
#define SDL_strrev _strrev
#else
#define _strrev SDL_strrev
extern DECLSPEC char * SDLCALL SDL_strrev(char *string);
#endif

#ifdef HAVE__STRUPR
#define SDL_strupr _strupr
#else
#define _strupr SDL_strupr
extern DECLSPEC char * SDLCALL SDL_strupr(char *string);
#endif

#ifdef HAVE__STRLWR
#define SDL_strlwr _strlwr
#else
#define _strlwr SDL_strlwr
extern DECLSPEC char * SDLCALL SDL_strlwr(char *string);
#endif

#ifdef HAVE_STRCHR
#define SDL_strchr strchr
#else
#define strchr SDL_strchr
extern DECLSPEC char * SDLCALL SDL_strchr(const char *string, int c);
#endif

#ifdef HAVE_STRRCHR
#define SDL_strrchr strrchr
#else
#define strrchr SDL_strrchr
extern DECLSPEC char * SDLCALL SDL_strrchr(const char *string, int c);
#endif

#ifdef HAVE_STRSTR
#define SDL_strstr strstr
#else
#define strstr SDL_strstr
extern DECLSPEC char * SDLCALL SDL_strstr(const char *haystack, const char *needle);
#endif

#ifdef HAVE_ITOA
#define SDL_itoa itoa
#else
#define itoa SDL_itoa
#define SDL_itoa(value, string, radix) SDL_ltoa((long)value, string, radix)
#endif

#ifdef HAVE__LTOA
#define SDL_ltoa _ltoa
#else
#define _ltoa SDL_ltoa
extern DECLSPEC char * SDLCALL SDL_ltoa(long value, char *string, int radix);
#endif

#ifdef HAVE__UITOA
#define SDL_uitoa _uitoa
#else
#define _uitoa SDL_uitoa
#define SDL_uitoa(value, string, radix) SDL_ultoa((long)value, string, radix)
#endif

#ifdef HAVE__ULTOA
#define SDL_ultoa _ultoa
#else
#define _ultoa SDL_ultoa
extern DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *string, int radix);
#endif

#ifdef HAVE_STRTOL
#define SDL_strtol strtol
#else
#define strtol SDL_strtol
extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, int base);
#endif

@@ -284,21 +272,18 @@ extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, int bas
#ifdef HAVE__I64TOA
#define SDL_lltoa _i64toa
#else
#define _i64toa SDL_lltoa
extern DECLSPEC char* SDLCALL SDL_lltoa(Sint64 value, char *string, int radix);
#endif

#ifdef HAVE__UI64TOA
#define SDL_ulltoa _ui64toa
#else
#define _ui64toa SDL_ulltoa
extern DECLSPEC char* SDLCALL SDL_ulltoa(Uint64 value, char *string, int radix);
#endif

#ifdef HAVE_STRTOLL
#define SDL_strtoll strtoll
#else
#define strtoll SDL_strtoll
extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base);
#endif

@@ -307,14 +292,12 @@ extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int
#ifdef HAVE_STRCMP
#define SDL_strcmp strcmp
#else
#define strcmp SDL_strcmp
extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
#endif

#ifdef HAVE_STRNCMP
#define SDL_strncmp strncmp
#else
#define strncmp SDL_strncmp
extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
#endif

@@ -325,28 +308,24 @@ extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size
#ifdef HAVE_STRCASECMP
#define SDL_strcasecmp strcasecmp
#else
#define strcasecmp SDL_strcasecmp
extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
#endif

#ifdef HAVE_SSCANF
#define SDL_sscanf sscanf
#else
#define sscanf SDL_sscanf
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
#endif

#ifdef HAVE_SNPRINTF
#define SDL_snprintf snprintf
#else
#define snprintf SDL_snprintf
extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
#endif

#ifdef HAVE_VSNPRINTF
#define SDL_vsnprintf vsnprintf
#else
#define vsnprintf SDL_vsnprintf
extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
#endif

0 comments on commit 41ee6df

Please sign in to comment.