tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Portable type definitions for tools



On Wed, 10 Sep 2008, Joerg Sonnenberger wrote:
> can you please review the attached patch for configure.ac and friends?

I asume that this for src/tools/compat.

> Not included is configure itself as it is 300KB by itself due to the
> different version.

Are you using the nbautoconf that gets built with MKMAINTAINERTOOLS=YES ?

> The patch does three things:
> (a) It uses the normal autoconf macros to find or define if needed
> the various fixed size types, [u]intmax_t and [u]intptr_t.
> (b) It defines u_int{8,16,32,64}_t to uint{8,16,32,64}_t if the former
> don't exist.
> (c) Include strtoull, strtoimax and strtoumax if needed.

(a) and (c) look reasonable, in principle but I haven't dona a build
with your patch.  Why do you want (b)?

>  CPPFLAGS+=   -I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
> +             -I${.CURDIR}/../../common/lib/libc/stdlib \
>               -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64

Why do you need that "-I" flag?

> --- nbtool_config.h.in        19 Oct 2007 15:56:54 -0000      1.19
> +++ nbtool_config.h.in        10 Sep 2008 14:36:29 -0000
> @@ -1,6 +1,6 @@
>  /* nbtool_config.h.in.  Generated from configure.ac by autoheader.  */
>  
> -/*      $NetBSD: nbtool_config.h.in,v 1.19 2007/10/19 15:56:54 christos Exp 
> $    */
> +/*      $NetBSD: configure.ac,v 1.66 2007/10/19 15:56:54 christos Exp $    */

autofoo seems to have done something strange here.

> -/* Define if you have uint16_t, but not u_int16_t. */
> +/* Define u_int16 in terms of uint16_t. */
>  #undef u_int16_t

Do we have tools that rely on u_intNNT?  If so, I think we should fix
them to use uintNN_t instead, and rip these definitions out of the
compat headers.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index