binutils/binutils: do not fwd declare struct stat (2.22).
For canadian cross to host i686-mingw32 fwd declaring
struct stat is not possible.
Instead #include <sys/stat.h>
Signed-off-by: Titus von Boxberg <titus@v9g.de>
Message-Id: <417a15d4277913841ddd.1353100974@tschetwerikow.boxberg.lan>
Patchwork-Id: 199733
1 From d75ad2e129b3f22296cead3db53c784527deab60 Mon Sep 17 00:00:00 2001
2 From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
3 Date: Fri, 18 Sep 2009 14:07:31 +0000
4 Subject: fix make {,install_}{,host}utils
6 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
8 diff --git a/extra/locale/programs/locale.c b/extra/locale/programs/locale.c
9 index 462a579..dfd2029 100644
10 --- a/extra/locale/programs/locale.c
11 +++ b/extra/locale/programs/locale.c
23 #ifdef __UCLIBC_HAS_GETOPT_LONG__
24 diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
25 index 290e680..3ce884d 100644
26 --- a/libc/misc/wchar/wchar.c
27 +++ b/libc/misc/wchar/wchar.c
28 @@ -171,7 +171,6 @@ extern size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
30 extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
31 const wchar_t **__restrict src, size_t wn) attribute_hidden;
34 /**********************************************************************/
36 @@ -1201,45 +1200,6 @@ typedef struct {
37 int skip_invalid_input; /* To support iconv -c option. */
47 -#include <byteswap.h>
49 -#if (__BYTE_ORDER != __BIG_ENDIAN) && (__BYTE_ORDER != __LITTLE_ENDIAN)
50 -#error unsupported endianness for iconv
53 -#ifndef __CTYPE_HAS_8_BIT_LOCALES
54 -#error currently iconv requires 8 bit locales
56 -#ifndef __CTYPE_HAS_UTF_8_LOCALES
57 -#error currently iconv requires UTF-8 locales
63 - IC_MULTIBYTE = 0xe0,
64 -#if __BYTE_ORDER == __BIG_ENDIAN
80 * bit 0 means swap endian
82 @@ -1247,8 +1207,13 @@ enum {
86 +#if defined L_iconv && defined _LIBC
87 +/* Used externally only by iconv utility */
88 extern const unsigned char __iconv_codesets[];
89 libc_hidden_proto(__iconv_codesets)
92 +#if defined L_iconv || defined L_iconv_main
93 const unsigned char __iconv_codesets[] =
94 "\x0a\xe0""WCHAR_T\x00" /* superset of UCS-4 but platform-endian */
95 #if __BYTE_ORDER == __BIG_ENDIAN
96 @@ -1281,7 +1246,48 @@ const unsigned char __iconv_codesets[] =
98 "\x0b\x01""US-ASCII\x00"
99 "\x07\x01""ASCII"; /* Must be last! (special case to save a nul) */
101 +#if defined L_iconv && defined _LIBC
102 libc_hidden_data_def(__iconv_codesets)
111 +#include <byteswap.h>
113 +#if (__BYTE_ORDER != __BIG_ENDIAN) && (__BYTE_ORDER != __LITTLE_ENDIAN)
114 +#error unsupported endianness for iconv
117 +#ifndef __CTYPE_HAS_8_BIT_LOCALES
118 +#error currently iconv requires 8 bit locales
120 +#ifndef __CTYPE_HAS_UTF_8_LOCALES
121 +#error currently iconv requires UTF-8 locales
127 + IC_MULTIBYTE = 0xe0,
128 +#if __BYTE_ORDER == __BIG_ENDIAN
143 /* Experimentally off - libc_hidden_proto(strcasecmp) */
145 @@ -1575,6 +1581,4 @@ size_t weak_function iconv(iconv_t cd, char **__restrict inbuf,