From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21401 invoked by alias); 14 Oct 2002 08:36:30 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 21394 invoked from network); 14 Oct 2002 08:36:29 -0000 Received: from unknown (HELO mta04ps.bigpond.com) (144.135.25.136) by sources.redhat.com with SMTP; 14 Oct 2002 08:36:29 -0000 Received: from bubble.local ([144.135.25.72]) by mta04ps.bigpond.com (Netscape Messaging Server 4.15 mta04ps Jul 16 2002 22:47:55) with SMTP id H3YQKR00.2WE for ; Mon, 14 Oct 2002 18:36:27 +1000 Received: from CPE-144-136-184-138.sa.bigpond.net.au ([144.136.184.138]) by PSMAM02.mailsvc.email.bigpond.com(MailRouter V3.0n 80/5656806); 14 Oct 2002 18:36:27 Received: (qmail 452 invoked by uid 179); 14 Oct 2002 08:36:27 -0000 Date: Mon, 14 Oct 2002 01:36:00 -0000 From: Alan Modra To: cgen@sources.redhat.com Cc: Ben Elliston Subject: bfd.h inclusion test Message-ID: <20021014180627.C22176@bubble.sa.bigpond.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-q4/txt/msg00015.txt.bz2 The include guard in bfd.h is "#ifndef __BFD_H_SEEN__", and I'd like to move BFD_VERSION_DATE to another file. I suppose this is an obvious patch, especially if I commit the bfd change first. ;) include/opcode/ChangeLog * cgen.h: Test __BFD_H_SEEN__ rather than BFD_VERSION_DATE. sim/common/ChangeLog * cgen-trace.h: Test __BFD_H_SEEN__ rather than BFD_VERSION. OK? Index: include/opcode/cgen.h =================================================================== RCS file: /cvs/src/src/include/opcode/cgen.h,v retrieving revision 1.16 diff -u -p -r1.16 cgen.h --- include/opcode/cgen.h 28 Jan 2002 19:15:46 -0000 1.16 +++ include/opcode/cgen.h 14 Oct 2002 04:07:40 -0000 @@ -26,7 +26,7 @@ with this program; if not, write to the Perhaps the definition of bfd_vma can be moved outside of bfd.h. Or perhaps one could duplicate its definition in another file. Until such time, this file conditionally compiles definitions that require - bfd_vma using BFD_VERSION_DATE. */ + bfd_vma using __BFD_H_SEEN__. */ /* Enums must be defined before they can be used. Allow them to be used in struct definitions, even though the enum must @@ -276,7 +276,7 @@ typedef const char * (cgen_parse_fn) PC is the pc value of the insn. The result is an error message or NULL if success. */ -#ifdef BFD_VERSION_DATE +#ifdef __BFD_H_SEEN__ typedef const char * (cgen_insert_fn) PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_, CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_, @@ -297,7 +297,7 @@ typedef const char * (cgen_insert_fn) () PC is the pc value of the insn. The result is the length of the insn in bits or zero if not recognized. */ -#ifdef BFD_VERSION_DATE +#ifdef __BFD_H_SEEN__ typedef int (cgen_extract_fn) PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_, CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_, @@ -316,7 +316,7 @@ typedef int (cgen_extract_fn) (); PC is the pc value of the insn. LEN is the length of the insn, in bits. */ -#ifdef BFD_VERSION_DATE +#ifdef __BFD_H_SEEN__ typedef void (cgen_print_fn) PARAMS ((CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_, CGEN_FIELDS *fields_, bfd_vma pc_, int len_)); @@ -381,7 +381,7 @@ enum cgen_parse_operand_result CGEN_PARSE_OPERAND_RESULT_ERROR }; -#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */ +#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */ typedef const char * (cgen_parse_operand_fn) PARAMS ((CGEN_CPU_DESC, enum cgen_parse_operand_type, const char **, int, int, @@ -565,7 +565,7 @@ const CGEN_KEYWORD_ENTRY *cgen_keyword_s extern const char *cgen_parse_keyword PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *)); -#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */ +#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */ extern const char *cgen_parse_signed_integer PARAMS ((CGEN_CPU_DESC, const char **, int, long *)); extern const char *cgen_parse_unsigned_integer @@ -1253,7 +1253,7 @@ typedef struct cgen_cpu_desc const char * (*parse_operand) PARAMS ((CGEN_CPU_DESC, int opindex_, const char **, CGEN_FIELDS *fields_)); -#ifdef BFD_VERSION_DATE +#ifdef __BFD_H_SEEN__ const char * (*insert_operand) PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR, bfd_vma pc_)); @@ -1286,7 +1286,7 @@ typedef struct cgen_cpu_desc PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_)); void (*set_int_operand) PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_)); -#ifdef BFD_VERSION_DATE +#ifdef __BFD_H_SEEN__ bfd_vma (*get_vma_operand) PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_)); void (*set_vma_operand) Index: sim/common/cgen-trace.h =================================================================== RCS file: /cvs/src/src/sim/common/cgen-trace.h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 cgen-trace.h --- sim/common/cgen-trace.h 16 Apr 1999 01:34:56 -0000 1.1.1.1 +++ sim/common/cgen-trace.h 14 Oct 2002 04:07:53 -0000 @@ -78,7 +78,7 @@ typedef struct { extern int sim_disasm_sprintf (SFILE *, const char *, ...); /* For opcodes based disassemblers. */ -#ifdef BFD_VERSION +#ifdef __BFD_H_SEEN__ struct disassemble_info; extern int sim_disasm_read_memory (bfd_vma memaddr_, bfd_byte *myaddr_, int length_, -- Alan Modra IBM OzLabs - Linux Technology Centre