From 59275a09586fd61eeb16ef327af85b28c26fe7ba Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Thu, 5 Oct 2006 05:16:07 +0000 Subject: [PATCH] Protect against C++ compiler and add the OPAL_DECLSPEC to the places where it is required. This commit was SVN r11995. --- opal/mca/backtrace/backtrace.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/opal/mca/backtrace/backtrace.h b/opal/mca/backtrace/backtrace.h index 5feda167e5..251aa19973 100644 --- a/opal/mca/backtrace/backtrace.h +++ b/opal/mca/backtrace/backtrace.h @@ -24,6 +24,10 @@ #include "opal/mca/mca.h" #include "opal/mca/base/base.h" +#if defined(c_plusplus) || defined(__cplusplus) +extern "C" { +#endif + /* * Most of this file is just for ompi_info. There are two interface * functions, both of which are called directly. The joy of link-time @@ -36,7 +40,7 @@ * * \note some attempts made to be signal safe. */ -void opal_backtrace_print(FILE *file); +OPAL_DECLSPEC void opal_backtrace_print(FILE *file); /* * Return back trace in buffer. buffer will be allocated by the @@ -45,7 +49,7 @@ void opal_backtrace_print(FILE *file); * \note Probably bad to call this from a signal handler. * */ -int opal_backtrace_buffer(char*** messages, int *len); +OPAL_DECLSPEC int opal_backtrace_buffer(char*** messages, int *len); /** @@ -72,4 +76,8 @@ typedef struct opal_backtrace_base_component_1_0_0_t opal_backtrace_base_compone /* backtrace v1.0 */ \ "backtrace", 1, 0, 0 +#if defined(c_plusplus) || defined(__cplusplus) +} +#endif + #endif /* OPAL_MCA_BACKTRACE_BACKTRACE_H */