Only allow XP_AssertAtLine/XP_ASSERT to print to console in debug builds.

Bug #78647 r=bryner
This commit is contained in:
seawood%netscape.com 2001-11-14 05:43:59 +00:00
parent f0921bdc45
commit 9d61cc8808

View File

@ -69,10 +69,11 @@
/* (Solaris 2.x) on Sol2.5, assert() does not work. Too bad... */
/* Therefore, we print the line where assert happened instead. */
/* Print out a \007 to sound the bell. -mcafee */
#define XP_AssertAtLine() fprintf(stderr, "assert: line %d, file %s%c\n", __LINE__, __FILE__, 7)
#ifdef DEBUG
#define XP_AssertAtLine() fprintf(stderr, "assert: line %d, file %s%c\n", __LINE__, __FILE__, 7)
#define XP_ASSERT(X) ( (((X))!=0)? (void)0: (void)XP_AssertAtLine() )
#else
#define XP_AssertAtLine()
#define XP_ASSERT(X) (void)0
#endif
#else