src/share/native/sun/awt/debug/debug_assert.h

Print this page

        

@@ -30,21 +30,26 @@
 extern "C" {
 #endif
 
 #include "debug_util.h"
 
+/* Use THIS_FILE when it is available. */
+#ifndef THIS_FILE
+    #define THIS_FILE __FILE__
+#endif
+
 #if defined(DEBUG)
 
 #define DASSERT(_expr) \
         if ( !(_expr) ) { \
-            DAssert_Impl( #_expr, __FILE__, __LINE__); \
+            DAssert_Impl( #_expr, THIS_FILE, __LINE__); \
         } else { \
         }
 
 #define DASSERTMSG(_expr, _msg) \
         if ( !(_expr) ) { \
-            DAssert_Impl( (_msg), __FILE__, __LINE__); \
+            DAssert_Impl( (_msg), THIS_FILE, __LINE__); \
         } else { \
         }
 
 /* prototype for assert function */
 typedef void (*DASSERT_CALLBACK)(const char * msg, const char * file, int line);