+2010-11-20 Bruno Haible <bruno@clisp.org>
+
+ Port to uClibc.
+ * dcigettext.c (_nl_find_msg): Treat uClibc like a non-glibc platform.
+ * loadmsgcat.c (get_sysdep_segment_value): Likewise.
+
2010-11-20 Bruno Haible <bruno@clisp.org>
Ensure that <features.h> is included before __GLIBC__ is tested.
/* Implementation of the internal dcigettext function.
- Copyright (C) 1995-1999, 2000-2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
# if HAVE_ICONV
/* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
we want to use transliteration. */
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
+ && !defined __UCLIBC__) \
|| _LIBICONV_VERSION >= 0x0105
if (strchr (outcharset, '/') == NULL)
{
/* Test for a glibc specific printf() format directive flag. */
if (name[0] == 'I' && name[1] == '\0')
{
-#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#if defined _LIBC \
+ || ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) \
+ && !defined __UCLIBC__)
/* The 'I' flag, in numeric format directives, replaces ASCII digits
with the 'outdigits' defined in the LC_CTYPE locale facet. This is
used for Farsi (Persian), some Indic languages, and maybe Arabic. */
+2010-11-20 Bruno Haible <bruno@clisp.org>
+
+ Port to uClibc.
+ * write-po.c (wrap): Treat uClibc like a non-glibc platform.
+ * format-c-parse.h (HANDLE_I_FLAG): Likewise.
+ * po-charset.c (po_lex_charset_set): Likewise.
+ * recode-sr-latin.c (process): Likewise.
+ * x-python.c (set_current_file_source_encoding): Likewise.
+ * xgettext.c (main): Likewise.
+
2010-11-13 Ihar Hrachyshka <ihar.hrachyshka@gmail.com> (tiny change)
* plural-table.c (plural_table): Added Belarusian, copied from Russian
/* Parsing C format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009-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
/* The 'I' flag can only occur in glibc >= 2.2. On other platforms, gettext()
filters it away even if it is present in the msgstr in the .mo file. */
# define HANDLE_I_FLAG \
- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
+ ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) \
+ && !defined __UCLIBC__)
#else
# define HANDLE_I_FLAG 1
#endif
/* Charset handling while reading PO files.
- Copyright (C) 2001-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 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
/* Use iconv() to parse multibyte characters. */
#if HAVE_ICONV
/* Avoid glibc-2.1 bug with EUC-KR. */
-# if (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) && !defined _LIBICONV_VERSION
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ && !defined _LIBICONV_VERSION
if (strcmp (po_lex_charset, "EUC-KR") == 0)
po_lex_iconv = (iconv_t)(-1);
else
/* Recode Serbian text from Cyrillic to Latin script.
- 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
{
#if HAVE_ICONV
/* Avoid glibc-2.1 bug with EUC-KR. */
-# if (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) && !defined _LIBICONV_VERSION
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ && !defined _LIBICONV_VERSION
if (strcmp (locale_code, "EUC-KR") != 0)
# endif
{
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1998, 2000-2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2010 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
conv = (iconv_t)(-1);
else
/* Avoid glibc-2.1 bug with EUC-KR. */
-# if (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) && !defined _LIBICONV_VERSION
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ && !defined _LIBICONV_VERSION
if (strcmp (canon_charset, "EUC-KR") == 0)
conv = (iconv_t)(-1);
else
/* xgettext Python backend.
- Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
iconv_t cd;
/* Avoid glibc-2.1 bug with EUC-KR. */
-# if (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) && !defined _LIBICONV_VERSION
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ && !defined _LIBICONV_VERSION
if (strcmp (xgettext_current_file_source_encoding, "EUC-KR") == 0)
cd = (iconv_t)(-1);
else
iconv_t cd;
/* Avoid glibc-2.1 bug with EUC-KR. */
-# if (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) && !defined _LIBICONV_VERSION
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ && !defined _LIBICONV_VERSION
if (strcmp (xgettext_global_source_encoding, "EUC-KR") == 0)
cd = (iconv_t)(-1);
else
+2010-11-20 Bruno Haible <bruno@clisp.org>
+
+ Port to uClibc.
+ * gettext-6-prg.c: Treat uClibc like a non-glibc platform.
+ * gettext-7-prg.c: Likewise.
+ * format-c-5-prg.c: Likewise.
+
2010-08-31 Bruno Haible <bruno@clisp.org>
Avoid test leftovers on MacOS X 10.5.
/* Test program, used by the format-c-5 test.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "xsetenv.h"
/* For %Id to work, we need the real setlocale(), not the fake one. */
-#if !(__GLIBC__ >= 2)
+#if !(__GLIBC__ >= 2 && !defined __UCLIBC__)
# include "setlocale.c"
#endif
s = gettext ("father of %d children");
en = "father of %d children";
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__
expected_translation = "Vater von %Id Kindern";
expected_result = "Vater von \xdb\xb5 Kindern";
#else
/* Test program, used by the gettext-6 test.
- Copyright (C) 2005-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <string.h>
-#if USE_POSIX_THREADS && (__GLIBC__ >= 2 || (defined __APPLE__ && defined __MACH__)) && HAVE_USELOCALE
+#if USE_POSIX_THREADS && ((__GLIBC__ >= 2 && !defined __UCLIBC__) || (defined __APPLE__ && defined __MACH__)) && HAVE_USELOCALE
#include <pthread.h>
/* Test program, used by the gettext-7 test.
- Copyright (C) 2005-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <string.h>
-#if USE_POSIX_THREADS && (__GLIBC__ >= 2 || (defined __APPLE__ && defined __MACH__)) && HAVE_USELOCALE
+#if USE_POSIX_THREADS && ((__GLIBC__ >= 2 && !defined __UCLIBC__) || (defined __APPLE__ && defined __MACH__)) && HAVE_USELOCALE
#include <pthread.h>
+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.
/* 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.
/* Specification. */
#include "basename.h"
-#if !(__GLIBC__ >= 2)
+#if !(__GLIBC__ >= 2 || defined __UCLIBC__)
#include <stdio.h>
#include <assert.h>
/* 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
#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 *);
/* 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
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
/* 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;
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):