ICU-3178 Create a platform indepdent flag for debug and release builds

X-SVN-Rev: 13439
This commit is contained in:
George Rhoten 2003-10-16 18:34:44 +00:00
parent 48e73c9487
commit beea326e42
3 changed files with 27 additions and 1 deletions

View File

@ -21,8 +21,12 @@
#define U_ASSERT_H #define U_ASSERT_H
/* utypes.h is included to get the proper define for uint8_t */ /* utypes.h is included to get the proper define for uint8_t */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#if U_RELEASE
#define U_ASSERT(exp)
#else
#include <assert.h> #include <assert.h>
#define U_ASSERT(exp) assert(exp) #define U_ASSERT(exp) assert(exp)
#endif #endif
#endif

View File

@ -44,6 +44,14 @@
#define U_IOSTREAM_SOURCE @U_IOSTREAM_SOURCE@ #define U_IOSTREAM_SOURCE @U_IOSTREAM_SOURCE@
#endif #endif
#ifndef U_DEBUG
#define U_DEBUG @ENABLE_DEBUG@
#endif
#ifndef U_RELEASE
#define U_RELEASE @ENABLE_RELEASE@
#endif
/* Determines whether specific types are available */ /* Determines whether specific types are available */
#ifndef U_HAVE_INT8_T #ifndef U_HAVE_INT8_T
#define U_HAVE_INT8_T @HAVE_INT8_T@ #define U_HAVE_INT8_T @HAVE_INT8_T@
@ -264,4 +272,3 @@ typedef unsigned short uint16_t;
/*===========================================================================*/ /*===========================================================================*/
#define U_MAKE "@U_MAKE@" #define U_MAKE "@U_MAKE@"

View File

@ -42,6 +42,21 @@
#define U_IOSTREAM_SOURCE 199711 #define U_IOSTREAM_SOURCE 199711
#endif #endif
#ifndef U_DEBUG
#ifdef _DEBUG
#define U_DEBUG 1
#else
#define U_DEBUG 0
#endif
#ifndef U_RELEASE
#ifdef NDEBUG
#define U_RELEASE 1
#else
#define U_RELEASE 0
#endif
#endif
/* Determines whether specific types are available */ /* Determines whether specific types are available */
#define U_HAVE_INT8_T 0 #define U_HAVE_INT8_T 0
#define U_HAVE_UINT8_T 0 #define U_HAVE_UINT8_T 0