This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

PATCH v2, Re: gprof failed to compile


Daniel Jacobowitz wrote:

> On Thu, Jan 31, 2002 at 11:27:05AM -0600, Tom Rix wrote:
> > I am getting a new build error for gprof on AIX.
> >
> > Looks like it is caused by not typedef-ing bool.
> >
> > >
> > >         * gprof.h: Don't include ansidecl.h, do include bfd.h.
> > >         (bool): Don't typedef.
> >
> > The included patch reverts the bool to typedef-ed to int.
> >
> > Ok to commit?
>
> No, not OK.  The whole point was that we may now typedef bool in
> "bfd.h".
>
> Consider seeing what breaks if you typedef bool in bfd.h on the
> non-<stdbool.h> code path?

Moved the typedef to bfd-in.h and gprof builds.
Nothing breaks building wise.   Runtime should just work.

Tom

--
Tom Rix
GCC Engineer
trix@redhat.com


2002-01-31  Tom Rix  <trix@redhat.com>

	* bfd-in.h: typedef bool to int as a last resort.
	* bfd-in2.h: Regenerated.
 
diff -rcp src-old/bfd/bfd-in.h src/bfd/bfd-in.h
*** src-old/bfd/bfd-in.h	Thu Jan 31 07:40:00 2002
--- src/bfd/bfd-in.h	Thu Jan 31 11:26:43 2002
*************** typedef struct _bfd bfd;
*** 96,101 ****
--- 96,103 ----
  #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
  #include <stdbool.h>
  #define TRUE_FALSE_ALREADY_DEFINED
+ #else
+ typedef int bool;
  #endif
  #endif
  #ifdef MPW


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