This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: shs.cc won't build on Solaris 2.5/sparc


On Feb 24, 2002, Anthony Green <green@redhat.com> wrote:

> On Sun, 2002-02-24 at 05:43, Alexandre Oliva wrote:
>> uint32_t and uint8_t are only available on Solaris 2.5 when pthread.h
>> is included (!!!).  I couldn't find any header in libjava that would
>> make sure these types were available, so I just arranged for shs.cc to
>> include jvm.h, like natSimpleSHSStream.cc does, which gets around the
>> problem.  Is this ok to install?

> We have a similar problem with newlib targets.  I think we decided to
> use mode attributes instead of uint32_t and the like.  I was going to
> submit a patch for that today.

Modes are just as wrong, as the comment in one of the files that has
such a work-around says.  SImode is just 4 times as wide as QImode,
but QImode may be 32-bits, in which case that's what you'd like to
use.  It's not common, but it's possible, and such ports do exist.

Perhaps we could instead synthesize or define a header with the
missing type definitions?  Assuming say CHAR_BIT, INT_MAX and LONG_MAX
are properly defined, we could easily define all of the relevant
types, and bail out if we encounter an unexpected situation (instead
of silently generating incorrect code, as using modes would do).

-- 
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]