bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t


From: Bruno Haible
Subject: Re: [bug-gnulib] Re: stdint_.h vs intmax_t & uintmax_t
Date: Mon, 9 Jan 2006 14:06:38 +0100
User-agent: KMail/1.5

Paul Eggert wrote on 2005-11-15:
> I'd like Bruno's opinion on all this before installing into gnulib.
> 
> 2005-11-14  Paul Eggert  <address@hidden>
> 
>       * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
>       (uintmax_t) [defined uintmax_t]: Do not declare.
>       (SIZE_MAX) [defined SIZE_MAX]: Do not define.
>       This works around a problem if intmax_t.m4 and/or uintmax_t.m4
>       and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.

Thanks for applying this patch while I was unavailable.

>  #ifdef _STDINT_H_HAVE_INT64
> +# ifndef intmax_t
>  typedef int64_t  intmax_t;
> +# endif
> +# ifndef uintmax_t
>  typedef uint64_t uintmax_t;
> +# endif

I'm worried that we arrive at a situation where
  sizeof (intmax_t) != sizeof (uintmax_t),
if the configure.ac has invoked gl_AC_TYPE_INTMAX_T but not gl_AC_TYPE_UINTMAX_T
or vice versa. I can see two solutions:
  a) Have gl_STDINT_H require gl_AC_TYPE_INTMAX_T and gl_AC_TYPE_UINTMAX_T.
  b) Merge gl_AC_TYPE_INTMAX_T and gl_AC_TYPE_UINTMAX_T into a single macro
     that defines intmax_t and uintmax_t simultaneously.
Which one is better?

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]