diff --git a/icu4c/source/common/uassert.h b/icu4c/source/common/uassert.h index 0a6080db56..de1b393389 100644 --- a/icu4c/source/common/uassert.h +++ b/icu4c/source/common/uassert.h @@ -21,8 +21,12 @@ #define U_ASSERT_H /* utypes.h is included to get the proper define for uint8_t */ #include "unicode/utypes.h" +#if U_RELEASE +#define U_ASSERT(exp) +#else #include #define U_ASSERT(exp) assert(exp) #endif +#endif diff --git a/icu4c/source/common/unicode/platform.h.in b/icu4c/source/common/unicode/platform.h.in index 1b43d655d4..eff00568c7 100644 --- a/icu4c/source/common/unicode/platform.h.in +++ b/icu4c/source/common/unicode/platform.h.in @@ -44,6 +44,14 @@ #define U_IOSTREAM_SOURCE @U_IOSTREAM_SOURCE@ #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 */ #ifndef U_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@" - diff --git a/icu4c/source/common/unicode/pwin32.h b/icu4c/source/common/unicode/pwin32.h index 1f33a975e1..730b461d13 100644 --- a/icu4c/source/common/unicode/pwin32.h +++ b/icu4c/source/common/unicode/pwin32.h @@ -42,6 +42,21 @@ #define U_IOSTREAM_SOURCE 199711 #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 */ #define U_HAVE_INT8_T 0 #define U_HAVE_UINT8_T 0