libiconv: add external var _libiconv_version
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 22 Dec 2010 01:56:37 +0000 (01:56 +0000)
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 22 Dec 2010 01:56:37 +0000 (01:56 +0000)
This is needed by php5 and also provieded by the libiconv-full

git-svn-id: svn://svn.openwrt.org/openwrt/packages@24775 3c298f89-4303-0410-b956-a3cf2f4a3e73

libs/libiconv/Makefile
libs/libiconv/src/iconv.c
libs/libiconv/src/include/iconv.h

index ccce71d..d51b47f 100644 (file)
@@ -27,7 +27,7 @@ define Build/Configure
 endef
 
 define Build/Compile
-       $(TARGET_CC) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o
+       $(TARGET_CC) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include
        $(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
 endef
 
index 5834f61..e85b99a 100644 (file)
@@ -3,8 +3,9 @@
  */
 
 #include <stddef.h>
+#include <iconv.h>
 
-typedef void *iconv_t;
+int _libiconv_version = _LIBICONV_VERSION;
 
 iconv_t iconv_open (const char *tocode, const char *fromcode)
 {
index bca749a..29c2d2a 100644 (file)
@@ -5,6 +5,9 @@
 #ifndef _ICONV_H
 #define _ICONV_H 1
 
+#define _LIBICONV_VERSION 0x010B    /* version number: (major<<8) + minor */
+extern  int _libiconv_version; /* Likewise */
+
 #include <stddef.h>
 
 typedef void *iconv_t;