aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-02-11 10:04:47 +0000
committerPedro Alves <palves@redhat.com>2015-02-11 10:04:47 +0000
commit55172d69d08941ecb3bb1abd640f22abca10de47 (patch)
treee727a26c1769b18197b714a443972a4f818a2cf0 /bfd/elf-bfd.h
parent0703599a49d082a957ee233fe018fb6ea7864920 (diff)
downloadgdb-55172d69d08941ecb3bb1abd640f22abca10de47.zip
gdb-55172d69d08941ecb3bb1abd640f22abca10de47.tar.gz
gdb-55172d69d08941ecb3bb1abd640f22abca10de47.tar.bz2
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 <palves@redhat.com> * Makefile.am (libbfd.h, libcoff.h): Close extern "C" scope. * Makefile.in: Regenerate. bfd/ChangeLog: 2015-02-11 Pedro Alves <palves@redhat.com> * 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".
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 49ffe79..495053d 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -27,6 +27,10 @@
#include "elf/internal.h"
#include "bfdlink.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* The number of entries in a section is its size divided by the size
of a single entry. This is normally only applicable to reloc and
symbol table sections.
@@ -2540,4 +2544,7 @@ extern asection _bfd_elf_large_com_section;
(!(H)->unique_global \
&& ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic)))
+#ifdef __cplusplus
+}
+#endif
#endif /* _LIBELF_H_ */