diff --git a/components/utility/iconv/origin.patch b/components/utility/iconv/origin.patch index 59bc667de87be99bdc4a3b4d18e60ad7997669bf..f0dc76b2165085a052b70a827bf308ce55ffd5b6 100644 --- a/components/utility/iconv/origin.patch +++ b/components/utility/iconv/origin.patch @@ -1,541 +1,13 @@ -diff --git a/libiconv-1.14/include/iconv.h.in b/libiconv-1.14_modify/include/iconv.h.in -index 9dc3c1e..0b514c6 100644 ---- a/libiconv-1.14/include/iconv.h.in -+++ b/libiconv-1.14_modify/include/iconv.h.in -@@ -22,7 +22,13 @@ - #define _LIBICONV_H - - #define _LIBICONV_VERSION 0x010E /* version number: (major<<8) + minor */ --extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */ -+ -+#if 1 && BUILDING_LIBICONV -+#define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default"))) -+#else -+#define LIBICONV_DLL_EXPORTED -+#endif -+extern LIBICONV_DLL_EXPORTED int _libiconv_version; /* Likewise */ - - /* 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 -@@ -56,7 +62,7 @@ typedef void* iconv_t; - have EILSEQ in a different header. On these systems, define EILSEQ - ourselves. */ - #ifndef EILSEQ --#define EILSEQ @EILSEQ@ -+#define EILSEQ - #endif - - -@@ -70,7 +76,7 @@ extern "C" { - #ifndef LIBICONV_PLUG - #define iconv_open libiconv_open - #endif --extern iconv_t iconv_open (const char* tocode, const char* fromcode); -+extern LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode); - - /* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes - starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at -@@ -80,13 +86,13 @@ extern iconv_t iconv_open (const char* tocode, const char* fromcode); - #ifndef LIBICONV_PLUG - #define iconv libiconv - #endif --extern size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); -+extern LIBICONV_DLL_EXPORTED size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); - - /* Frees resources allocated for conversion descriptor ‘cd’. */ - #ifndef LIBICONV_PLUG - #define iconv_close libiconv_close - #endif --extern int iconv_close (iconv_t cd); -+extern LIBICONV_DLL_EXPORTED int iconv_close (iconv_t cd); - - - #ifdef __cplusplus -@@ -98,8 +104,8 @@ extern int iconv_close (iconv_t cd); - - /* Nonstandard extensions. */ - --#if @USE_MBSTATE_T@ --#if @BROKEN_WCHAR_H@ -+#if 1 -+#if 0 - /* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be -@@ -119,7 +125,7 @@ extern "C" { - A pointer to such an object can be used as an iconv_t. */ - typedef struct { - void* dummy1[28]; --#if @USE_MBSTATE_T@ -+#if 1 - mbstate_t dummy2; - #endif - } iconv_allocation_t; -@@ -128,12 +134,12 @@ typedef struct { - encoding ‘tocode’ into preallocated memory. Returns an error indicator - (0 or -1 with errno set). */ - #define iconv_open_into libiconv_open_into --extern int iconv_open_into (const char* tocode, const char* fromcode, -+extern LIBICONV_DLL_EXPORTED int iconv_open_into (const char* tocode, const char* fromcode, - iconv_allocation_t* resultp); - - /* Control of attributes. */ - #define iconvctl libiconvctl --extern int iconvctl (iconv_t cd, int request, void* argument); -+extern LIBICONV_DLL_EXPORTED int iconvctl (iconv_t cd, int request, void* argument); - - /* Hook performed after every successful conversion of a Unicode character. */ - typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data); -@@ -166,7 +172,7 @@ typedef void (*iconv_unicode_uc_to_mb_fallback) - void* callback_arg), - void* callback_arg, - void* data); --#if @HAVE_WCHAR_T@ -+#if 1 - /* Fallback function. Invoked when a number of bytes could not be converted to - a wide character. This function should process all bytes from inbuf and may - produce replacement wide characters by calling the write_replacement -@@ -213,14 +219,14 @@ struct iconv_fallbacks { - - /* Listing of locale independent encodings. */ - #define iconvlist libiconvlist --extern void iconvlist (int (*do_one) (unsigned int namescount, -+extern LIBICONV_DLL_EXPORTED void iconvlist (int (*do_one) (unsigned int namescount, - const char * const * names, - void* data), - void* data); - - /* Canonicalize an encoding name. - The result is either a canonical encoding name, or name itself. */ --extern const char * iconv_canonicalize (const char * name); -+extern LIBICONV_DLL_EXPORTED const char * iconv_canonicalize (const char * name); - - /* Support for relocatable packages. */ - -@@ -229,7 +235,7 @@ extern const char * iconv_canonicalize (const char * name); - by the corresponding pathname with the current prefix instead. Both - prefixes should be directory names without trailing slash (i.e. use "" - instead of "/"). */ --extern void libiconv_set_relocation_prefix (const char *orig_prefix, -+extern LIBICONV_DLL_EXPORTED void libiconv_set_relocation_prefix (const char *orig_prefix, - const char *curr_prefix); - - #ifdef __cplusplus -diff --git a/libiconv-1.14/lib/config.h.in b/libiconv-1.14_modify/lib/config.h.in -index 6db23e1..eaaf3a2 100644 ---- a/libiconv-1.14/lib/config.h.in -+++ b/libiconv-1.14_modify/lib/config.h.in -@@ -1,3 +1,4 @@ -+/* lib/config.h. Generated from config.h.in by configure. */ - /* Copyright (C) 1999-2003, 2005, 2007, 2010 Free Software Foundation, Inc. - This file is part of the GNU LIBICONV Library. - -@@ -18,54 +19,54 @@ - - - /* Define to 1 to enable a few rarely used encodings. */ --#undef ENABLE_EXTRA -+/* #undef ENABLE_EXTRA */ - - /* Define to 1 if the package shall run at any location in the filesystem. */ --#undef ENABLE_RELOCATABLE -+/* #undef ENABLE_RELOCATABLE */ - - /* Define to a type if does not define. */ --#undef mbstate_t -+/* #undef mbstate_t */ - - /* Define if you have , the iconv_t type, and the - iconv_open, iconv, iconv_close functions. */ --#undef HAVE_ICONV -+#define HAVE_ICONV 1 - /* Define as const if the declaration of iconv() needs const. */ --#define ICONV_CONST /* empty by default */ -+#define ICONV_CONST - - /* Define to 1 if you have the getc_unlocked() function. */ --#undef HAVE_GETC_UNLOCKED -+#define HAVE_GETC_UNLOCKED 1 - - /* Define if you have and nl_langinfo(CODESET). */ --#undef HAVE_LANGINFO_CODESET -+/* #undef HAVE_LANGINFO_CODESET */ - - /* Define if you have the mbrtowc() function. */ --#undef HAVE_MBRTOWC -+#define HAVE_MBRTOWC 1 - - /* Define to 1 if you have the setlocale() function. */ --#undef HAVE_SETLOCALE -+#define HAVE_SETLOCALE 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDDEF_H -+/* #undef HAVE_STDDEF_H */ - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDLIB_H -+#define HAVE_STDLIB_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_STRING_H -+#define HAVE_STRING_H 1 - - /* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ --#undef HAVE_VISIBILITY -+#define HAVE_VISIBILITY 1 - - /* Define if you have the wcrtomb() function. */ --#undef HAVE_WCRTOMB -+#define HAVE_WCRTOMB 1 - - /* Define to 1 if O_NOFOLLOW works. */ --#undef HAVE_WORKING_O_NOFOLLOW -+#define HAVE_WORKING_O_NOFOLLOW 0 - - /* Define if the machine's byte ordering is little endian. */ --#undef WORDS_LITTLEENDIAN -+#define WORDS_LITTLEENDIAN 1 - - /* Define to the value of ${prefix}, as a string. */ --#undef INSTALLPREFIX -+#define INSTALLPREFIX "" - -diff --git a/libiconv-1.14/lib/genaliases.c b/libiconv-1.14_modify/lib/genaliases.c -index b54b97d..a9d610e 100644 ---- a/libiconv-1.14/lib/genaliases.c -+++ b/libiconv-1.14_modify/lib/genaliases.c -@@ -56,6 +56,7 @@ static void emit_encoding (FILE* out1, FILE* out2, const char* const* names, siz - emit_alias(out1, *names, c_name); - } - -+#if 0 - int main () - { - FILE* stdout2; -@@ -102,3 +103,4 @@ int main () - exit(1); - exit(0); - } -+#endif -diff --git a/libiconv-1.14/lib/genaliases2.c b/libiconv-1.14_modify/lib/genaliases2.c -index 1b789ed..202b2e2 100644 ---- a/libiconv-1.14/lib/genaliases2.c -+++ b/libiconv-1.14_modify/lib/genaliases2.c -@@ -49,6 +49,7 @@ static void emit_encoding (FILE* out1, FILE* out2, const char* tag, const char* - emit_alias(out1, tag, *names, c_name); - } - -+#if 0 - int main (int argc, char* argv[]) - { - const char * tag = (argc > 1 ? argv[1] : "xxx"); -@@ -81,3 +82,5 @@ int main (int argc, char* argv[]) - exit(1); - exit(0); - } -+#endif -+ -diff --git a/libiconv-1.14/lib/genflags.c b/libiconv-1.14_modify/lib/genflags.c -index 448f892..85d96b2 100644 ---- a/libiconv-1.14/lib/genflags.c -+++ b/libiconv-1.14_modify/lib/genflags.c -@@ -73,6 +73,7 @@ static void emit_encoding (struct wctomb_funcs * ofuncs, const char* c_name) - } - } - -+#if 0 - int main () - { - int bitmask = 1; -@@ -112,3 +113,5 @@ int main () - exit(1); - exit(0); - } -+#endif -+ -diff --git a/libiconv-1.14/lib/gentranslit.c b/libiconv-1.14_modify/lib/gentranslit.c -index 0b2779c..fe665ba 100644 ---- a/libiconv-1.14/lib/gentranslit.c -+++ b/libiconv-1.14_modify/lib/gentranslit.c -@@ -21,6 +21,7 @@ - * containing lines of the form - * Unicode utf-8 replacement # comment - */ -+#if 0 - - #include - #include -@@ -256,3 +257,4 @@ int main (int argc, char *argv[]) - exit(1); - exit(0); - } -+#endif -\ No newline at end of file -diff --git a/libiconv-1.14/lib/iconv.c b/libiconv-1.14_modify/lib/iconv.c -index 3785296..291f7ba 100644 ---- a/libiconv-1.14/lib/iconv.c -+++ b/libiconv-1.14_modify/lib/iconv.c -@@ -22,7 +22,7 @@ - - #include - #include --#include "config.h" -+#include "lib/config.h" - #include "localcharset.h" - - #ifdef __CYGWIN__ -diff --git a/libiconv-1.14/lib/relocatable.c b/libiconv-1.14_modify/lib/relocatable.c -index a7bbd99..cd58b01 100644 ---- a/libiconv-1.14/lib/relocatable.c -+++ b/libiconv-1.14_modify/lib/relocatable.c -@@ -26,10 +26,10 @@ - #endif - - #define _GL_USE_STDLIB_ALLOC 1 --#include -+#include - - /* Specification. */ --#include "relocatable.h" -+#include "libiconv-1.14/lib/relocatable.h" - - #if ENABLE_RELOCATABLE - -diff --git a/libiconv-1.14/libcharset/config.h.in b/libiconv-1.14_modify/libcharset/config.h.in -index e96cb6f..ae47aff 100644 ---- a/libiconv-1.14/libcharset/config.h.in -+++ b/libiconv-1.14_modify/libcharset/config.h.in -@@ -1,110 +1,111 @@ -+/* config.h. Generated from config.h.in by configure. */ - /* config.h.in. Generated from configure.ac by autoheader. */ - - /* Define to 1 if the package shall run at any location in the filesystem. */ --#undef ENABLE_RELOCATABLE -+/* #undef ENABLE_RELOCATABLE */ - - /* Define to 1 if you have the header file. */ --#undef HAVE_DLFCN_H -+#define HAVE_DLFCN_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_INTTYPES_H -+#define HAVE_INTTYPES_H 1 - - /* Define if you have and nl_langinfo(CODESET). */ --#undef HAVE_LANGINFO_CODESET -+/* #undef HAVE_LANGINFO_CODESET */ - - /* Define to 1 if you have the header file. */ --#undef HAVE_MEMORY_H -+#define HAVE_MEMORY_H 1 - - /* Define to 1 if you have the `setlocale' function. */ --#undef HAVE_SETLOCALE -+#define HAVE_SETLOCALE 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDINT_H -+#define HAVE_STDINT_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDLIB_H -+#define HAVE_STDLIB_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_STRINGS_H -+#define HAVE_STRINGS_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_STRING_H -+#define HAVE_STRING_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_STAT_H -+#define HAVE_SYS_STAT_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TYPES_H -+#define HAVE_SYS_TYPES_H 1 - - /* Define to 1 if you have the header file. */ --#undef HAVE_UNISTD_H -+#define HAVE_UNISTD_H 1 - - /* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ --#undef HAVE_VISIBILITY -+#define HAVE_VISIBILITY 1 - - /* Define to 1 if O_NOATIME works. */ --#undef HAVE_WORKING_O_NOATIME -+#define HAVE_WORKING_O_NOATIME 0 - - /* Define to 1 if O_NOFOLLOW works. */ --#undef HAVE_WORKING_O_NOFOLLOW -+#define HAVE_WORKING_O_NOFOLLOW 0 - - /* Define to the value of ${prefix}, as a string. */ --#undef INSTALLPREFIX -+#define INSTALLPREFIX "" - - /* Define to the sub-directory in which libtool stores uninstalled libraries. - */ --#undef LT_OBJDIR -+#define LT_OBJDIR ".libs/" - - /* Define to the address where bug reports for this package should be sent. */ --#undef PACKAGE_BUGREPORT -+#define PACKAGE_BUGREPORT "" - - /* Define to the full name of this package. */ --#undef PACKAGE_NAME -+#define PACKAGE_NAME "" - - /* Define to the full name and version of this package. */ --#undef PACKAGE_STRING -+#define PACKAGE_STRING "" - - /* Define to the one symbol short name of this package. */ --#undef PACKAGE_TARNAME -+#define PACKAGE_TARNAME "" - - /* Define to the home page for this package. */ --#undef PACKAGE_URL -+#define PACKAGE_URL "" - - /* Define to the version of this package. */ --#undef PACKAGE_VERSION -+#define PACKAGE_VERSION "" - - /* Define to 1 if you have the ANSI C header files. */ --#undef STDC_HEADERS -+#define STDC_HEADERS 1 - - /* Enable extensions on AIX 3, Interix. */ - #ifndef _ALL_SOURCE --# undef _ALL_SOURCE -+# define _ALL_SOURCE 1 - #endif - /* Enable GNU extensions on systems that have them. */ - #ifndef _GNU_SOURCE --# undef _GNU_SOURCE -+# define _GNU_SOURCE 1 - #endif - /* Enable threading extensions on Solaris. */ - #ifndef _POSIX_PTHREAD_SEMANTICS --# undef _POSIX_PTHREAD_SEMANTICS -+# define _POSIX_PTHREAD_SEMANTICS 1 - #endif - /* Enable extensions on HP NonStop. */ - #ifndef _TANDEM_SOURCE --# undef _TANDEM_SOURCE -+# define _TANDEM_SOURCE 1 +diff --git a/libiconv-1.14/source/config.h b/libiconv-1.14/source/config.h +index f712155..191dc25 100644 +--- a/libiconv-1.14/source/config.h ++++ b/libiconv-1.14/source/config.h +@@ -391,7 +391,7 @@ #endif - /* Enable general extensions on Solaris. */ - #ifndef __EXTENSIONS__ --# undef __EXTENSIONS__ -+# define __EXTENSIONS__ 1 - #endif - - - /* Define to 1 if on MINIX. */ --#undef _MINIX -+/* #undef _MINIX */ - - /* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ --#undef _POSIX_1_SOURCE -+/* #undef _POSIX_1_SOURCE */ - - /* Define to 1 if you need to in order for `stat' and other things to work. */ --#undef _POSIX_SOURCE -+/* #undef _POSIX_SOURCE */ -diff --git a/libiconv-1.14/libcharset/configure b/libiconv-1.14_modify/libcharset/configure -old mode 100755 -new mode 100644 -diff --git a/libiconv-1.14/libcharset/include/localcharset.h.in b/libiconv-1.14_modify/libcharset/include/localcharset.h.in -index 129e4a4..bf2ce21 100644 ---- a/libiconv-1.14/libcharset/include/localcharset.h.in -+++ b/libiconv-1.14_modify/libcharset/include/localcharset.h.in -@@ -20,6 +20,12 @@ - #ifndef _LOCALCHARSET_H - #define _LOCALCHARSET_H - -+#if 1 && BUILDING_LIBCHARSET -+#define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default"))) -+#else -+#define LIBCHARSET_DLL_EXPORTED -+#endif -+ - - #ifdef __cplusplus - extern "C" { -@@ -31,7 +37,7 @@ extern "C" { - The result must not be freed; it is statically allocated. - If the canonical name cannot be determined, the result is a non-canonical - name. */ --extern const char * locale_charset (void); -+extern LIBCHARSET_DLL_EXPORTED const char * locale_charset (void); - - - #ifdef __cplusplus -diff --git a/libiconv-1.14/libcharset/lib/localcharset.c b/libiconv-1.14_modify/libcharset/lib/localcharset.c -index 3aceb42..e22b0a2 100644 ---- a/libiconv-1.14/libcharset/lib/localcharset.c -+++ b/libiconv-1.14_modify/libcharset/lib/localcharset.c -@@ -19,7 +19,8 @@ - - /* Written by Bruno Haible . */ - --#include -+#include -+#include - - /* Specification. */ - #include "localcharset.h" -@@ -30,6 +31,7 @@ - #include - #include - -+ - #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET - # define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ - #endif -@@ -68,7 +70,7 @@ - #endif - - #if ENABLE_RELOCATABLE --# include "relocatable.h" -+# include "libcharset/lib/relocatable.h" - #else - # define relocate(pathname) (pathname) - #endif -@@ -352,9 +354,6 @@ get_charset_aliases (void) - If the canonical name cannot be determined, the result is a non-canonical - name. */ - --#ifdef STATIC --STATIC --#endif - const char * - locale_charset (void) - { -diff --git a/libiconv-1.14/libcharset/lib/relocatable.c b/libiconv-1.14_modify/libcharset/lib/relocatable.c -index a7bbd99..3cf9884 100644 ---- a/libiconv-1.14/libcharset/lib/relocatable.c -+++ b/libiconv-1.14_modify/libcharset/lib/relocatable.c -@@ -26,10 +26,10 @@ - #endif - - #define _GL_USE_STDLIB_ALLOC 1 --#include -+#include - - /* Specification. */ --#include "relocatable.h" -+#include "libcharset/lib/relocatable.h" - #if ENABLE_RELOCATABLE + /* Define as a signed type of the same size as size_t. */ +-#define ssize_t int ++// #define ssize_t int + /* On Windows, variables that may be in a DLL must be marked specially. */ + #if defined _MSC_VER && defined _DLL