This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stdbool.h


On Feb  3, 2002, Daniel Jacobowitz <drow@mvista.com> wrote:

> Seconded with what Alexandre said.

Here's the patch that implements my suggestion.  Ok to install?

Build-tested with the recently-contributed cgen-based sh64-elf
otherwise-hyphenated :-) simulator.  I had to enable it in
sim/configure.in first, though; it appears that Ben forgot to
contribute the configure.in changes that enabled it :-(

Index: include/opcode/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* cgen.h (CGEN_ATTR, CGEN_ATTR_TYPE, CGEN_ATTR_BOOLS): Replace
	bool with bool_val.

Index: include/opcode/cgen.h
===================================================================
RCS file: /home/aoliva/cygnus/uberbaum/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 3 Feb 2002 05:40:09 -0000
@@ -113,7 +113,7 @@ typedef int CGEN_ATTR_VALUE_TYPE;
 typedef struct
 {
   /* Boolean attributes.  */
-  unsigned int bool;
+  unsigned int bool_val;
   /* Non-boolean integer attributes.  */
   CGEN_ATTR_VALUE_TYPE nonbool[1];
 } CGEN_ATTR;
@@ -124,12 +124,12 @@ typedef struct
    in one host int).  */
 
 #define CGEN_ATTR_TYPE(n) \
-struct { unsigned int bool; \
+struct { unsigned int bool_val; \
 	 CGEN_ATTR_VALUE_TYPE nonbool[(n) ? (n) : 1]; }
 
 /* Return the boolean attributes.  */
 
-#define CGEN_ATTR_BOOLS(a) ((a)->bool)
+#define CGEN_ATTR_BOOLS(a) ((a)->bool_val)
 
 /* Non-boolean attribute numbers are offset by this much.  */
 

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]