Chinaunix首页 | 论坛 | 博客
  • 博客访问: 515407
  • 博文数量: 81
  • 博客积分: 1438
  • 博客等级: 上尉
  • 技术积分: 866
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-12 11:32
文章分类

全部博文(81)

文章存档

2014年(1)

2013年(1)

2012年(33)

2011年(46)

分类: LINUX

2011-06-14 17:34:53

/* 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. */
  1. #undef iconv_t
  2. #define iconv_t libiconv_t
  3. typedef void* iconv_t;
 
可能会把系统自带的iconv.h的头文件包含进来,而没有包含自己编译环境中的iconv.h
所以在弄头文件的时候把编译环境中的iconv.h头文件的绝对路径写到头文件中去
阅读(3492) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~