Subject: Re: tales of woe from the recent tools/compat_defs.h pullups on netbsd-1-6
To: NetBSD Toolchain Technical Discussion List <tech-toolchain@NetBSD.org>
From: Greg A. Woods <woods@weird.com>
List: tech-toolchain
Date: 06/25/2004 16:22:49
[ On Monday, June 21, 2004 at 20:49:20 (-0500), James Chacon wrote: ]
> Subject: Re: tales of woe from the recent tools/compat_defs.h pullups on netbsd-1-6
>
> Try pulling rev 1.40 of tools/compat/compat_defs.h into your tree.
> 
> I'm testing it on the 1.6 branch now and will get it pulled up provided nothing
> breaks.

I have not tried it yet, but it looks like it will mostly work.

It won't work on any hosting platform that doesn't provide strtoll() or
"long long" though (assuming something outside of my own changes does
need strtoq() or strtouq()).  The configure.in should probably also do:

	AC_CHECK_TYPES([long long, unsigned long long])

and then do something appropriate with any failure of that test.

Also for GNU Autoconf the CPP test should be "#ifndef HAVE_U_QUAD_T".

Note too that as far as I can tell nothing in C99 really requires that
sizeof(u_quad_t) be the same as sizeof(unsigned long long), i.e. that
"unsigned long long" be restricted to a 64-bit representation (otherwise
we'd only have one implementation of strtoll() in NetBSD's libc too,
instead of a nearly identical one being called strtoq() :-).  Of course
this won't likely break anything until someone tries to build NetBSD on
a 128-bit machine (and assuming some build tool does need strtoq() or
strtouq() at the time).  :-)

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>