[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stdint and cygwin bug
From: |
Bruno Haible |
Subject: |
Re: stdint and cygwin bug |
Date: |
Fri, 6 Apr 2007 03:22:35 +0200 |
User-agent: |
KMail/1.5.4 |
Paul Eggert wrote:
> How about this instead? It seems like a more-complete check.
>
> int check_WINT: (((wint_t) -1 < 0
> ? WINT_MIN + WINT_MAX - 1 < 0
> : WINT_MIN == 0 && WINT_MAX == (wint_t) -1)
> ? 1 : -1);
The checks in the autoconf macros don't need to be complete. They only
need to catch all known bugs on existing platforms. Our detector against
future surprises is the unit test, which not only "more complete" but really
complete:
verify (TYPE_MINIMUM (wint_t) == WINT_MIN);
verify (TYPE_MAXIMUM (wint_t) == WINT_MAX);
verify_same_types (WINT_MIN, (wint_t) 0 + 0);
verify_same_types (WINT_MAX, (wint_t) 0 + 0);
In other words, I find a 1-line expression nicer than a 4-line expression,
and if it leads to the same autoconf macro results on all existing platform,
why not keep it?
Bruno
- stdint and cygwin bug, Eric Blake, 2007/04/03
- Re: stdint and cygwin bug, Paul Eggert, 2007/04/03
- Re: stdint and cygwin bug, Eric Blake, 2007/04/04
- Re: stdint and cygwin bug, Bruno Haible, 2007/04/04
- Re: stdint and cygwin bug, Eric Blake, 2007/04/04
- Re: stdint and cygwin bug, Paul Eggert, 2007/04/05
- Re: stdint and cygwin bug, Eric Blake, 2007/04/05
- Re: stdint and cygwin bug, Paul Eggert, 2007/04/05
- Re: stdint and cygwin bug,
Bruno Haible <=