diff --git a/include/libunwind-hppa.h b/include/libunwind-hppa.h index aa493f99..c2f00f17 100644 --- a/include/libunwind-hppa.h +++ b/include/libunwind-hppa.h @@ -26,6 +26,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef LIBUNWIND_H #define LIBUNWIND_H +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + #include #include @@ -83,4 +87,8 @@ typedef ucontext_t unw_tdep_context_t; #include "libunwind-common.h" +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + #endif /* LIBUNWIND_H */ diff --git a/include/libunwind-ia64.h b/include/libunwind-ia64.h index 0571b79e..456ba258 100644 --- a/include/libunwind-ia64.h +++ b/include/libunwind-ia64.h @@ -29,6 +29,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + #ifdef ia64 /* This works around a bug in Intel's ECC v7.0 which defines "ia64" as "1". */ @@ -161,4 +165,8 @@ extern unw_word_t _Uia64_find_dyn_list (unw_addr_space_t as, signal-safe. */ extern int _Uia64_get_kernel_table (unw_dyn_info_t *di); +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + #endif /* LIBUNWIND_H */ diff --git a/include/libunwind-x86.h b/include/libunwind-x86.h index 8ebc085b..040f7c91 100644 --- a/include/libunwind-x86.h +++ b/include/libunwind-x86.h @@ -26,6 +26,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef LIBUNWIND_H #define LIBUNWIND_H +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + #include #include @@ -89,4 +93,8 @@ typedef ucontext_t unw_tdep_context_t; #include "libunwind-common.h" +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + #endif /* LIBUNWIND_H */