From 55172d69d08941ecb3bb1abd640f22abca10de47 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 11 Feb 2015 10:04:47 +0000 Subject: Wrap BFD headers in extern "C" These were the BFD changes needed for building a C++ GDB with --enable-targets=all, on x86_64 Fedora 20. For libbfd.h and libcoff.h, this does same as already done when generating bfd.h: open extern "C" in the -in.h header, and close it from the Makefile. bfd/doc/ChangeLog: 2015-02-11 Pedro Alves * Makefile.am (libbfd.h, libcoff.h): Close extern "C" scope. * Makefile.in: Regenerate. bfd/ChangeLog: 2015-02-11 Pedro Alves * libbfd-in.h [__cplusplus]: Open extern "C" scope. * libcoff-in.h [__cplusplus]: Open extern "C" scope. * libbfd.h: Regenerate. * libcoff.h: Regenerate. * elf-bfd.h [__cplusplus]: Wrap in extern "C". * mach-o.h [__cplusplus]: Wrap in extern "C". * som.h [__cplusplus]: Wrap in extern "C". --- bfd/libbfd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bfd/libbfd.h') diff --git a/bfd/libbfd.h b/bfd/libbfd.h index a1c0a01..bd56afb 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -29,6 +29,10 @@ #include "hashtab.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Align an address upward to a boundary, expressed as a number of bytes. E.g. align to an 8-byte boundary with argument of 8. Take care never to wrap around if the address is within boundary-1 of the end of the @@ -3015,3 +3019,6 @@ void *bfd_arch_default_fill (bfd_size_type count, bfd_boolean code); /* Extracted from elf.c. */ +#ifdef __cplusplus +} +#endif -- cgit v1.1