The config sets the default assertion level so people can override it for their own use in application code.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404400
This commit is contained in:
parent
0dcf321953
commit
e50ab3b341
11 changed files with 16 additions and 20 deletions
|
@ -142,19 +142,19 @@ AC_HELP_STRING([--enable-assertions],
|
||||||
sdl_valid_assertion_level=no
|
sdl_valid_assertion_level=no
|
||||||
if test x$enable_assertions = xno; then
|
if test x$enable_assertions = xno; then
|
||||||
sdl_valid_assertion_level=yes
|
sdl_valid_assertion_level=yes
|
||||||
AC_DEFINE(SDL_ASSERT_LEVEL, 0)
|
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 0)
|
||||||
fi
|
fi
|
||||||
if test x$enable_assertions = xrelease; then
|
if test x$enable_assertions = xrelease; then
|
||||||
sdl_valid_assertion_level=yes
|
sdl_valid_assertion_level=yes
|
||||||
AC_DEFINE(SDL_ASSERT_LEVEL, 1)
|
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 1)
|
||||||
fi
|
fi
|
||||||
if test x$enable_assertions = xyes; then
|
if test x$enable_assertions = xyes; then
|
||||||
sdl_valid_assertion_level=yes
|
sdl_valid_assertion_level=yes
|
||||||
AC_DEFINE(SDL_ASSERT_LEVEL, 2)
|
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 2)
|
||||||
fi
|
fi
|
||||||
if test x$enable_assertions = xparanoid; then
|
if test x$enable_assertions = xparanoid; then
|
||||||
sdl_valid_assertion_level=yes
|
sdl_valid_assertion_level=yes
|
||||||
AC_DEFINE(SDL_ASSERT_LEVEL, 3)
|
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 3)
|
||||||
fi
|
fi
|
||||||
if test x$sdl_valid_assertion_level = xno; then
|
if test x$sdl_valid_assertion_level = xno; then
|
||||||
AC_MSG_ERROR([*** unknown assertion level. stop.])
|
AC_MSG_ERROR([*** unknown assertion level. stop.])
|
||||||
|
|
|
@ -77,7 +77,6 @@
|
||||||
|
|
||||||
#include "SDL_main.h"
|
#include "SDL_main.h"
|
||||||
#include "SDL_stdinc.h"
|
#include "SDL_stdinc.h"
|
||||||
#include "SDL_assert.h"
|
|
||||||
#include "SDL_atomic.h"
|
#include "SDL_atomic.h"
|
||||||
#include "SDL_audio.h"
|
#include "SDL_audio.h"
|
||||||
#include "SDL_cpuinfo.h"
|
#include "SDL_cpuinfo.h"
|
||||||
|
|
|
@ -21,13 +21,11 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_config.h"
|
#include "SDL_config.h"
|
||||||
|
|
||||||
/* This is an assert macro for SDL's internal use. Not for the public API! */
|
|
||||||
|
|
||||||
#ifndef _SDL_assert_h
|
#ifndef _SDL_assert_h
|
||||||
#define _SDL_assert_h
|
#define _SDL_assert_h
|
||||||
|
|
||||||
#ifndef SDL_ASSERT_LEVEL
|
#ifndef SDL_ASSERT_LEVEL
|
||||||
#error SDL_ASSERT_LEVEL is not defined. Please fix your SDL_config.h.
|
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -148,4 +146,3 @@ SDL_assert_state SDL_ReportAssertion(SDL_assert_data *, const char *, int);
|
||||||
#endif /* _SDL_assert_h */
|
#endif /* _SDL_assert_h */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
#endif /* HAVE_LIBC */
|
#endif /* HAVE_LIBC */
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#undef SDL_ASSERT_LEVEL
|
#undef SDL_DEFAULT_ASSERT_LEVEL
|
||||||
|
|
||||||
/* Allow disabling of core subsystems */
|
/* Allow disabling of core subsystems */
|
||||||
#undef SDL_AUDIO_DISABLED
|
#undef SDL_AUDIO_DISABLED
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "SDL_platform.h"
|
#include "SDL_platform.h"
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#define SDL_ASSERT_LEVEL 1
|
#define SDL_DEFAULT_ASSERT_LEVEL 1
|
||||||
|
|
||||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#define SDL_ASSERT_LEVEL 1
|
#define SDL_DEFAULT_ASSERT_LEVEL 1
|
||||||
|
|
||||||
/* This is a set of defines to configure the SDL features */
|
/* This is a set of defines to configure the SDL features */
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#define SDL_ASSERT_LEVEL 1
|
#define SDL_DEFAULT_ASSERT_LEVEL 1
|
||||||
|
|
||||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/* This is a set of defines to configure the SDL features */
|
/* This is a set of defines to configure the SDL features */
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#define SDL_ASSERT_LEVEL 1
|
#define SDL_DEFAULT_ASSERT_LEVEL 1
|
||||||
|
|
||||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "SDL_platform.h"
|
#include "SDL_platform.h"
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#define SDL_ASSERT_LEVEL 1
|
#define SDL_DEFAULT_ASSERT_LEVEL 1
|
||||||
|
|
||||||
#define SDL_HAS_64BIT_TYPE 1
|
#define SDL_HAS_64BIT_TYPE 1
|
||||||
#define SDL_BYTEORDER 1234
|
#define SDL_BYTEORDER 1234
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/* This is a set of defines to configure the SDL features */
|
/* This is a set of defines to configure the SDL features */
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#define SDL_ASSERT_LEVEL 1
|
#define SDL_DEFAULT_ASSERT_LEVEL 1
|
||||||
|
|
||||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "SDL_platform.h"
|
#include "SDL_platform.h"
|
||||||
|
|
||||||
/* SDL internal assertion support */
|
/* SDL internal assertion support */
|
||||||
#define SDL_ASSERT_LEVEL 1
|
#define SDL_DEFAULT_ASSERT_LEVEL 1
|
||||||
|
|
||||||
/* Make sure that this isn't included by Visual C++ */
|
/* Make sure that this isn't included by Visual C++ */
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue