libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] c++ patch for libunwind-0.91


From: A N Burton
Subject: [libunwind] c++ patch for libunwind-0.91
Date: Fri, 28 Mar 2003 02:23:12 +0000

Please find enclosed a patch that will add the
appropriate extern "C" linkage specification
to the exported headers.  This patch should
be applied from the root of the distirbuted
hierarchy, and applies to version 0.91.

The motivation behind this patch is to allow
libunwind to be called from both c and c++.

Regards,

Ariel Burton

----

diff -c -r ./include/libunwind-common.h 
../libunwind-0.91/include/libunwind-common.h
*** ./include/libunwind-common.h        Wed Mar 12 21:15:36 2003
--- ../libunwind-0.91/include/libunwind-common.h        Thu Mar 27 17:09:43 2003
***************
*** 23,28 ****
--- 23,32 ----
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  #define UNW_PASTE2(x,y)       x##y
  #define UNW_PASTE(x,y)        UNW_PASTE2(x,y)
  #define UNW_OBJ(fn)   UNW_PASTE(UNW_PREFIX, fn)
***************
*** 362,364 ****
--- 366,373 ----
                               void *arg);
  extern int _UPT_resume (unw_addr_space_t as, unw_cursor_t *c, void *arg);
  extern unw_accessors_t _UPT_accessors;
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
diff -c -r ./include/libunwind-dynamic.h 
../libunwind-0.91/include/libunwind-dynamic.h
*** ./include/libunwind-dynamic.h       Thu Feb 27 04:59:13 2003
--- ../libunwind-0.91/include/libunwind-dynamic.h       Thu Mar 27 17:10:36 2003
***************
*** 23,28 ****
--- 23,32 ----
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  /* This file defines the runtime-support routines for dynamically
  generated code.  Even though it is implemented as part of libunwind,
  it is logically separate from the interface to perform the actual
***************
*** 202,204 ****
--- 206,213 ----
     IA-64, that's p0 (0), on non-predicated architectures, the value is
     ignored.  */
  #define _U_QP_TRUE    _U_TDEP_QP_TRUE
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
diff -c -r ./include/libunwind-hppa.h ../libunwind-0.91/include/libunwind-hppa.h
*** ./include/libunwind-hppa.h  Wed Mar 19 20:04:14 2003
--- ../libunwind-0.91/include/libunwind-hppa.h  Thu Mar 27 17:06:21 2003
***************
*** 26,31 ****
--- 26,35 ----
  #ifndef LIBUNWIND_H
  #define LIBUNWIND_H
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  #include <inttypes.h>
  #include <ucontext.h>
  
***************
*** 83,86 ****
--- 87,94 ----
  
  #include "libunwind-common.h"
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif /* LIBUNWIND_H */
diff -c -r ./include/libunwind-ia64.h ../libunwind-0.91/include/libunwind-ia64.h
*** ./include/libunwind-ia64.h  Wed Mar 19 19:55:15 2003
--- ../libunwind-0.91/include/libunwind-ia64.h  Thu Mar 27 17:05:40 2003
***************
*** 26,31 ****
--- 26,35 ----
  #ifndef LIBUNWIND_H
  #define LIBUNWIND_H
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  #include <inttypes.h>
  #include <ucontext.h>
  
***************
*** 161,164 ****
--- 165,172 ----
     signal-safe.  */
  extern int _Uia64_get_kernel_table (unw_dyn_info_t *di);
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif /* LIBUNWIND_H */
diff -c -r ./include/libunwind-x86.h ../libunwind-0.91/include/libunwind-x86.h
*** ./include/libunwind-x86.h   Wed Mar 19 20:04:14 2003
--- ../libunwind-0.91/include/libunwind-x86.h   Thu Mar 27 17:06:48 2003
***************
*** 26,31 ****
--- 26,35 ----
  #ifndef LIBUNWIND_H
  #define LIBUNWIND_H
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  #include <inttypes.h>
  #include <ucontext.h>
  
***************
*** 89,92 ****
--- 93,100 ----
  
  #include "libunwind-common.h"
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif /* LIBUNWIND_H */
diff -c -r ./include/libunwind.h ../libunwind-0.91/include/libunwind.h
*** ./include/libunwind.h       Wed Mar 19 19:55:15 2003
--- ../libunwind-0.91/include/libunwind.h       Thu Mar 27 17:11:18 2003
***************
*** 26,31 ****
--- 26,35 ----
  #ifndef LIBUNWIND_H
  #define LIBUNWIND_H
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  #include <inttypes.h>
  #include <ucontext.h>
  
***************
*** 161,164 ****
--- 165,172 ----
     signal-safe.  */
  extern int _Uia64_get_kernel_table (unw_dyn_info_t *di);
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif /* LIBUNWIND_H */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]