jdk/src/share/demo/jvmti/hprof/debug_malloc.h
changeset 13678 5c8001201f98
parent 10292 ed7db6a12c2a
child 14342 8435a30053c1
--- a/jdk/src/share/demo/jvmti/hprof/debug_malloc.h	Wed Jul 05 18:20:34 2017 +0200
+++ b/jdk/src/share/demo/jvmti/hprof/debug_malloc.h	Tue Sep 11 13:40:59 2012 -0700
@@ -59,6 +59,11 @@
 #include <stdlib.h>
 #include <string.h>
 
+/* Use THIS_FILE when it is available. */
+#ifndef THIS_FILE
+    #define THIS_FILE __FILE__
+#endif
+
 /* The real functions behind the macro curtains. */
 
 void           *debug_malloc(size_t, const char *, int);
@@ -71,10 +76,10 @@
 
 void            debug_malloc_verify(const char*, int);
 #undef malloc_verify
-#define malloc_verify()     debug_malloc_verify(__FILE__, __LINE__)
+#define malloc_verify()     debug_malloc_verify(THIS_FILE, __LINE__)
 
 void            debug_malloc_police(const char*, int);
 #undef malloc_police
-#define malloc_police()     debug_malloc_police(__FILE__, __LINE__)
+#define malloc_police()     debug_malloc_police(THIS_FILE, __LINE__)
 
 #endif