patches/uClibc/0.9.30.2/210-fix-make-install-host-utils.patch
changeset 1819 66fcfb3d6745
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/uClibc/0.9.30.2/210-fix-make-install-host-utils.patch	Sun Feb 28 11:50:15 2010 +0100
     1.3 @@ -0,0 +1,153 @@
     1.4 +From d75ad2e129b3f22296cead3db53c784527deab60 Mon Sep 17 00:00:00 2001
     1.5 +From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
     1.6 +Date: Fri, 18 Sep 2009 14:07:31 +0000
     1.7 +Subject: fix make {,install_}{,host}utils
     1.8 +
     1.9 +Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    1.10 +---
    1.11 +diff --git a/extra/locale/programs/locale.c b/extra/locale/programs/locale.c
    1.12 +index 462a579..dfd2029 100644
    1.13 +--- a/extra/locale/programs/locale.c
    1.14 ++++ b/extra/locale/programs/locale.c
    1.15 +@@ -10,10 +10,9 @@
    1.16 +  *
    1.17 +  */
    1.18 + 
    1.19 +-
    1.20 ++#include <string.h>
    1.21 + #include <stdio.h>
    1.22 + #include <stdlib.h>
    1.23 +-#include <string.h>
    1.24 + #include <langinfo.h>
    1.25 + #include <unistd.h>
    1.26 + #ifdef __UCLIBC_HAS_GETOPT_LONG__
    1.27 +diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
    1.28 +index 290e680..3ce884d 100644
    1.29 +--- a/libc/misc/wchar/wchar.c
    1.30 ++++ b/libc/misc/wchar/wchar.c
    1.31 +@@ -171,7 +171,6 @@ extern size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
    1.32 + 
    1.33 + extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
    1.34 + 					const wchar_t **__restrict src, size_t wn) attribute_hidden;
    1.35 +-
    1.36 + #endif /* _LIBC */
    1.37 + /**********************************************************************/
    1.38 + #ifdef L_btowc
    1.39 +@@ -1201,45 +1200,6 @@ typedef struct {
    1.40 + 	int skip_invalid_input;		/* To support iconv -c option. */
    1.41 + } _UC_iconv_t;
    1.42 + 
    1.43 +-
    1.44 +-
    1.45 +-#ifdef L_iconv
    1.46 +-
    1.47 +-#include <iconv.h>
    1.48 +-#include <string.h>
    1.49 +-#include <endian.h>
    1.50 +-#include <byteswap.h>
    1.51 +-
    1.52 +-#if (__BYTE_ORDER != __BIG_ENDIAN) && (__BYTE_ORDER != __LITTLE_ENDIAN)
    1.53 +-#error unsupported endianness for iconv
    1.54 +-#endif
    1.55 +-
    1.56 +-#ifndef __CTYPE_HAS_8_BIT_LOCALES
    1.57 +-#error currently iconv requires 8 bit locales
    1.58 +-#endif
    1.59 +-#ifndef __CTYPE_HAS_UTF_8_LOCALES
    1.60 +-#error currently iconv requires UTF-8 locales
    1.61 +-#endif
    1.62 +-
    1.63 +-
    1.64 +-enum {
    1.65 +-	IC_WCHAR_T = 0xe0,
    1.66 +-	IC_MULTIBYTE = 0xe0,
    1.67 +-#if __BYTE_ORDER == __BIG_ENDIAN
    1.68 +-	IC_UCS_4 =	0xec,
    1.69 +-	IC_UTF_32 = 0xe4,
    1.70 +-	IC_UCS_2 =	0xe2,
    1.71 +-	IC_UTF_16 = 0xea,
    1.72 +-#else
    1.73 +-	IC_UCS_4 =	0xed,
    1.74 +-	IC_UTF_32 = 0xe5,
    1.75 +-	IC_UCS_2 =	0xe3,
    1.76 +-	IC_UTF_16 = 0xeb,
    1.77 +-#endif
    1.78 +-	IC_UTF_8 = 2,
    1.79 +-	IC_ASCII = 1
    1.80 +-};
    1.81 +-
    1.82 + /* For the multibyte
    1.83 +  * bit 0 means swap endian
    1.84 +  * bit 1 means 2 byte
    1.85 +@@ -1247,8 +1207,13 @@ enum {
    1.86 +  *
    1.87 +  */
    1.88 + 
    1.89 ++#if defined L_iconv && defined _LIBC
    1.90 ++/* Used externally only by iconv utility */
    1.91 + extern const unsigned char __iconv_codesets[];
    1.92 + libc_hidden_proto(__iconv_codesets)
    1.93 ++#endif
    1.94 ++
    1.95 ++#if defined L_iconv || defined L_iconv_main
    1.96 + const unsigned char __iconv_codesets[] =
    1.97 + 	"\x0a\xe0""WCHAR_T\x00"		/* superset of UCS-4 but platform-endian */
    1.98 + #if __BYTE_ORDER == __BIG_ENDIAN
    1.99 +@@ -1281,7 +1246,48 @@ const unsigned char __iconv_codesets[] =
   1.100 + 	"\x08\x02""UTF-8\x00"
   1.101 + 	"\x0b\x01""US-ASCII\x00"
   1.102 + 	"\x07\x01""ASCII";			/* Must be last! (special case to save a nul) */
   1.103 ++#endif
   1.104 ++#if defined L_iconv && defined _LIBC
   1.105 + libc_hidden_data_def(__iconv_codesets)
   1.106 ++#endif
   1.107 ++
   1.108 ++
   1.109 ++#ifdef L_iconv
   1.110 ++
   1.111 ++#include <iconv.h>
   1.112 ++#include <string.h>
   1.113 ++#include <endian.h>
   1.114 ++#include <byteswap.h>
   1.115 ++
   1.116 ++#if (__BYTE_ORDER != __BIG_ENDIAN) && (__BYTE_ORDER != __LITTLE_ENDIAN)
   1.117 ++#error unsupported endianness for iconv
   1.118 ++#endif
   1.119 ++
   1.120 ++#ifndef __CTYPE_HAS_8_BIT_LOCALES
   1.121 ++#error currently iconv requires 8 bit locales
   1.122 ++#endif
   1.123 ++#ifndef __CTYPE_HAS_UTF_8_LOCALES
   1.124 ++#error currently iconv requires UTF-8 locales
   1.125 ++#endif
   1.126 ++
   1.127 ++
   1.128 ++enum {
   1.129 ++	IC_WCHAR_T = 0xe0,
   1.130 ++	IC_MULTIBYTE = 0xe0,
   1.131 ++#if __BYTE_ORDER == __BIG_ENDIAN
   1.132 ++	IC_UCS_4 =	0xec,
   1.133 ++	IC_UTF_32 = 0xe4,
   1.134 ++	IC_UCS_2 =	0xe2,
   1.135 ++	IC_UTF_16 = 0xea,
   1.136 ++#else
   1.137 ++	IC_UCS_4 =	0xed,
   1.138 ++	IC_UTF_32 = 0xe5,
   1.139 ++	IC_UCS_2 =	0xe3,
   1.140 ++	IC_UTF_16 = 0xeb,
   1.141 ++#endif
   1.142 ++	IC_UTF_8 = 2,
   1.143 ++	IC_ASCII = 1
   1.144 ++};
   1.145 + 
   1.146 + /* Experimentally off - libc_hidden_proto(strcasecmp) */
   1.147 + 
   1.148 +@@ -1575,6 +1581,4 @@ size_t weak_function iconv(iconv_t cd, char **__restrict inbuf,
   1.149 + 	}
   1.150 + 	return nrcount;
   1.151 + }
   1.152 +-
   1.153 + #endif
   1.154 +-
   1.155 +--
   1.156 +cgit v0.8.2.1