[PATCH][BUGFIX][PR 31932] cpp: Remove useless HAVE_ICONV_H [1/2]
Sergiy Vyshnevetskiy
serg@vostok.net
Fri May 18 19:02:00 GMT 2007
Parts of cpp are compiled without libiconv when it's present in the system
in a non-default location and --with-libiconv-prefix specified correctly.
The reason for this is usage of HAVE_ICONV_H macro in libcpp/internal.h
1. The check for iconv.h in libcpp/configure does not use the value of
--with-libiconv-prefix option.
2. HAVE_ICONV_H is useless because check for libiconv in libcpp/configure
uses iconv.h anyway.
3. HAVE_ICONV is changed in libcpp/internal.h like this:
#ifndef HAVE_ICONV_H
#undef HAVE_ICONV
#endif
which is inherently incorrect in and of itself: any information produced by
configure must not be changed in the source code. If configure tests don't
work right - fix them, but all source code must be compiled with the same
global settings.
Solution: get rid of HAVE_ICONV_H in libcpp/internal.h.
2007-05-18 Sergiy Vyshnevetskiy <serg@vostok.net>
PR propocessor/31932
* internal.h: Remove unnecessary usage of HAVE_ICONV_H
-------------- next part --------------
--- libcpp/internal.h.orig Fri Oct 21 20:54:20 2005
+++ libcpp/internal.h Sat May 12 21:47:11 2007
@@ -26,10 +26,6 @@
#include "symtab.h"
#include "cpp-id-data.h"
-#ifndef HAVE_ICONV_H
-#undef HAVE_ICONV
-#endif
-
#if HAVE_ICONV
#include <iconv.h>
#else
More information about the Gcc-patches
mailing list