[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overf
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows |
Date: |
Wed, 5 Nov 2003 12:34:40 +0100 |
User-agent: |
KMail/1.5 |
Paul Eggert wrote:
> That won't suffice. Many platforms have inttypes.h but not stdint.h.
> And there are many platforms where SIZE_MAX is put in some other
> header.
Really? SIZE_MAX is not defined at all in AIX, IRIX, HP-UX (except the
latest version of HP-UX where it's defined in <stdint.h>, as it should be),
OSF/1.
> For example, Solaris 9 puts it into <limits.h>.
Then let's #include <limits.h>. That's most likely all that is needed for
portability.
> I don't think we can easily find out all the variants in this area; it will
> be a porting hassle with no real payoff.
Being able to use a macro specified by ISO C 99 is "no real payoff" ??
> Then let's just use ((size_t) -1), without any macro. That won't
> collide with anything.
That would work, and I would take this approach if SIZE_MAX was not already
standardized. But since SIZE_MAX is in ISO C 99, I want to use it.
Bruno
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/03
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/03
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/04
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/04
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows,
Bruno Haible <=
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/05
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/06
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/06
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/10
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/10
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Simon Josefsson, 2003/11/19
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/19
- Re: [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/19
- Re: [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/19
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Simon Josefsson, 2003/11/19