Wrap a few opcodes headers in extern "C" for C++

These are sufficient to link an --enable-targets=all GDB build in C++
mode, on x86_64 Fedora 20.

include/opcode/
2015-02-19  Pedro Alves  <palves@redhat.com>

	* cgen.h [__cplusplus]: Wrap in extern "C".
	* msp430-decode.h [__cplusplus]: Likewise.
	* nios2.h [__cplusplus]: Likewise.
	* rl78.h [__cplusplus]: Likewise.
	* rx.h [__cplusplus]: Likewise.
	* tilegx.h [__cplusplus]: Likewise.

opcodes/
2015-02-19  Pedro Alves  <palves@redhat.com>

	* microblaze-dis.h [__cplusplus]: Wrap in extern "C".
This commit is contained in:
Pedro Alves 2015-02-12 09:59:03 +00:00
parent 07df97c857
commit f63c17760f
9 changed files with 69 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2015-02-19 Pedro Alves <palves@redhat.com>
* cgen.h [__cplusplus]: Wrap in extern "C".
* msp430-decode.h [__cplusplus]: Likewise.
* nios2.h [__cplusplus]: Likewise.
* rl78.h [__cplusplus]: Likewise.
* rx.h [__cplusplus]: Likewise.
* tilegx.h [__cplusplus]: Likewise.
2015-01-28 James Bowman <james.bowman@ftdichip.com>
* ft32.h: New file.

View File

@ -27,6 +27,10 @@
/* ??? IWBN to replace bfd in the name. */
#include "bfd_stdint.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ??? This file requires bfd.h but only to get bfd_vma.
Seems like an awful lot to require just to get such a fundamental type.
Perhaps the definition of bfd_vma can be moved outside of bfd.h.
@ -1476,4 +1480,8 @@ extern void cgen_clear_signed_overflow_ok (CGEN_CPU_DESC);
/* Will an error message be generated if a signed field in an instruction overflows ? */
extern unsigned int cgen_signed_overflow_ok_p (CGEN_CPU_DESC);
#ifdef __cplusplus
}
#endif
#endif /* OPCODE_CGEN_H */

View File

@ -19,6 +19,10 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
MSO_unknown,
@ -128,3 +132,7 @@ typedef struct
} MSP430_Opcode_Decoded;
int msp430_decode_opcode (unsigned long, MSP430_Opcode_Decoded *, int (*)(void *), void *);
#ifdef __cplusplus
}
#endif

View File

@ -25,6 +25,10 @@
#include "bfd.h"
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************************
* This file contains structures, bit masks and shift counts used
* by the GNU toolchain to define the Nios II instruction set and
@ -153,4 +157,8 @@ extern int nios2_num_regs;
extern const struct nios2_opcode *
nios2_find_opcode_hash (unsigned long, unsigned long);
#ifdef __cplusplus
}
#endif
#endif /* _NIOS2_H */

View File

@ -26,6 +26,10 @@
#ifndef RL78_OPCODES_H_INCLUDED
#define RL78_OPCODES_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
/* For the purposes of these structures, the RL78 registers are as
follows, despite most of these being memory-mapped and
bank-switched: */
@ -164,4 +168,8 @@ typedef struct
int rl78_decode_opcode (unsigned long, RL78_Opcode_Decoded *, int (*)(void *), void *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -23,6 +23,10 @@
analyzer, and the disassembler. Given an opcode data source,
it decodes the next opcode into the following structures. */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
RX_AnySize = 0,
@ -212,3 +216,7 @@ typedef struct
registers. 32..47 are condition codes. */
int rx_decode_opcode (unsigned long, RX_Opcode_Decoded *, int (*)(void *), void *);
#ifdef __cplusplus
}
#endif

View File

@ -21,6 +21,10 @@
#ifndef opcode_tile_h
#define opcode_tile_h
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long long tilegx_bundle_bits;
@ -1301,4 +1305,8 @@ typedef tilegx_bundle_bits tile_bundle_bits;
#define TILE_LOG2_BUNDLE_ALIGNMENT_IN_BYTES \
TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES
#ifdef __cplusplus
}
#endif
#endif /* opcode_tilegx_h */

View File

@ -1,3 +1,7 @@
2015-02-19 Pedro Alves <palves@redhat.com>
* microblaze-dis.h [__cplusplus]: Wrap in extern "C".
2015-02-10 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>

View File

@ -22,6 +22,10 @@
#ifndef MICROBLAZE_DIS_H
#define MICROBLAZE_DIS_H 1
#ifdef __cplusplus
extern "C" {
#endif
extern enum microblaze_instr microblaze_decode_insn (long, int *, int *,
int *, int *);
extern unsigned long microblaze_get_target_address (long, bfd_boolean, int,
@ -31,4 +35,8 @@ extern enum microblaze_instr get_insn_microblaze (long, bfd_boolean *,
enum microblaze_instr_type *,
short *);
#ifdef __cplusplus
}
#endif
#endif /* microblaze-dis.h */