patches/uClibc/0.9.30.2/210-fix-make-install-host-utils.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     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
     5 
     6 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
     7 ---
     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
    12 @@ -10,10 +10,9 @@
    13   *
    14   */
    15  
    16 -
    17 +#include <string.h>
    18  #include <stdio.h>
    19  #include <stdlib.h>
    20 -#include <string.h>
    21  #include <langinfo.h>
    22  #include <unistd.h>
    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,
    29  
    30  extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
    31  					const wchar_t **__restrict src, size_t wn) attribute_hidden;
    32 -
    33  #endif /* _LIBC */
    34  /**********************************************************************/
    35  #ifdef L_btowc
    36 @@ -1201,45 +1200,6 @@ typedef struct {
    37  	int skip_invalid_input;		/* To support iconv -c option. */
    38  } _UC_iconv_t;
    39  
    40 -
    41 -
    42 -#ifdef L_iconv
    43 -
    44 -#include <iconv.h>
    45 -#include <string.h>
    46 -#include <endian.h>
    47 -#include <byteswap.h>
    48 -
    49 -#if (__BYTE_ORDER != __BIG_ENDIAN) && (__BYTE_ORDER != __LITTLE_ENDIAN)
    50 -#error unsupported endianness for iconv
    51 -#endif
    52 -
    53 -#ifndef __CTYPE_HAS_8_BIT_LOCALES
    54 -#error currently iconv requires 8 bit locales
    55 -#endif
    56 -#ifndef __CTYPE_HAS_UTF_8_LOCALES
    57 -#error currently iconv requires UTF-8 locales
    58 -#endif
    59 -
    60 -
    61 -enum {
    62 -	IC_WCHAR_T = 0xe0,
    63 -	IC_MULTIBYTE = 0xe0,
    64 -#if __BYTE_ORDER == __BIG_ENDIAN
    65 -	IC_UCS_4 =	0xec,
    66 -	IC_UTF_32 = 0xe4,
    67 -	IC_UCS_2 =	0xe2,
    68 -	IC_UTF_16 = 0xea,
    69 -#else
    70 -	IC_UCS_4 =	0xed,
    71 -	IC_UTF_32 = 0xe5,
    72 -	IC_UCS_2 =	0xe3,
    73 -	IC_UTF_16 = 0xeb,
    74 -#endif
    75 -	IC_UTF_8 = 2,
    76 -	IC_ASCII = 1
    77 -};
    78 -
    79  /* For the multibyte
    80   * bit 0 means swap endian
    81   * bit 1 means 2 byte
    82 @@ -1247,8 +1207,13 @@ enum {
    83   *
    84   */
    85  
    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)
    90 +#endif
    91 +
    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[] =
    97  	"\x08\x02""UTF-8\x00"
    98  	"\x0b\x01""US-ASCII\x00"
    99  	"\x07\x01""ASCII";			/* Must be last! (special case to save a nul) */
   100 +#endif
   101 +#if defined L_iconv && defined _LIBC
   102  libc_hidden_data_def(__iconv_codesets)
   103 +#endif
   104 +
   105 +
   106 +#ifdef L_iconv
   107 +
   108 +#include <iconv.h>
   109 +#include <string.h>
   110 +#include <endian.h>
   111 +#include <byteswap.h>
   112 +
   113 +#if (__BYTE_ORDER != __BIG_ENDIAN) && (__BYTE_ORDER != __LITTLE_ENDIAN)
   114 +#error unsupported endianness for iconv
   115 +#endif
   116 +
   117 +#ifndef __CTYPE_HAS_8_BIT_LOCALES
   118 +#error currently iconv requires 8 bit locales
   119 +#endif
   120 +#ifndef __CTYPE_HAS_UTF_8_LOCALES
   121 +#error currently iconv requires UTF-8 locales
   122 +#endif
   123 +
   124 +
   125 +enum {
   126 +	IC_WCHAR_T = 0xe0,
   127 +	IC_MULTIBYTE = 0xe0,
   128 +#if __BYTE_ORDER == __BIG_ENDIAN
   129 +	IC_UCS_4 =	0xec,
   130 +	IC_UTF_32 = 0xe4,
   131 +	IC_UCS_2 =	0xe2,
   132 +	IC_UTF_16 = 0xea,
   133 +#else
   134 +	IC_UCS_4 =	0xed,
   135 +	IC_UTF_32 = 0xe5,
   136 +	IC_UCS_2 =	0xe3,
   137 +	IC_UTF_16 = 0xeb,
   138 +#endif
   139 +	IC_UTF_8 = 2,
   140 +	IC_ASCII = 1
   141 +};
   142  
   143  /* Experimentally off - libc_hidden_proto(strcasecmp) */
   144  
   145 @@ -1575,6 +1581,4 @@ size_t weak_function iconv(iconv_t cd, char **__restrict inbuf,
   146  	}
   147  	return nrcount;
   148  }
   149 -
   150  #endif
   151 -
   152 --
   153 cgit v0.8.2.1