+2010-11-20 Bruno Haible <bruno@clisp.org>
+
+ Port to uClibc.
+ * lib/relocatable.c (find_shared_library_fullname): Treat uClibc like
+ glibc.
+ * lib/strerror_r.c: Likewise.
+ * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
+ * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
+ * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise.
+ * m4/glibc21.m4 (gl_GLIBC21): Likewise.
+ * tests/test-sigaction.c (handler, main): Likewise.
+ * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL):
+ Treat uClibc like a non-glibc platform.
+ * lib/propername.c (proper_name_utf8): Likewise.
+ * lib/spawn.in.h: Likewise.
+ * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): Likewise.
+ * lib/striconveh.c (iconveh_open, iconv_carefully, iconv_carefully_1,
+ mem_cd_iconveh_internal): Likewise.
+ * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise.
+ * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
+ strstr, strcasestr): Likewise.
+ * lib/unicodeio.c (unicode_to_mb): Likewise.
+ * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
+ * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
+ * m4/glibc2.m4 (gt_GLIBC2): Likewise.
+ * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Likewise.
+ * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Likewise.
+ * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise.
+ * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR):
+ Likewise.
+ * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
+ * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
+ * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
+ * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
+ * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
+ * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
+ * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
+ * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
+ * tests/test-getopt.h (OPTIND_MIN): Likewise.
+ * tests/test-striconveha.c (main): Likewise.
+ * doc/posix-functions/getdelim.texi: Mention an uClibc bug.
+ * doc/posix-functions/getline.texi: Likewise.
+ Reported by Mike Frysinger <vapier@gentoo.org>.
+
2010-11-20 Bruno Haible <bruno@clisp.org>
nproc: Fix condition.
Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
Testing __ELF__ guarantees the ELF object format.
Testing __GNUC__ is necessary for the compound expression syntax. */
-# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
+# if (defined __GLIBC__ || defined __UCLIBC__) && defined __ELF__ && defined __GNUC__
# define GL_LINK_WARNING(message) \
GL_LINK_WARNING1 (__FILE__, __LINE__, message)
# define GL_LINK_WARNING1(file, line, message) \
Portability problems not fixed by Gnulib:
@itemize
+@item
+This function has quadratic running time for long lines on some platforms:
+uClibc 0.9.31.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
+@item
+This function has quadratic running time for long lines on some platforms:
+uClibc 0.9.31.
@end itemize
extern "C" { ... } block, which leads to errors in C++ mode with the
overridden <sys/stat.h> from gnulib. These errors are known to be gone
with g++ version >= 4.3. */
-#if !defined __GLIBC__ || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
# include <sys/stat.h>
#endif
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
/* Don't use glibc's __freading function in glibc < 2.7, see
<http://sourceware.org/bugzilla/show_bug.cgi?id=4359> */
-#if !(HAVE___FREADING && (!defined __GLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)))
+#if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)))
bool
freading (FILE *fp)
STREAM must not be wide-character oriented. */
-#if HAVE___FREADING && (!defined __GLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
+#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7 */
# include <stdio_ext.h>
it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include <cstdlib>
-# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
# include <libintl.h>
# endif
#endif
#ifdef __GLIBC__
# define GLIBC_VERSION __GLIBC__
+#elif defined __UCLIBC__
+# define GLIBC_VERSION 2
#else
# define GLIBC_VERSION 0
#endif
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
{
-# if __GLIBC__ >= 2
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
/* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
glibc < 2.12.
See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
However it does not specify the exact format. Neither do SUSV2 and
ISO C 99. So we can use this feature only on selected systems (e.g.
those using GNU C Library). */
-#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2)
+#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
# define HAVE_LOCALE_NULL
#endif
/* Here m > 0. */
-# if __GLIBC__
+# if __GLIBC__ || defined __UCLIBC__
/* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
mbtowc (NULL, NULL, 0);
# endif
dp->flags |= FLAG_ZERO;
cp++;
}
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
else if (*cp == 'I')
{
dp->flags |= FLAG_LOCALIZED;
#define FLAG_SPACE 8 /* space flag */
#define FLAG_ALT 16 /* # flag */
#define FLAG_ZERO 32
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
# define FLAG_LOCALIZED 64 /* I flag, uses localized digits */
#endif
name_converted = alloc_name_converted =
xstr_iconv (name_utf8, "UTF-8", locale_code);
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
+ && !defined __UCLIBC__) \
|| _LIBICONV_VERSION >= 0x0105
{
char *converted_translit;
static void
find_shared_library_fullname ()
{
-#if defined __linux__ && __GLIBC__ >= 2
- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
+#if defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)
+ /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
+ function. */
FILE *fp;
/* Open the current process' maps file. It describes one VMA per line. */
/* Get definitions of 'struct sched_param' and 'sigset_t'.
But avoid namespace pollution on glibc systems. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <sched.h>
# include <signal.h>
#endif
#include <errno.h>
-#if HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2) && !EXTEND_STRERROR_R
+#if HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__) && !EXTEND_STRERROR_R
/* The system's strerror_r function is OK, except that its third argument
is 'int', not 'size_t'. */
return (ret < 0 ? errno : ret);
}
-#elif __GLIBC__ >= 2 && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4 */ && !EXTEND_STRERROR_R
+#elif (__GLIBC__ >= 2 || defined __UCLIBC__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4 */ && !EXTEND_STRERROR_R
int
strerror_r (int errnum, char *buf, size_t buflen)
return (ret < 0 ? errno : 0);
}
-#else /* (__GLIBC__ >= 2 ? !HAVE___XPG_STRERROR_R : !HAVE_DECL_STRERROR_R) || EXTEND_STRERROR_R */
+#else /* (__GLIBC__ >= 2 || defined __UCLIBC__ ? !HAVE___XPG_STRERROR_R : !HAVE_DECL_STRERROR_R) || EXTEND_STRERROR_R */
# include "glthread/lock.h"
/* Charset conversion.
- Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
/* Set to the initial state. */
iconv (cd, NULL, NULL, NULL, NULL);
# endif
else
return -1;
}
-# 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__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
{
char *outptr = tmpbuf;
size_t outsize = tmpbufsize;
/* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
/* Return to the initial state. */
iconv (cd, NULL, NULL, NULL, NULL);
# endif
else
goto fail;
}
-# 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__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
{
size_t res = iconv (cd, NULL, NULL, &outptr, &outsize);
to a trailing NUL byte in the output. But not for UTF-7. So that this
function is usable for UTF-7, we have to exclude the NUL byte from the
conversion and add it by hand afterwards. */
-# 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-2.9 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
/* Set to the initial state. */
iconv (cd, NULL, NULL, NULL, NULL);
# endif
}
/* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
for (;;)
{
/* Here outptr + outbytes_remaining = result + result_size - 1. */
char *result;
/* 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 (c_strcasecmp (from_codeset, "EUC-KR") == 0
|| c_strcasecmp (to_codeset, "EUC-KR") == 0)
{
iconv_t cd2;
/* 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 (c_strcasecmp (from_codeset, "EUC-KR") == 0
|| c_strcasecmp (to_codeset, "EUC-KR") == 0)
{
}
if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0)
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
+ && !defined __UCLIBC__) \
+ || _LIBICONV_VERSION >= 0x0105
|| c_strcasecmp (to_codeset, "UTF-8//TRANSLIT") == 0
# endif
)
/* iconv_carefully is like iconv, except that it stops as soon as it encounters
a conversion error, and it returns in *INCREMENTED a boolean telling whether
it has incremented the input pointers past the error location. */
-# 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
*inbuf = inptr;
*inbytesleft = inptr_end - inptr;
-# 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-2.9 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
/* Set to the initial state. */
iconv (cd, NULL, NULL, NULL, NULL);
# endif
/* Now get the conversion state back to the initial state.
But avoid glibc-2.1 bug and Solaris 2.7 bug. */
#if defined _LIBICONV_VERSION \
- || !((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
for (;;)
{
char *outptr = result + length;
/* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
/* Set to the initial state. */
if (cd1 != (iconv_t)(-1))
iconv (cd1, NULL, NULL, NULL, NULL);
/* Now get the conversion state of CD1 back to the initial state.
But avoid glibc-2.1 bug and Solaris 2.7 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
if (cd1 != (iconv_t)(-1))
res1 = iconv (cd1, NULL, NULL, &out1ptr, &out1size);
else
/* Now get the conversion state of CD1 back to the initial
state. But avoid glibc-2.1 bug and Solaris 2.7 bug. */
# if defined _LIBICONV_VERSION \
- || !((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) || defined __sun)
+ || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
+ || defined __sun)
if (cd2 != (iconv_t)(-1))
res2 = iconv (cd2, NULL, NULL, &out2ptr, &out2size);
else
}
length = out2ptr - result;
}
-# 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.
/* Character set conversion with error handling and autodetection.
- Copyright (C) 2002, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify
/* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
we want to use transliteration. */
-#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+#if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
+ && !defined __UCLIBC__) \
+ || _LIBICONV_VERSION >= 0x0105
if (transliterate)
{
int retval;
/* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
we want to use transliteration. */
-#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+#if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
+ && !defined __UCLIBC__) \
+ || _LIBICONV_VERSION >= 0x0105
if (transliterate)
{
char *result;
void *, (void const *__s, int __c, size_t __n),
void const *, (void const *__s, int __c, size_t __n));
# endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
_GL_CXXALIASWARN1 (memchr, void const *,
_GL_CXXALIAS_SYS_CAST2 (memrchr,
void *, (void const *, int, size_t),
void const *, (void const *, int, size_t));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
_GL_CXXALIAS_SYS_CAST2 (rawmemchr,
void *, (void const *__s, int __c_in),
void const *, (void const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
_GL_CXXALIAS_SYS_CAST2 (strchrnul,
char *, (char const *__s, int __c_in),
char const *, (char const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
_GL_CXXALIAS_SYS_CAST2 (strpbrk,
char *, (char const *__s, char const *__accept),
const char *, (char const *__s, char const *__accept));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
_GL_CXXALIASWARN1 (strpbrk, char const *,
char *, (const char *haystack, const char *needle),
const char *, (const char *haystack, const char *needle));
# endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
_GL_CXXALIASWARN1 (strstr, const char *,
char *, (const char *haystack, const char *needle),
const char *, (const char *haystack, const char *needle));
# endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
_GL_CXXALIASWARN1 (strcasestr, const char *,
/* Avoid glibc-2.1 bug and Solaris 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)
/* Get back to the initial shift state. */
res = iconv (utf8_to_local, NULL, NULL, &outptr, &outbytesleft);
#include "unistr.h"
/* Name of UTF-16 encoding with machine dependent endianness and alignment. */
-#if defined _LIBICONV_VERSION || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#if defined _LIBICONV_VERSION || (((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__)
# ifdef WORDS_BIGENDIAN
# define UTF16_NAME "UTF-16BE"
# else
#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
/* Name of UTF-16 encoding with machine dependent endianness and alignment. */
-#if defined _LIBICONV_VERSION || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#if defined _LIBICONV_VERSION || (((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__)
# ifdef WORDS_BIGENDIAN
# define UTF16_NAME "UTF-16BE"
# else
#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
/* Name of UTF-16 encoding with machine dependent endianness and alignment. */
-#if defined _LIBICONV_VERSION || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#if defined _LIBICONV_VERSION || (((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__)
# ifdef WORDS_BIGENDIAN
# define UTF16_NAME "UTF-16BE"
# else
alignment. */
#if defined _LIBICONV_VERSION
# define UTF32_NAME "UCS-4-INTERNAL"
-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#elif ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__
# define UTF32_NAME "WCHAR_T"
#endif
alignment. */
#if defined _LIBICONV_VERSION
# define UTF32_NAME "UCS-4-INTERNAL"
-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#elif ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__
# define UTF32_NAME "WCHAR_T"
#endif
alignment. */
#if defined _LIBICONV_VERSION
# define UTF32_NAME "UCS-4-INTERNAL"
-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#elif ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__
# define UTF32_NAME "WCHAR_T"
#endif
/* Specification. */
#include "unistr.h"
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
# include <string.h>
/* Specification. */
#include "unistr.h"
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 || defined __UCLIBC__
# include <string.h>
multithread-safe on glibc systems and MacOS X systems, but is not required
to be multithread-safe by POSIX. sprintf(), however, is multithread-safe.
localeconv() is rarely multithread-safe. */
-# if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined __MACH__))
+# if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
point = nl_langinfo (RADIXCHAR);
# elif 1
char pointbuf[5];
*fbp++ = ' ';
if (flags & FLAG_ALT)
*fbp++ = '#';
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
if (flags & FLAG_LOCALIZED)
*fbp++ = 'I';
#endif
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';
/* 1 if calloc is known to be compatible with GNU calloc. This
matters if we are not also using the calloc module, which defines
HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms. */
-#if defined HAVE_CALLOC_GNU || defined __GLIBC__
+#if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__)
enum { HAVE_GNU_CALLOC = 1 };
#else
enum { HAVE_GNU_CALLOC = 0 };
-# arpa_inet_h.m4 serial 8
-dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
+# arpa_inet_h.m4 serial 9
+dnl Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* On some systems, this header is not self-consistent. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ || defined __UCLIBC__)
# include <sys/socket.h>
#endif
#include <arpa/inet.h>
-# duplocale.m4 serial 4
+# duplocale.m4 serial 5
dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
}]])],
[gl_cv_func_duplocale_works=yes],
[gl_cv_func_duplocale_works=no],
- [dnl Guess it works except on glibc < 2.12 and AIX.
+ [dnl Guess it works except on glibc < 2.12, uClibc, and AIX.
case "$host_os" in
aix*) gl_cv_func_duplocale_works="guessing no";;
*-gnu*)
- AC_EGREP_CPP([Unlucky GNU user], [
+ AC_EGREP_CPP([Unlucky], [
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)
Unlucky GNU user
#endif
+#endif
+#ifdef __UCLIBC__
+ Unlucky user
#endif
],
[gl_cv_func_duplocale_works="guessing no"],
-# serial 26
+# serial 27
# Obtaining file system usage information.
# Copyright (C) 1997-1998, 2000-2001, 2003-2010 Free Software Foundation, Inc.
# OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS.
AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#if defined __GLIBC__ && defined __linux__
+#if (defined __GLIBC__ || defined __UCLIBC__) && defined __linux__
Do not use statvfs on systems with GNU libc on Linux, because that function
stats all preceding entries in /proc/mounts, and that makes df hang if even
one of the corresponding file systems is hard-mounted, but not available.
-# getdelim.m4 serial 6
+# getdelim.m4 serial 7
dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl
[
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
Lucky GNU user
#endif
#endif
-# getline.m4 serial 21
+# getline.m4 serial 22
dnl Copyright (C) 1998-2003, 2005-2007, 2009-2010 Free Software Foundation,
dnl Inc.
[
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
Lucky GNU user
#endif
#endif
-# glibc2.m4 serial 2
-dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
+# glibc2.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
Lucky GNU user
#endif
#endif
-# glibc21.m4 serial 4
-dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
+# glibc21.m4 serial 5
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# Test for the GNU C Library, version 2.1 or newer.
+# Test for the GNU C Library, version 2.1 or newer, or uClibc.
# From Bruno Haible.
AC_DEFUN([gl_GLIBC21],
[
- AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
+ AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
[ac_cv_gnu_library_2_1],
- [AC_EGREP_CPP([Lucky GNU user],
+ [AC_EGREP_CPP([Lucky],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
Lucky GNU user
#endif
+#endif
+#ifdef __UCLIBC__
+ Lucky user
#endif
],
[ac_cv_gnu_library_2_1=yes],
-# iconv_open.m4 serial 8
+# iconv_open.m4 serial 9
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl We know that GNU libiconv and GNU libc do.
AC_EGREP_CPP([gnu_iconv], [
#include <iconv.h>
- #if defined _LIBICONV_VERSION || defined __GLIBC__
+ #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
gnu_iconv
#endif
], [gl_func_iconv_gnu=yes], [gl_func_iconv_gnu=no])
-# memmem.m4 serial 17
+# memmem.m4 serial 18
dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
[
#ifdef __GNU_LIBRARY__
#include <features.h>
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
Lucky user
#endif
#elif defined __CYGWIN__
[
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
Lucky user
#endif
#endif
-# printf.m4 serial 35
+# printf.m4 serial 36
dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_EGREP_CPP([BZ2908], [
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
BZ2908
#endif
#endif
-# strcasestr.m4 serial 16
+# strcasestr.m4 serial 17
dnl Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
#ifdef __GNU_LIBRARY__
#include <features.h>
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
Lucky user
#endif
#elif defined __CYGWIN__
[
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
Lucky user
#endif
#endif
-# strstr.m4 serial 10
+# strstr.m4 serial 11
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
#ifdef __GNU_LIBRARY__
#include <features.h>
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
Lucky user
#endif
#elif defined __CYGWIN__
[
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
Lucky user
#endif
#endif
-# strtod.m4 serial 17
+# strtod.m4 serial 18
dnl Copyright (C) 2002-2003, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
#include <features.h>
#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
Lucky user
#endif
#endif
-# sys_ioctl_h.m4 serial 8
+# sys_ioctl_h.m4 serial 9
dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <sys/ioctl.h>
/* Some platforms declare ioctl in the wrong header. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <unistd.h>
#endif
]], [ioctl])
-# sys_select_h.m4 serial 14
+# sys_select_h.m4 serial 15
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
gl_WARN_ON_USE_PREPARE([[
/* Some systems require prerequisite headers. */
#include <sys/types.h>
-#if !defined __GLIBC__ && HAVE_SYS_TIME_H
+#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include <sys/select.h>
-# sys_socket_h.m4 serial 17
+# sys_socket_h.m4 serial 18
dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
gl_WARN_ON_USE_PREPARE([[
/* Some systems require prerequisite headers. */
#include <sys/types.h>
-#if !defined __GLIBC__ && HAVE_SYS_TIME_H
+#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include <sys/select.h>
# Configure a replacement for <sys/times.h>.
-# serial 6
+# serial 7
# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* Some systems have incomplete headers. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <time.h>
#endif
#include <sys/times.h>
-# unistd_h.m4 serial 46
+# unistd_h.m4 serial 47
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
/* Some systems declare various items in the wrong headers. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <fcntl.h>
# include <stdio.h>
# include <stdlib.h>
dnl Written by Eric Blake.
-# wchar_h.m4 serial 33
+# wchar_h.m4 serial 34
AC_DEFUN([gl_WCHAR_H],
[
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* Some systems require additional headers. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <stddef.h>
# include <stdio.h>
# include <time.h>
/* The glibc/gnulib implementation of getopt supports setting optind =
0, but not all other implementations do. This matters for getopt.
But for getopt_long, we require GNU compatibility. */
-#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2)
+#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2 && !defined __UCLIBC__)
# define OPTIND_MIN 0
#elif HAVE_DECL_OPTRESET
# define OPTIND_MIN (optreset = 1)
/* This assertion fails on glibc-2.3.6 systems with LinuxThreads,
when this program is linked with -lpthread, due to the sigaction()
override in libpthread.so. */
-#if !defined __GLIBC__
+#if !(defined __GLIBC__ || defined __UCLIBC__)
ASSERT (sa.sa_handler == SIG_DFL);
#endif
break;
sa.sa_handler = SIG_DFL;
ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0);
ASSERT ((old_sa.sa_flags & SA_SIGINFO) == 0);
-#if !defined __GLIBC__ /* see above */
+#if !(defined __GLIBC__ || defined __UCLIBC__) /* see above */
ASSERT (old_sa.sa_handler == SIG_DFL);
#endif
}
# endif
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
/* Test conversion from UTF-8 to ISO-8859-1 with transliteration. */
for (h = 0; h < SIZEOF (handlers); h++)
{
}
# endif
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
/* Test conversion from UTF-8 to ISO-8859-1 with transliteration. */
for (h = 0; h < SIZEOF (handlers); h++)
{
}
#endif
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && !defined __UCLIBC__
/* Test that the 'I' flag is supported. */
{
size_t length;
/* glibc >= 2.2 supports the 'I' flag, and in glibc >= 2.2.3 the fa_IR
locale defines the 'outdigits' to be U+06F0..U+06F9.
So we test for glibc >= 2.3. */
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
+#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__
/* Test that the 'I' flag is supported. */
{
size_t length;
int
main (int argc, char *argv[])
{
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
+#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__
/* Select a locale with Arabic 'outdigits'. */
if (setlocale (LC_ALL, "fa_IR.UTF-8") == NULL)
{