This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: shs.cc won't build on Solaris 2.5/sparc
Alexandre Oliva <aoliva@redhat.com> writes:
> It's the C99 Standard way to do it, yes. But not all systems are
> C99-compliant yet.
Hrm, I'd prefer to see automake/autoconf 'help' these platforms
pretend to be C99 compliant =)
> In fact, there's no guarantee that any system will have a type that
> is a 32-bit wide int.
Sure; on those systems I'd expect uint32_t to be undefined, so you get
compiler errors when you try to compile something that demands a
32-bit int.
> More to the point: uint32_t is not available on all platforms. A
> quick hack could define uint32_t as follows:
>
> #if ! HAVE_UINT32_T /* must check for it with autoconf */
> # if INT_MAX == 0x7fffffff && INT_MIN == 0x80000000
> typedef unsigned int uint32_t;
> # elif LONG_MAX = 0x7fffffff && LONG_MAX == 0x80000000
> typedef unsigned long uint32_t;
> # else
> # error "no 32-bit wide int type found"
> # endif
> #endif
Hrm, could autoconf/automake put stuff like this into config.h when
required?
- a
--
"If I put copyrighted material into the 'chewy nougat center', I can
claim the crunchy chocolate coating is an 'Access Control
Mechanism'." --lynx_user_abroad