This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Check LONG_MAX > INT_MAX for __WORDSIZE
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "H.J. Lu" <hongjiu dot lu at intel dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 12 Apr 2012 19:57:04 -0700
- Subject: Re: PATCH: Check LONG_MAX > INT_MAX for __WORDSIZE
- References: <20120413003117.GA24313@intel.com>
On 04/12/2012 05:31 PM, H.J. Lu wrote:
> This path includes <limits.h> and checks LONG_MAX > INT_MAX for this case.
There a namespace pollution problem here, unfortunately. For example,
because stdint.h includes bits/wordsize.h and the proposed change
would cause bits/wordsize.h to sometimes include limits.h, the
proposed change would cause <stdint.h> to sometimes #define MAX_CANON,
which is not at all what we want.
Also, I don't see how it works in general, since this would have
bits/wordsize.h include limits.h which includes bits/wordsize.h again,
and the whole thing is looking pretty incestuous, at least on some
platforms.