< prev index next >

src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h

Print this page

        

@@ -45,17 +45,22 @@
 #define user_regs_struct  pt_regs
 #endif
 
 // This C bool type must be int for compatibility with Linux calls and
 // it would be a mistake to equivalence it to C++ bool on many platforms
-
+#ifndef __cplusplus
 typedef int bool;
 #define true  1
 #define false 0
+#endif
 
 struct ps_prochandle;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 // attach to a process
 JNIEXPORT struct ps_prochandle* JNICALL
 Pgrab(pid_t pid, char* err_buf, size_t err_buf_len);
 
 // attach to a core dump

@@ -103,6 +108,10 @@
 
 struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj);
 
 void throw_new_debugger_exception(JNIEnv* env, const char* errMsg);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif //__LIBPROC_H_
< prev index next >