Started the process of improving configure support, and merging C types
authorSam Lantinga <slouken@libsdl.org>
Thu, 09 Feb 2006 09:07:13 +0000
changeset 13537ba544e2888d
parent 1352 c643342f3f33
child 1354 22f39393668a
Started the process of improving configure support, and merging C types
and library support into a single header.
configure.in
include/SDL.h
include/SDL_active.h
include/SDL_audio.h
include/SDL_byteorder.h
include/SDL_cdrom.h
include/SDL_config.h
include/SDL_config.h.in
include/SDL_config.h.minimal
include/SDL_cpuinfo.h
include/SDL_ctype.h
include/SDL_endian.h
include/SDL_getenv.h
include/SDL_stdlib.h
include/SDL_string.h
include/SDL_types.h
     1.1 --- a/configure.in	Thu Feb 09 05:46:55 2006 +0000
     1.2 +++ b/configure.in	Thu Feb 09 09:07:13 2006 +0000
     1.3 @@ -1,6 +1,7 @@
     1.4  dnl Process this file with autoconf to produce a configure script.
     1.5  AC_INIT(README)
     1.6  AC_CONFIG_HEADER(include/SDL_config.h)
     1.7 +AC_GNU_SOURCE
     1.8  
     1.9  dnl Set various version strings - taken gratefully from the GTk sources
    1.10  #
    1.11 @@ -53,11 +54,8 @@
    1.12  AM_PROG_LIBTOOL
    1.13  AC_PROG_MAKE_SET
    1.14  AC_PROG_CC
    1.15 -AC_C_INLINE
    1.16 -AC_C_CONST
    1.17  AC_PROG_CXX
    1.18  AC_PROG_INSTALL
    1.19 -AC_FUNC_ALLOCA
    1.20  ASFLAGS=""
    1.21  AC_SUBST(ASFLAGS)
    1.22  CCAS="$CC"
    1.23 @@ -122,34 +120,76 @@
    1.24  [  --enable-libc           Use the system C library [default=yes]],
    1.25                , AC_DEFINE([HAVE_LIBC]))
    1.26  
    1.27 -dnl Checks for header files.
    1.28 -AC_CHECK_HEADERS(alloca.h stdint.h stdlib.h stdarg.h malloc.h)
    1.29 -AC_CHECK_HEADERS(ctype.h)
    1.30 -AC_CHECK_HEADERS(string.h)
    1.31 -AC_CHECK_HEADERS(stdio.h)
    1.32 -AC_CHECK_HEADERS(signal.h)
    1.33 -
    1.34 -dnl Checks for typedefs, structures, and compiler characteristics.
    1.35 +dnl Check for compiler characteristics
    1.36  AC_C_CONST
    1.37  AC_C_INLINE
    1.38 +AC_C_VOLATILE
    1.39 +
    1.40 +dnl Check for header files
    1.41 +AC_HEADER_STDC
    1.42 +AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h stdint.h ctype.h signal.h)
    1.43 +
    1.44 +dnl Check for typedefs, structures, etc.
    1.45  AC_TYPE_SIZE_T
    1.46 -AC_CHECK_SIZEOF(char, 1)
    1.47 -AC_CHECK_SIZEOF(short, 2)
    1.48 -AC_CHECK_SIZEOF(int, 4)
    1.49 -AC_CHECK_SIZEOF(long, 4)
    1.50 -AC_CHECK_SIZEOF(long long, 8)
    1.51 +if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
    1.52 +    AC_CHECK_TYPE(int64_t)
    1.53 +    if test x$ac_cv_type_int64_t = xyes; then
    1.54 +        AC_DEFINE(SDL_HAS_64BIT_TYPE)
    1.55 +    fi
    1.56 +else
    1.57 +    AC_CHECK_SIZEOF(char, 1)
    1.58 +    AC_CHECK_SIZEOF(short, 2)
    1.59 +    AC_CHECK_SIZEOF(int, 4)
    1.60 +    AC_CHECK_SIZEOF(long, 4)
    1.61 +    AC_CHECK_SIZEOF(long long, 8)
    1.62 +    if test x$ac_cv_sizeof_char = x1; then
    1.63 +        AC_DEFINE(int8_t, signed char)
    1.64 +        AC_DEFINE(uint8_t, unsigned char)
    1.65 +    fi
    1.66 +    if test x$ac_cv_sizeof_short = x2; then
    1.67 +        AC_DEFINE(int16_t, signed short)
    1.68 +        AC_DEFINE(uint16_t, unsigned short)
    1.69 +    else
    1.70 +        if test x$ac_cv_sizeof_int = x2; then
    1.71 +            AC_DEFINE(int16_t, signed int)
    1.72 +            AC_DEFINE(uint16_t, unsigned int)
    1.73 +        fi
    1.74 +    fi
    1.75 +    if test x$ac_cv_sizeof_int = x4; then
    1.76 +        AC_DEFINE(int32_t, signed int)
    1.77 +        AC_DEFINE(uint32_t, unsigned int)
    1.78 +    else
    1.79 +        if test x$ac_cv_sizeof_long = x4; then
    1.80 +            AC_DEFINE(int32_t, signed long)
    1.81 +            AC_DEFINE(uint32_t, unsigned long)
    1.82 +        fi
    1.83 +    fi
    1.84 +    if test x$ac_cv_sizeof_long = x8; then
    1.85 +        AC_DEFINE(int64_t, signed long)
    1.86 +        AC_DEFINE(uint64_t, unsigned long)
    1.87 +        AC_DEFINE(SDL_HAS_64BIT_TYPE)
    1.88 +    else
    1.89 +        if test x$ac_cv_sizeof_long_long = x8; then
    1.90 +            AC_DEFINE(int64_t, signed long long)
    1.91 +            AC_DEFINE(uint64_t, unsigned long long)
    1.92 +            AC_DEFINE(SDL_HAS_64BIT_TYPE)
    1.93 +        fi
    1.94 +    fi
    1.95 +    AC_CHECK_TYPE(uintptr_t, unsigned long)
    1.96 +fi
    1.97  
    1.98  dnl Checks for library functions.
    1.99  AC_FUNC_ALLOCA
   1.100 -AC_CHECK_FUNCS(malloc calloc realloc free)
   1.101 -AC_CHECK_FUNCS(getenv putenv unsetenv qsort abs)
   1.102 -AC_CHECK_FUNCS(memset memcpy memmove memcmp)
   1.103 -AC_CHECK_FUNCS(strlen strcpy strncpy strcat strncat strdup)
   1.104 -AC_CHECK_FUNCS(_strrev _strupr _strlwr)
   1.105 -AC_CHECK_FUNCS(strchr strrchr strstr)
   1.106 -AC_CHECK_FUNCS(itoa _ltoa _uitoa _ultoa strtol _i64toa _ui64toa strtoll strtod atoi atof)
   1.107 -AC_CHECK_FUNCS(strcmp strncmp stricmp strcasecmp)
   1.108 -AC_CHECK_FUNCS(sscanf snprintf vsnprintf)
   1.109 +AC_FUNC_MEMCMP
   1.110 +if test x$ac_cv_func_memcmp_working = xyes; then
   1.111 +    AC_DEFINE(HAVE_MEMCMP)
   1.112 +fi
   1.113 +AC_FUNC_STRTOD
   1.114 +if test x$ac_cv_func_strtod = xyes; then
   1.115 +    AC_DEFINE(HAVE_STRTOD)
   1.116 +fi
   1.117 +AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strcpy strncpy strcat strncat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol _i64toa _ui64toa strtoll atoi atof strcmp strncmp stricmp strcasecmp sscanf snprintf vsnprint)
   1.118 +
   1.119  
   1.120  dnl Initialize the compiler and linker flags for SDL applications
   1.121  
     2.1 --- a/include/SDL.h	Thu Feb 09 05:46:55 2006 +0000
     2.2 +++ b/include/SDL.h	Thu Feb 09 09:07:13 2006 +0000
     2.3 @@ -25,10 +25,8 @@
     2.4  #ifndef _SDL_H
     2.5  #define _SDL_H
     2.6  
     2.7 -#include "SDL_config.h"
     2.8 +#include "SDL_stdinc.h"
     2.9  #include "SDL_main.h"
    2.10 -#include "SDL_types.h"
    2.11 -#include "SDL_getenv.h"
    2.12  #include "SDL_error.h"
    2.13  #include "SDL_rwops.h"
    2.14  #include "SDL_timer.h"
    2.15 @@ -37,9 +35,9 @@
    2.16  #include "SDL_joystick.h"
    2.17  #include "SDL_events.h"
    2.18  #include "SDL_video.h"
    2.19 +#include "SDL_loadso.h"
    2.20  #include "SDL_byteorder.h"
    2.21  #include "SDL_version.h"
    2.22 -#include "SDL_loadso.h"
    2.23  
    2.24  #include "begin_code.h"
    2.25  /* Set up for C function definitions, even when using C++ */
     3.1 --- a/include/SDL_active.h	Thu Feb 09 05:46:55 2006 +0000
     3.2 +++ b/include/SDL_active.h	Thu Feb 09 09:07:13 2006 +0000
     3.3 @@ -25,6 +25,9 @@
     3.4  #ifndef _SDL_active_h
     3.5  #define _SDL_active_h
     3.6  
     3.7 +#include "SDL_stdinc.h"
     3.8 +
     3.9 +#ifndef DISABLE_EVENTS
    3.10  #include "begin_code.h"
    3.11  /* Set up for C function definitions, even when using C++ */
    3.12  #ifdef __cplusplus
    3.13 @@ -51,5 +54,6 @@
    3.14  }
    3.15  #endif
    3.16  #include "close_code.h"
    3.17 +#endif /* !DISABLE_EVENTS */
    3.18  
    3.19  #endif /* _SDL_active_h */
     4.1 --- a/include/SDL_audio.h	Thu Feb 09 05:46:55 2006 +0000
     4.2 +++ b/include/SDL_audio.h	Thu Feb 09 09:07:13 2006 +0000
     4.3 @@ -25,12 +25,13 @@
     4.4  #ifndef _SDL_audio_h
     4.5  #define _SDL_audio_h
     4.6  
     4.7 +#include "SDL_stdinc.h"
     4.8  #include "SDL_main.h"
     4.9 -#include "SDL_types.h"
    4.10  #include "SDL_error.h"
    4.11  #include "SDL_rwops.h"
    4.12  #include "SDL_byteorder.h"
    4.13  
    4.14 +#ifndef DISABLE_AUDIO
    4.15  #include "begin_code.h"
    4.16  /* Set up for C function definitions, even when using C++ */
    4.17  #ifdef __cplusplus
    4.18 @@ -248,5 +249,6 @@
    4.19  }
    4.20  #endif
    4.21  #include "close_code.h"
    4.22 +#endif /* !DISABLE_AUDIO */
    4.23  
    4.24  #endif /* _SDL_audio_h */
     5.1 --- a/include/SDL_byteorder.h	Thu Feb 09 05:46:55 2006 +0000
     5.2 +++ b/include/SDL_byteorder.h	Thu Feb 09 09:07:13 2006 +0000
     5.3 @@ -25,38 +25,24 @@
     5.4  #ifndef _SDL_byteorder_h
     5.5  #define _SDL_byteorder_h
     5.6  
     5.7 +#include "SDL_config.h"
     5.8 +
     5.9  /* The two types of endianness */
    5.10  #define SDL_LIL_ENDIAN	1234
    5.11  #define SDL_BIG_ENDIAN	4321
    5.12  
    5.13 -#ifdef __linux__
    5.14 -# include <endian.h>
    5.15 -# if BYTE_ORDER == LITTLE_ENDIAN
    5.16 -#  define SDL_BYTEORDER SDL_LIL_ENDIAN
    5.17 -# else
    5.18 -#  define SDL_BYTEORDER SDL_BIG_ENDIAN
    5.19 -# endif
    5.20 -
    5.21 -#else
    5.22 -
    5.23 -/* Pardon the mess, I'm trying to determine the endianness of this host.
    5.24 -   I'm doing it by preprocessor defines rather than some sort of configure
    5.25 -   script so that application code can use this too.  The "right" way would
    5.26 -   be to dynamically generate this file on install, but that's a lot of work.
    5.27 - */
    5.28 +#ifndef SDL_BYTEORDER	/* Not defined in SDL_config.h? */
    5.29  #if (defined(__i386__) || defined(__i386)) || \
    5.30 -     defined(__ia64__) || defined(WIN32) || \
    5.31 +     defined(__ia64__) || defined(__x86_64__) || \
    5.32      (defined(__alpha__) || defined(__alpha)) || \
    5.33      (defined(__arm__) || defined(__thumb__)) || \
    5.34      (defined(__sh__) || defined(__sh64__)) || \
    5.35      (defined(__mips__) && defined(__MIPSEL__)) || \
    5.36 -     defined(__SYMBIAN32__) || defined(__x86_64__) || \
    5.37 -     defined(__OS2__) || defined(__LITTLE_ENDIAN__)
    5.38 +     defined(__SYMBIAN32__) || defined(__OS2__)
    5.39  #define SDL_BYTEORDER	SDL_LIL_ENDIAN
    5.40  #else
    5.41  #define SDL_BYTEORDER	SDL_BIG_ENDIAN
    5.42  #endif
    5.43 -
    5.44 -#endif /* __linux__ */
    5.45 +#endif /* !SDL_BYTEORDER */
    5.46  
    5.47  #endif /* _SDL_byteorder_h */
     6.1 --- a/include/SDL_cdrom.h	Thu Feb 09 05:46:55 2006 +0000
     6.2 +++ b/include/SDL_cdrom.h	Thu Feb 09 09:07:13 2006 +0000
     6.3 @@ -25,8 +25,9 @@
     6.4  #ifndef _SDL_cdrom_h
     6.5  #define _SDL_cdrom_h
     6.6  
     6.7 -#include "SDL_types.h"
     6.8 +#include "SDL_stdinc.h"
     6.9  
    6.10 +#ifndef DISABLE_CDROM
    6.11  #include "begin_code.h"
    6.12  /* Set up for C function definitions, even when using C++ */
    6.13  #ifdef __cplusplus
    6.14 @@ -166,5 +167,6 @@
    6.15  }
    6.16  #endif
    6.17  #include "close_code.h"
    6.18 +#endif /* !DISABLE_CDROM */
    6.19  
    6.20  #endif /* _SDL_video_h */
     7.1 --- a/include/SDL_config.h	Thu Feb 09 05:46:55 2006 +0000
     7.2 +++ b/include/SDL_config.h	Thu Feb 09 09:07:13 2006 +0000
     7.3 @@ -25,6 +25,15 @@
     7.4  
     7.5  /* This is the minimal configuration that can be used to build SDL */
     7.6  
     7.7 -#define HAVE_STDARG_H 1
     7.8 +#include <stdarg.h>
     7.9 +
    7.10 +typedef signed char int8_t;
    7.11 +typedef unsigned char uint8_t;
    7.12 +typedef signed short int16_t;
    7.13 +typedef unsigned short uint16_t;
    7.14 +typedef signed int int32_t;
    7.15 +typedef unsigned int uint32_t;
    7.16 +typedef unsigned int size_t;
    7.17 +typedef unsigned long uintptr_t;
    7.18  
    7.19  #endif /* _SDL_config_h */
     8.1 --- a/include/SDL_config.h.in	Thu Feb 09 05:46:55 2006 +0000
     8.2 +++ b/include/SDL_config.h.in	Thu Feb 09 09:07:13 2006 +0000
     8.3 @@ -25,23 +25,44 @@
     8.4  
     8.5  /* This is a set of defines to configure the SDL features */
     8.6  
     8.7 -#undef HAVE_STDARG_H
     8.8 +/* C language features */
     8.9 +#undef const
    8.10 +#undef inline
    8.11 +#undef volatile
    8.12  
    8.13 -/* Comment this if you want to build without any libc requirements */
    8.14 +/* C datatypes */
    8.15 +#undef size_t
    8.16 +#undef int8_t
    8.17 +#undef uint8_t
    8.18 +#undef int16_t
    8.19 +#undef uint16_t
    8.20 +#undef int32_t
    8.21 +#undef uint32_t
    8.22 +#undef SDL_HAS_64BIT_TYPE
    8.23 +#undef int64_t
    8.24 +#undef uint64_t
    8.25 +#undef uintptr_t
    8.26 +
    8.27 +/* Comment this if you want to build without any C library requirements */
    8.28  #undef HAVE_LIBC
    8.29  #ifdef HAVE_LIBC
    8.30  
    8.31 -/* Various C library headers */
    8.32 +/* Useful headers */
    8.33 +#undef HAVE_SYS_TYPES_H
    8.34  #undef HAVE_STDIO_H
    8.35 +#undef STDC_HEADERS
    8.36  #undef HAVE_STDLIB_H
    8.37 +#undef HAVE_STDARG_H
    8.38  #undef HAVE_MALLOC_H
    8.39 +#undef HAVE_MEMORY_H
    8.40  #undef HAVE_STRING_H
    8.41 +#undef HAVE_STRINGS_H
    8.42 +#undef HAVE_INTTYPES_H
    8.43 +#undef HAVE_STDINT_H
    8.44  #undef HAVE_CTYPE_H
    8.45 -#ifndef _WIN32_WCE
    8.46  #undef HAVE_SIGNAL_H
    8.47 -#endif /* !_WIN32_WCE */
    8.48  
    8.49 -/* Features provided by SDL_stdlib.h */
    8.50 +/* C library functions */
    8.51  #undef HAVE_MALLOC
    8.52  #undef HAVE_CALLOC
    8.53  #undef HAVE_REALLOC
    8.54 @@ -54,8 +75,7 @@
    8.55  #endif
    8.56  #undef HAVE_QSORT
    8.57  #undef HAVE_ABS
    8.58 -
    8.59 -/* Features provided by SDL_string.h */
    8.60 +#undef HAVE_BCOPY
    8.61  #undef HAVE_MEMSET
    8.62  #undef HAVE_MEMCPY
    8.63  #undef HAVE_MEMMOVE
    8.64 @@ -69,6 +89,8 @@
    8.65  #undef HAVE__STRREV
    8.66  #undef HAVE__STRUPR
    8.67  #undef HAVE__STRLWR
    8.68 +#undef HAVE_INDEX
    8.69 +#undef HAVE_RINDEX
    8.70  #undef HAVE_STRCHR
    8.71  #undef HAVE_STRRCHR
    8.72  #undef HAVE_STRSTR
    8.73 @@ -93,4 +115,17 @@
    8.74  
    8.75  #endif /* HAVE_LIBC */
    8.76  
    8.77 +
    8.78 +/* Allow disabling of core subsystems */
    8.79 +#undef DISABLE_AUDIO
    8.80 +#undef DISABLE_VIDEO
    8.81 +#undef DISABLE_EVENTS
    8.82 +#undef DISABLE_JOYSTICK
    8.83 +#undef DISABLE_CDROM
    8.84 +#undef DISABLE_THREADS
    8.85 +#undef DISABLE_TIMERS
    8.86 +#undef DISABLE_ENDIAN
    8.87 +#undef DISABLE_FILE
    8.88 +#undef DISABLE_CPUINFO
    8.89 +
    8.90  #endif /* _SDL_config_h */
     9.1 --- a/include/SDL_config.h.minimal	Thu Feb 09 05:46:55 2006 +0000
     9.2 +++ b/include/SDL_config.h.minimal	Thu Feb 09 09:07:13 2006 +0000
     9.3 @@ -25,6 +25,15 @@
     9.4  
     9.5  /* This is the minimal configuration that can be used to build SDL */
     9.6  
     9.7 -#define HAVE_STDARG_H 1
     9.8 +#include <stdarg.h>
     9.9 +
    9.10 +typedef signed char int8_t;
    9.11 +typedef unsigned char uint8_t;
    9.12 +typedef signed short int16_t;
    9.13 +typedef unsigned short uint16_t;
    9.14 +typedef signed int int32_t;
    9.15 +typedef unsigned int uint32_t;
    9.16 +typedef unsigned int size_t;
    9.17 +typedef unsigned long uintptr_t;
    9.18  
    9.19  #endif /* _SDL_config_h */
    10.1 --- a/include/SDL_cpuinfo.h	Thu Feb 09 05:46:55 2006 +0000
    10.2 +++ b/include/SDL_cpuinfo.h	Thu Feb 09 09:07:13 2006 +0000
    10.3 @@ -23,9 +23,12 @@
    10.4  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    10.5  /* CPU feature detection for SDL                                       */
    10.6  
    10.7 +#include "SDL_stdinc.h"
    10.8 +
    10.9  #ifndef _SDL_cpuinfo_h
   10.10  #define _SDL_cpuinfo_h
   10.11  
   10.12 +#ifndef DISABLE_CPUINFO
   10.13  #include "begin_code.h"
   10.14  /* Set up for C function definitions, even when using C++ */
   10.15  #ifdef __cplusplus
   10.16 @@ -69,5 +72,6 @@
   10.17  }
   10.18  #endif
   10.19  #include "close_code.h"
   10.20 +#endif /* !DISABLE_CPUINFO */
   10.21  
   10.22  #endif /* _SDL_cpuinfo_h */
    11.1 --- a/include/SDL_ctype.h	Thu Feb 09 05:46:55 2006 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,39 +0,0 @@
    11.4 -/*
    11.5 -    SDL - Simple DirectMedia Layer
    11.6 -    Copyright (C) 1997-2006 Sam Lantinga
    11.7 -
    11.8 -    This library is free software; you can redistribute it and/or
    11.9 -    modify it under the terms of the GNU Lesser General Public
   11.10 -    License as published by the Free Software Foundation; either
   11.11 -    version 2.1 of the License, or (at your option) any later version.
   11.12 -
   11.13 -    This library is distributed in the hope that it will be useful,
   11.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   11.16 -    Lesser General Public License for more details.
   11.17 -
   11.18 -    You should have received a copy of the GNU Lesser General Public
   11.19 -    License along with this library; if not, write to the Free Software
   11.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   11.21 -
   11.22 -    Sam Lantinga
   11.23 -    slouken@libsdl.org
   11.24 -*/
   11.25 -
   11.26 -/* This file contains portable character manipulation functions for SDL */
   11.27 -
   11.28 -#ifndef _SDL_CTYPE_H_
   11.29 -#define _SDL_CTYPE_H_
   11.30 -
   11.31 -#include "SDL_config.h"
   11.32 -
   11.33 -#ifdef HAVE_CTYPE_H
   11.34 -#include <ctype.h>
   11.35 -#else
   11.36 -#define isdigit(X)  (((X) >= '0') && ((X) <= '9'))
   11.37 -#define isspace(X)  (((X) == ' ') || ((X) == '\t') || ((X) == '\r') || ((X) == '\n'))
   11.38 -#define toupper(X)  (((X) >= 'a') && ((X) <= 'z') ? ('A'+((X)-'a')) : (X))
   11.39 -#define tolower(X)  (((X) >= 'A') && ((X) <= 'Z') ? ('a'+((X)-'A')) : (X))
   11.40 -#endif
   11.41 -
   11.42 -#endif /* _SDL_CTYPE_H_ */
    12.1 --- a/include/SDL_endian.h	Thu Feb 09 05:46:55 2006 +0000
    12.2 +++ b/include/SDL_endian.h	Thu Feb 09 09:07:13 2006 +0000
    12.3 @@ -38,6 +38,7 @@
    12.4  */
    12.5  
    12.6  #include "SDL_types.h"
    12.7 +//#warning FIXME: move rwops into rwops and swapping into byteorder.h
    12.8  #include "SDL_rwops.h"
    12.9  #include "SDL_byteorder.h"
   12.10  
    13.1 --- a/include/SDL_getenv.h	Thu Feb 09 05:46:55 2006 +0000
    13.2 +++ b/include/SDL_getenv.h	Thu Feb 09 09:07:13 2006 +0000
    13.3 @@ -20,4 +20,4 @@
    13.4      slouken@libsdl.org
    13.5  */
    13.6  
    13.7 -#include "SDL_stdlib.h"
    13.8 +#include "SDL_stdinc.h"
    14.1 --- a/include/SDL_stdlib.h	Thu Feb 09 05:46:55 2006 +0000
    14.2 +++ b/include/SDL_stdlib.h	Thu Feb 09 09:07:13 2006 +0000
    14.3 @@ -20,103 +20,4 @@
    14.4      slouken@libsdl.org
    14.5  */
    14.6  
    14.7 -#ifndef _SDL_stdlib_h
    14.8 -#define _SDL_stdlib_h
    14.9 -
   14.10 -#include "SDL_config.h"
   14.11 -
   14.12 -/* AIX requires this to be the first thing in the file.  */
   14.13 -#ifndef __GNUC__
   14.14 -# if HAVE_ALLOCA_H
   14.15 -#  include <alloca.h>
   14.16 -# else
   14.17 -#  ifdef _AIX
   14.18 - #pragma alloca
   14.19 -#  else
   14.20 -#   ifndef alloca /* predefined by HP cc +Olibcalls */
   14.21 -char *alloca ();
   14.22 -#   endif
   14.23 -#  endif
   14.24 -# endif
   14.25 -#endif
   14.26 -
   14.27 -#ifdef HAVE_STDLIB_H
   14.28 -#include <stdlib.h>
   14.29 -#endif
   14.30 -
   14.31 -#ifdef HAVE_MALLOC_H
   14.32 -#include <malloc.h>
   14.33 -#endif
   14.34 -
   14.35 -#include "SDL_types.h"
   14.36 -
   14.37 -#include "begin_code.h"
   14.38 -/* Set up for C function definitions, even when using C++ */
   14.39 -#ifdef __cplusplus
   14.40 -extern "C" {
   14.41 -#endif
   14.42 -
   14.43 -#ifdef HAVE_MALLOC
   14.44 -#define SDL_malloc	malloc
   14.45 -#else
   14.46 -extern DECLSPEC void * SDLCALL SDL_malloc(size_t size);
   14.47 -#endif
   14.48 -
   14.49 -#ifdef HAVE_CALLOC
   14.50 -#define SDL_calloc	calloc
   14.51 -#else
   14.52 -extern DECLSPEC void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
   14.53 -#endif
   14.54 -
   14.55 -#ifdef HAVE_REALLOC
   14.56 -#define SDL_realloc	realloc
   14.57 -#else
   14.58 -extern DECLSPEC void * SDLCALL SDL_realloc(void *mem, size_t size);
   14.59 -#endif
   14.60 -
   14.61 -#ifdef HAVE_FREE
   14.62 -#define SDL_free	free
   14.63 -#else
   14.64 -extern DECLSPEC void SDLCALL SDL_free(void *mem);
   14.65 -#endif
   14.66 -
   14.67 -#ifdef HAVE_ALLOCA
   14.68 -#define SDL_stack_alloc(type, count)    (type*)alloca(sizeof(type)*count)
   14.69 -#define SDL_stack_free(data)
   14.70 -#else
   14.71 -#define SDL_stack_alloc(type, count)    (type*)SDL_malloc(sizeof(type)*count)
   14.72 -#define SDL_stack_free(data)            SDL_free(data)
   14.73 -#endif
   14.74 -
   14.75 -#ifdef HAVE_GETENV
   14.76 -#define SDL_getenv	getenv
   14.77 -#else
   14.78 -extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
   14.79 -#endif
   14.80 -
   14.81 -#ifdef HAVE_PUTENV
   14.82 -#define SDL_putenv	putenv
   14.83 -#else
   14.84 -extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
   14.85 -#endif
   14.86 -
   14.87 -#ifdef HAVE_QSORT
   14.88 -#define SDL_qsort	qsort
   14.89 -#else
   14.90 -extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
   14.91 -           int (*compare)(const void *, const void *));
   14.92 -#endif
   14.93 -
   14.94 -#ifdef HAVE_ABS
   14.95 -#define SDL_abs		abs
   14.96 -#else
   14.97 -#define SDL_abs(X)	((X) < 0 ? -(X) : (X))
   14.98 -#endif
   14.99 -
  14.100 -/* Ends C function definitions when using C++ */
  14.101 -#ifdef __cplusplus
  14.102 -}
  14.103 -#endif
  14.104 -#include "close_code.h"
  14.105 -
  14.106 -#endif /* _SDL_stdlib_h */
  14.107 +#include "SDL_stdinc.h"
    15.1 --- a/include/SDL_string.h	Thu Feb 09 05:46:55 2006 +0000
    15.2 +++ b/include/SDL_string.h	Thu Feb 09 09:07:13 2006 +0000
    15.3 @@ -20,343 +20,4 @@
    15.4      slouken@libsdl.org
    15.5  */
    15.6  
    15.7 -/* This file contains portable string manipulation functions for SDL */
    15.8 -
    15.9 -#ifndef _SDL_string_h
   15.10 -#define _SDL_string_h
   15.11 -
   15.12 -#include "SDL_config.h"
   15.13 -
   15.14 -#ifdef HAVE_STDIO_H
   15.15 -#include <stdio.h>	/* For snprintf() and friends */
   15.16 -#endif
   15.17 -
   15.18 -#ifdef HAVE_STRING_H
   15.19 -#include <string.h>
   15.20 -#endif
   15.21 -
   15.22 -#include "SDL_types.h"
   15.23 -#include "SDL_stdarg.h"
   15.24 -
   15.25 -#include "begin_code.h"
   15.26 -/* Set up for C function definitions, even when using C++ */
   15.27 -#ifdef __cplusplus
   15.28 -extern "C" {
   15.29 -#endif
   15.30 -
   15.31 -#ifdef HAVE_MEMSET
   15.32 -#define SDL_memset      memset
   15.33 -#else
   15.34 -extern DECLSPEC void * SDLCALL SDL_memset(void *dst, int c, size_t len);
   15.35 -#endif
   15.36 -
   15.37 -#if defined(__GNUC__) && defined(i386)
   15.38 -#define SDL_memset4(dst, val, len)				\
   15.39 -do {								\
   15.40 -	int u0, u1, u2;						\
   15.41 -	__asm__ __volatile__ (					\
   15.42 -		"cld\n\t"					\
   15.43 -		"rep ; stosl\n\t"				\
   15.44 -		: "=&D" (u0), "=&a" (u1), "=&c" (u2)		\
   15.45 -		: "0" (dst), "1" (val), "2" ((Uint32)(len))	\
   15.46 -		: "memory" );					\
   15.47 -} while(0)
   15.48 -#endif
   15.49 -#ifndef SDL_memset4
   15.50 -#define SDL_memset4(dst, val, len)		\
   15.51 -do {						\
   15.52 -	unsigned _count = (len);		\
   15.53 -	unsigned _n = (_count + 3) / 4;		\
   15.54 -	Uint32 *_p = (Uint32 *)(dst);		\
   15.55 -	Uint32 _val = (val);			\
   15.56 -        switch (_count % 4) {			\
   15.57 -        case 0: do {    *_p++ = _val;		\
   15.58 -        case 3:         *_p++ = _val;		\
   15.59 -        case 2:         *_p++ = _val;		\
   15.60 -        case 1:         *_p++ = _val;		\
   15.61 -		} while ( --_n );		\
   15.62 -	}					\
   15.63 -} while(0)
   15.64 -#endif
   15.65 -
   15.66 -#if defined(__GNUC__) && defined(i386)
   15.67 -#define SDL_memcpy(dst, src, len)					  \
   15.68 -do {									  \
   15.69 -	int u0, u1, u2;						  	  \
   15.70 -	__asm__ __volatile__ (						  \
   15.71 -		"cld\n\t"						  \
   15.72 -		"rep ; movsl\n\t"					  \
   15.73 -		"testb $2,%b4\n\t"					  \
   15.74 -		"je 1f\n\t"						  \
   15.75 -		"movsw\n"						  \
   15.76 -		"1:\ttestb $1,%b4\n\t"					  \
   15.77 -		"je 2f\n\t"						  \
   15.78 -		"movsb\n"						  \
   15.79 -		"2:"							  \
   15.80 -		: "=&c" (u0), "=&D" (u1), "=&S" (u2)			  \
   15.81 -		: "0" ((unsigned)(len)/4), "q" (len), "1" (dst),"2" (src) \
   15.82 -		: "memory" );						  \
   15.83 -} while(0)
   15.84 -#endif
   15.85 -#ifndef SDL_memcpy
   15.86 -#ifdef HAVE_MEMCPY
   15.87 -#define SDL_memcpy      memcpy
   15.88 -#else
   15.89 -extern DECLSPEC void * SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
   15.90 -#endif
   15.91 -#endif
   15.92 -
   15.93 -#if defined(__GNUC__) && defined(i386)
   15.94 -#define SDL_memcpy4(dst, src, len)				\
   15.95 -do {								\
   15.96 -	int ecx, edi, esi;					\
   15.97 -	__asm__ __volatile__ (					\
   15.98 -		"cld\n\t"					\
   15.99 -		"rep ; movsl"					\
  15.100 -		: "=&c" (ecx), "=&D" (edi), "=&S" (esi)		\
  15.101 -		: "0" ((unsigned)(len)), "1" (dst), "2" (src)	\
  15.102 -		: "memory" );					\
  15.103 -} while(0)
  15.104 -#endif
  15.105 -#ifndef SDL_memcpy4
  15.106 -#define SDL_memcpy4(dst, src, len)	SDL_memcpy(dst, src, (len) << 2)
  15.107 -#endif
  15.108 -
  15.109 -#if defined(__GNUC__) && defined(i386)
  15.110 -#define SDL_revcpy(dst, src, len)			\
  15.111 -do {							\
  15.112 -	int u0, u1, u2;					\
  15.113 -	char *dstp = (char *)(dst);			\
  15.114 -	char *srcp = (char *)(src);			\
  15.115 -	int n = (len);					\
  15.116 -	if ( n >= 4 ) {					\
  15.117 -	__asm__ __volatile__ (				\
  15.118 -		"std\n\t"				\
  15.119 -		"rep ; movsl\n\t"			\
  15.120 -		: "=&c" (u0), "=&D" (u1), "=&S" (u2)	\
  15.121 -		: "0" (n >> 2),				\
  15.122 -		  "1" (dstp+(n-4)), "2" (srcp+(n-4))	\
  15.123 -		: "memory" );				\
  15.124 -	}						\
  15.125 -	switch (n & 3) {				\
  15.126 -		case 3: dstp[2] = srcp[2];		\
  15.127 -		case 2: dstp[1] = srcp[1];		\
  15.128 -		case 1: dstp[0] = srcp[0];		\
  15.129 -			break;				\
  15.130 -		default:				\
  15.131 -			break;				\
  15.132 -	}						\
  15.133 -} while(0)
  15.134 -#endif
  15.135 -#ifndef SDL_revcpy
  15.136 -extern DECLSPEC void * SDLCALL SDL_revcpy(void *dst, const void *src, size_t len);
  15.137 -#endif
  15.138 -
  15.139 -#ifdef HAVE_MEMMOVE
  15.140 -#define SDL_memmove     memmove
  15.141 -#else
  15.142 -#define SDL_memmove(dst, src, len)			\
  15.143 -do {							\
  15.144 -	if ( dst < src ) {				\
  15.145 -		SDL_memcpy(dst, src, len);		\
  15.146 -	} else {					\
  15.147 -		SDL_revcpy(dst, src, len);		\
  15.148 -	}						\
  15.149 -} while(0)
  15.150 -#endif
  15.151 -
  15.152 -#ifdef HAVE_MEMCMP
  15.153 -#define SDL_memcmp      memcmp
  15.154 -#else
  15.155 -extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
  15.156 -#endif
  15.157 -
  15.158 -#ifdef HAVE_STRLEN
  15.159 -#define SDL_strlen      strlen
  15.160 -#else
  15.161 -extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string);
  15.162 -#endif
  15.163 -
  15.164 -#ifdef HAVE_STRCPY
  15.165 -#define SDL_strcpy     strcpy
  15.166 -#else
  15.167 -extern DECLSPEC char * SDLCALL SDL_strcpy(char *dst, const char *src);
  15.168 -#endif
  15.169 -
  15.170 -#ifdef HAVE_STRNCPY
  15.171 -#define SDL_strncpy     strncpy
  15.172 -#else
  15.173 -extern DECLSPEC char * SDLCALL SDL_strncpy(char *dst, const char *src, size_t maxlen);
  15.174 -#endif
  15.175 -
  15.176 -#ifdef HAVE_STRCAT
  15.177 -#define SDL_strcat     strcat
  15.178 -#else
  15.179 -#define SDL_strcat(dst, src)    (SDL_strcpy(dst+SDL_strlen(dst), src), dst)
  15.180 -#endif
  15.181 -
  15.182 -#ifdef HAVE_STRNCAT
  15.183 -#define SDL_strncat    strncat
  15.184 -#else
  15.185 -#define SDL_strncat(dst, src, n) (SDL_strncpy(dst+SDL_strlen(dst), src, n), dst)
  15.186 -#endif
  15.187 -
  15.188 -#ifdef HAVE_STRDUP
  15.189 -#define SDL_strdup     strdup
  15.190 -#else
  15.191 -extern DECLSPEC char * SDLCALL SDL_strdup(const char *string);
  15.192 -#endif
  15.193 -
  15.194 -#ifdef HAVE__STRREV
  15.195 -#define SDL_strrev      _strrev
  15.196 -#else
  15.197 -extern DECLSPEC char * SDLCALL SDL_strrev(char *string);
  15.198 -#endif
  15.199 -
  15.200 -#ifdef HAVE__STRUPR
  15.201 -#define SDL_strupr      _strupr
  15.202 -#else
  15.203 -extern DECLSPEC char * SDLCALL SDL_strupr(char *string);
  15.204 -#endif
  15.205 -
  15.206 -#ifdef HAVE__STRLWR
  15.207 -#define SDL_strlwr      _strlwr
  15.208 -#else
  15.209 -extern DECLSPEC char * SDLCALL SDL_strlwr(char *string);
  15.210 -#endif
  15.211 -
  15.212 -#ifdef HAVE_STRCHR
  15.213 -#define SDL_strchr      strchr
  15.214 -#else
  15.215 -extern DECLSPEC char * SDLCALL SDL_strchr(const char *string, int c);
  15.216 -#endif
  15.217 -
  15.218 -#ifdef HAVE_STRRCHR
  15.219 -#define SDL_strrchr     strrchr
  15.220 -#else
  15.221 -extern DECLSPEC char * SDLCALL SDL_strrchr(const char *string, int c);
  15.222 -#endif
  15.223 -
  15.224 -#ifdef HAVE_STRSTR
  15.225 -#define SDL_strstr      strstr
  15.226 -#else
  15.227 -extern DECLSPEC char * SDLCALL SDL_strstr(const char *haystack, const char *needle);
  15.228 -#endif
  15.229 -
  15.230 -#ifdef HAVE_ITOA
  15.231 -#define SDL_itoa        itoa
  15.232 -#else
  15.233 -#define SDL_itoa(value, string, radix)	SDL_ltoa((long)value, string, radix)
  15.234 -#endif
  15.235 -
  15.236 -#ifdef HAVE__LTOA
  15.237 -#define SDL_ltoa        _ltoa
  15.238 -#else
  15.239 -extern DECLSPEC char * SDLCALL SDL_ltoa(long value, char *string, int radix);
  15.240 -#endif
  15.241 -
  15.242 -#ifdef HAVE__UITOA
  15.243 -#define SDL_uitoa       _uitoa
  15.244 -#else
  15.245 -#define SDL_uitoa(value, string, radix)	SDL_ultoa((long)value, string, radix)
  15.246 -#endif
  15.247 -
  15.248 -#ifdef HAVE__ULTOA
  15.249 -#define SDL_ultoa       _ultoa
  15.250 -#else
  15.251 -extern DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *string, int radix);
  15.252 -#endif
  15.253 -
  15.254 -#ifdef HAVE_STRTOL
  15.255 -#define SDL_strtol      strtol
  15.256 -#else
  15.257 -extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, int base);
  15.258 -#endif
  15.259 -
  15.260 -#ifdef SDL_HAS_64BIT_TYPE
  15.261 -
  15.262 -#ifdef HAVE__I64TOA
  15.263 -#define SDL_lltoa       _i64toa
  15.264 -#else
  15.265 -extern DECLSPEC char* SDLCALL SDL_lltoa(Sint64 value, char *string, int radix);
  15.266 -#endif
  15.267 -
  15.268 -#ifdef HAVE__UI64TOA
  15.269 -#define SDL_ulltoa      _ui64toa
  15.270 -#else
  15.271 -extern DECLSPEC char* SDLCALL SDL_ulltoa(Uint64 value, char *string, int radix);
  15.272 -#endif
  15.273 -
  15.274 -#ifdef HAVE_STRTOLL
  15.275 -#define SDL_strtoll     strtoll
  15.276 -#else
  15.277 -extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base);
  15.278 -#endif
  15.279 -
  15.280 -#endif /* SDL_HAS_64BIT_TYPE */
  15.281 -
  15.282 -#ifdef HAVE_STRTOD
  15.283 -#define SDL_strtod      strtod
  15.284 -#else
  15.285 -extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp);
  15.286 -#endif
  15.287 -
  15.288 -#ifdef HAVE_ATOI
  15.289 -#define SDL_atoi        atoi
  15.290 -#else
  15.291 -#define SDL_atoi(X)     SDL_strtol(X, NULL, 0)
  15.292 -#endif
  15.293 -
  15.294 -#ifdef HAVE_ATOF
  15.295 -#define SDL_atof        atof
  15.296 -#else
  15.297 -#define SDL_atof(X)     SDL_strtod(X, NULL)
  15.298 -#endif
  15.299 -
  15.300 -#ifdef HAVE_STRCMP
  15.301 -#define SDL_strcmp      strcmp
  15.302 -#else
  15.303 -extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
  15.304 -#endif
  15.305 -
  15.306 -#ifdef HAVE_STRNCMP
  15.307 -#define SDL_strncmp     strncmp
  15.308 -#else
  15.309 -extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
  15.310 -#endif
  15.311 -
  15.312 -#if defined(HAVE_STRICMP) && !defined(HAVE_STRCASECMP)
  15.313 -#define strcasecmp      stricmp
  15.314 -#define HAVE_STRCASECMP
  15.315 -#endif
  15.316 -#ifdef HAVE_STRCASECMP
  15.317 -#define SDL_strcasecmp  strcasecmp
  15.318 -#else
  15.319 -extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
  15.320 -#endif
  15.321 -
  15.322 -#ifdef HAVE_SSCANF
  15.323 -#define SDL_sscanf      sscanf
  15.324 -#else
  15.325 -extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
  15.326 -#endif
  15.327 -
  15.328 -#ifdef HAVE_SNPRINTF
  15.329 -#define SDL_snprintf    snprintf
  15.330 -#else
  15.331 -extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
  15.332 -#endif
  15.333 -
  15.334 -#ifdef HAVE_VSNPRINTF
  15.335 -#define SDL_vsnprintf   vsnprintf
  15.336 -#else
  15.337 -extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
  15.338 -#endif
  15.339 -
  15.340 -/* Ends C function definitions when using C++ */
  15.341 -#ifdef __cplusplus
  15.342 -}
  15.343 -#endif
  15.344 -#include "close_code.h"
  15.345 -
  15.346 -#endif /* _SDL_string_h */
  15.347 +#include "SDL_stdinc.h"
    16.1 --- a/include/SDL_types.h	Thu Feb 09 05:46:55 2006 +0000
    16.2 +++ b/include/SDL_types.h	Thu Feb 09 09:07:13 2006 +0000
    16.3 @@ -20,105 +20,4 @@
    16.4      slouken@libsdl.org
    16.5  */
    16.6  
    16.7 -/* General data types used by the SDL library */
    16.8 -
    16.9 -#ifndef _SDL_types_h
   16.10 -#define _SDL_types_h
   16.11 -
   16.12 -#include <sys/types.h>
   16.13 -#ifdef _MSC_VER
   16.14 -#ifndef _SIZE_T_DEFINED
   16.15 -#ifdef  _WIN64
   16.16 -typedef unsigned __int64    size_t;
   16.17 -#else
   16.18 -typedef _W64 unsigned int   size_t;
   16.19 -#endif
   16.20 -#define _SIZE_T_DEFINED
   16.21 -#endif
   16.22 -typedef size_t uintptr_t;
   16.23 -#endif
   16.24 -
   16.25 -/* The number of elements in an array */
   16.26 -#define SDL_arraysize(array)	(sizeof(array)/sizeof(array[0]))
   16.27 -#define SDL_TABLESIZE(table)	SDL_arraysize(table)
   16.28 -
   16.29 -/* Basic data types */
   16.30 -typedef enum SDL_bool {
   16.31 -	SDL_FALSE = 0,
   16.32 -	SDL_TRUE  = 1
   16.33 -} SDL_bool;
   16.34 -
   16.35 -#ifdef H_MMBASIC /* mmbasic.h (Tru64 MME) */
   16.36 -/* Some of the basic types are already defined in mmbasic.h */
   16.37 -typedef signed char	Sint8;
   16.38 -typedef signed short	Sint16;
   16.39 -typedef signed int	Sint32;
   16.40 -#else
   16.41 -typedef unsigned char	Uint8;
   16.42 -typedef signed char	Sint8;
   16.43 -typedef unsigned short	Uint16;
   16.44 -typedef signed short	Sint16;
   16.45 -typedef unsigned int	Uint32;
   16.46 -typedef signed int	Sint32;
   16.47 -#endif
   16.48 -
   16.49 -/* Figure out how to support 64-bit datatypes */
   16.50 -#if !defined(__STRICT_ANSI__)
   16.51 -#ifdef __osf__ /* Tru64 */
   16.52 -#define SDL_HAS_64BIT_TYPE	long
   16.53 -#elif defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C) || defined(__DECC) || defined(__WATCOMC__)
   16.54 -#define SDL_HAS_64BIT_TYPE	long long
   16.55 -#elif defined(_MSC_VER) /* VC++ */
   16.56 -#define SDL_HAS_64BIT_TYPE	__int64
   16.57 -#endif
   16.58 -#endif /* !__STRICT_ANSI__ */
   16.59 -
   16.60 -/* The 64-bit type isn't available on EPOC/Symbian OS */
   16.61 -#ifdef __SYMBIAN32__
   16.62 -#undef SDL_HAS_64BIT_TYPE
   16.63 -#endif
   16.64 -
   16.65 -/* The 64-bit datatype isn't supported on all platforms */
   16.66 -#ifdef SDL_HAS_64BIT_TYPE
   16.67 -#ifndef H_MMBASIC
   16.68 -typedef unsigned SDL_HAS_64BIT_TYPE Uint64;
   16.69 -#endif
   16.70 -typedef SDL_HAS_64BIT_TYPE Sint64;
   16.71 -#else
   16.72 -/* This is really just a hack to prevent the compiler from complaining */
   16.73 -typedef struct {
   16.74 -	Uint32 hi;
   16.75 -	Uint32 lo;
   16.76 -} Uint64, Sint64;
   16.77 -#endif
   16.78 -
   16.79 -/* Make sure the types really have the right sizes */
   16.80 -#define SDL_COMPILE_TIME_ASSERT(name, x)               \
   16.81 -       typedef int SDL_dummy_ ## name[(x) * 2 - 1]
   16.82 -
   16.83 -SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
   16.84 -SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
   16.85 -SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
   16.86 -SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
   16.87 -SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
   16.88 -SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
   16.89 -SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
   16.90 -SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
   16.91 -
   16.92 -/* Check to make sure enums are the size of ints, for structure packing.
   16.93 -   For both Watcom C/C++ and Borland C/C++ the compiler option that makes
   16.94 -   enums having the size of an int must be enabled.
   16.95 -   This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
   16.96 -*/
   16.97 -/* Enable enums always int in CodeWarrior (for MPW use "-enum int") */
   16.98 -#ifdef __MWERKS__
   16.99 -#pragma enumsalwaysint on
  16.100 -#endif
  16.101 -
  16.102 -typedef enum {
  16.103 -	DUMMY_ENUM_VALUE
  16.104 -} SDL_DUMMY_ENUM;
  16.105 -
  16.106 -SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
  16.107 -
  16.108 -#endif
  16.109 +#include "SDL_stdinc.h"