< prev index next >

src/java.desktop/share/native/common/awt/debug/debug_trace.c

Print this page
rev 52622 : 8214120: [REDO] Fix sun.awt.nativedebug on X11 platforms

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -235,29 +235,35 @@
     va_end(arglist);
 }
 
 /*
  * Called via DTRACE_PRINT macro. Outputs printf style formatted text.
+ * JNIEXPORT because these functions are also called from libawt_xawt.
  */
-void DTrace_VPrint( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
+JNIEXPORT void JNICALL
+DTrace_VPrint( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
     DASSERT(fmt != NULL);
     DTrace_VPrintImpl(fmt, arglist);
 }
 
 /*
  * Called via DTRACE_PRINTLN macro. Outputs printf style formatted text with an automatic newline.
+ * JNIEXPORT because these functions are also called from libawt_xawt.
  */
-void DTrace_VPrintln( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
+JNIEXPORT void JNICALL
+DTrace_VPrintln( const char * file, int line, int argc, const char * fmt, va_list arglist ) {
     DTrace_VPrintImpl(fmt, arglist);
     DTrace_PrintImpl("\n");
 }
 
 /*
  * Called via DTRACE_ macros. If tracing is enabled at the given location, it enters
  * the trace mutex and invokes the callback function to output the trace.
+ * JNIEXPORT because these functions are also called from libawt_xawt.
  */
-void DTrace_PrintFunction( DTRACE_PRINT_CALLBACK pfn, dtrace_id * pFileTraceId, dtrace_id * pLineTraceId,
+JNIEXPORT void JNICALL
+DTrace_PrintFunction( DTRACE_PRINT_CALLBACK pfn, dtrace_id * pFileTraceId, dtrace_id * pLineTraceId,
                            const char * file, int line,
                            int argc, const char * fmt, ... ) {
     va_list     arglist;
 
     DASSERT(file != NULL);
< prev index next >