diff options
author | Bruno Haible <bruno@clisp.org> | 2010-11-21 03:04:18 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-06-07 23:38:50 +0200 |
commit | 5728f8ee0a4e39b9856e845dd8bef07aff972186 (patch) | |
tree | f8e8c999297a657fdbaeded93d37762b7c7e4625 /gnulib-local | |
parent | fcf60b8042fa8826ccfb183ff3c1643bdb4df316 (diff) | |
download | external_gettext-5728f8ee0a4e39b9856e845dd8bef07aff972186.zip external_gettext-5728f8ee0a4e39b9856e845dd8bef07aff972186.tar.gz external_gettext-5728f8ee0a4e39b9856e845dd8bef07aff972186.tar.bz2 |
Port to uClibc.
Diffstat (limited to 'gnulib-local')
-rw-r--r-- | gnulib-local/ChangeLog | 8 | ||||
-rw-r--r-- | gnulib-local/lib/basename.c | 4 | ||||
-rw-r--r-- | gnulib-local/lib/basename.h | 4 | ||||
-rw-r--r-- | gnulib-local/lib/iconv-ostream.oo.c | 13 |
4 files changed, 21 insertions, 8 deletions
diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index 82049d2..b8aae74 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,6 +1,14 @@ 2010-11-20 Bruno Haible <bruno@clisp.org> Port to uClibc. + * lib/basename.h: Treat uClibc like glibc. + * lib/basename.c: Likewise. + * lib/iconv-ostream.oo.c (iconv_ostream::write_mem, + iconv_ostream::free, iconv_ostream_create): Likewise. + +2010-11-20 Bruno Haible <bruno@clisp.org> + + Port to uClibc. * lib/gettext.h: Treat uClibc like a non-glibc platform. Reported by Mike Frysinger <vapier@gentoo.org>. diff --git a/gnulib-local/lib/basename.c b/gnulib-local/lib/basename.c index 76ed121..dcab5e7 100644 --- a/gnulib-local/lib/basename.c +++ b/gnulib-local/lib/basename.c @@ -1,5 +1,5 @@ /* Return the name-within-directory of a file name. - Copyright (C) 1996-1999, 2000-2002, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 1996-1999, 2000-2002, 2004, 2006, 2010 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. @@ -22,7 +22,7 @@ /* Specification. */ #include "basename.h" -#if !(__GLIBC__ >= 2) +#if !(__GLIBC__ >= 2 || defined __UCLIBC__) #include <stdio.h> #include <assert.h> diff --git a/gnulib-local/lib/basename.h b/gnulib-local/lib/basename.h index b3e4d49..908cc3e 100644 --- a/gnulib-local/lib/basename.h +++ b/gnulib-local/lib/basename.h @@ -1,5 +1,5 @@ /* Pathname hacking. - Copyright (C) 2001-2003 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2010 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ extern "C" { #endif -#if !(__GLIBC__ >= 2) +#if !(__GLIBC__ >= 2 || defined __UCLIBC__) /* When not using the GNU libc we use the basename implementation we provide here. */ extern char *gnu_basename (const char *); diff --git a/gnulib-local/lib/iconv-ostream.oo.c b/gnulib-local/lib/iconv-ostream.oo.c index 6536685..c33c53a 100644 --- a/gnulib-local/lib/iconv-ostream.oo.c +++ b/gnulib-local/lib/iconv-ostream.oo.c @@ -1,5 +1,5 @@ /* Output stream that converts the output to another encoding. - Copyright (C) 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2010 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. This program is free software: you can redistribute it and/or modify @@ -98,7 +98,8 @@ iconv_ostream::write_mem (iconv_ostream_t stream, const void *data, size_t len) size_t res = iconv (stream->cd, (ICONV_CONST char **) &inptr, &insize, &outptr, &outsize); - #if !defined _LIBICONV_VERSION && !defined __GLIBC__ + #if !defined _LIBICONV_VERSION \ + && !(defined __GLIBC__ && !defined __UCLIBC__) /* Irix iconv() inserts a NUL byte if it cannot convert. NetBSD iconv() inserts a question mark if it cannot convert. Only GNU libiconv and GNU libc are known to prefer to fail rather @@ -152,7 +153,9 @@ iconv_ostream::free (iconv_ostream_t stream) /* Avoid glibc-2.1 bug and Solaris 2.7 bug. */ #if defined _LIBICONV_VERSION \ - || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun) + || !(((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) \ + && !defined __UCLIBC__) \ + || defined __sun) { char outbuffer[2048]; char *outptr = outbuffer; @@ -188,7 +191,9 @@ iconv_ostream_create (const char *from_encoding, const char *to_encoding, stream->to_encoding = xstrdup (to_encoding); /* Avoid glibc-2.1 bug with EUC-KR. */ - #if (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) && !defined _LIBICONV_VERSION + #if ((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) \ + && !defined __UCLIBC__) \ + && !defined _LIBICONV_VERSION if (c_strcasecmp (from_encoding, "EUC-KR") == 0 || c_strcasecmp (to_encoding, "EUC-KR") == 0) stream->cd = (iconv_t)(-1): |