/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
errors because some other system header file includes /usr/include/iconv.h
which defines iconv_t or declares iconv after this file, 2. when compiling
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
binary compatible code.
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
has been installed in /usr/local/include, there is no way any more to
include the original /usr/include/iconv.h. We simply have to get away
without it.
Ad 1. The risk that a system header file does #include "iconv.h" or #include_next "iconv.h" is small. They all do #include .
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It has to be a scalar type because (iconv_t)(-1) is a possible return value from iconv_open().) */
/* Define iconv_t ourselves. */
- #undef iconv_t
- #define iconv_t libiconv_t
- typedef void* iconv_t;
可能会把系统自带的iconv.h的头文件包含进来,而没有包含自己编译环境中的iconv.h
所以在弄头文件的时候把编译环境中的iconv.h头文件的绝对路径写到头文件中去
阅读(3577) | 评论(0) | 转发(0) |