This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Fix libcpp configury/portability issue


Gerald Pfeifer <gerald@pfeifer.com> writes:

> On Sat, 30 Oct 2004, Zack Weinberg wrote:
>>>   2004-10-30  Gerald Pfeifer  <gerald@pfeifer.com>
>>>
>>> 	* internal.h (HAVE_ICONV): #undef, before redefining.
>> Uh, how did you get to that point with HAVE_ICONV defined in the first
>> place?
>
> This happens if HAVE_ICONV is defined, but not HAVE_ICONV_H.  For example,
> this happens if intl/config.h is included instead of libcpp/config.h, and
> indeed that seems to happen.
>
> I do not have the environment of the original, broken build left, but
> verified that this indeed can happen; consider the following from one
> of my nightly builders:
>
>   .... -I./../intl -I/sw/test/gcc/cvs/gcc/../libcpp/include ....

Hmm.  I think I'd prefer

#ifndef HAVE_ICONV_H
#undef HAVE_ICONV
#endif

#ifdef HAVE_ICONV
#include <iconv.h>
#else
#define HAVE_ICONV 0
...
#endif

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]