PATCH: Fix libcpp configury/portability issue
Gerald Pfeifer
gerald@pfeifer.com
Sun Oct 31 14:32:00 GMT 2004
On Sun, 31 Oct 2004, Zack Weinberg wrote:
> Try again with the second #ifdef being HAVE_ICONV, *not* HAVE_ICONV_H.
This leads to a build failure for GCJ:
In file included from .././..//gcc-4.0-20041024/gcc/java/parse.y:65:
.././..//gcc-4.0-20041024/gcc/java/lex.h:97: error: parse error before "iconv_t"
.././..//gcc-4.0-20041024/gcc/java/lex.h:97: warning: no semicolon at end of struct or union
.././..//gcc-4.0-20041024/gcc/java/lex.h:124: error: parse error before '}' token
Note that my simpler, original one-liner worked just fine. I'm still
willing to give patches a try and hack around, but I'm not sure whether
that's too productive given that I am not very familar with this code.
>> The *real* problem, I assume, is that we have several config.h file in
>> the include path -- intl/config.h versus libcpp/config.h.
> Yes. Maybe we should rename them so it's unambiguous.
Definitely. This is a complete and utter mess: two config.h files plus
auto-host.h, all containing definitions of HAVE_ICONV and HAVE_ICON_H
(though not all have both and the latter even is not consistent) is a
software engineering nightmare.
Gerald
Index: libcpp/internal.h
===================================================================
RCS file: /cvs/gcc/gcc/libcpp/internal.h,v
retrieving revision 1.7
diff -u -3 -p -r1.7 internal.h
--- internal.h 9 Sep 2004 19:16:55 -0000 1.7
+++ internal.h 30 Oct 2004 17:27:31 -0000
@@ -29,6 +29,7 @@ Foundation, 59 Temple Place - Suite 330,
#if defined HAVE_ICONV_H && defined HAVE_ICONV
#include <iconv.h>
#else
+#undef HAVE_ICONV
#define HAVE_ICONV 0
typedef int iconv_t; /* dummy */
#endif
More information about the Gcc-patches
mailing list