+2010-11-20 Bruno Haible <bruno@clisp.org>
+
+ Port to uClibc.
+ * localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL): Treat
+ uClibc like a non-glibc platform.
+ * printf-parse.h (FLAG_LOCALIZED): Likewise.
+ * printf-parse.c (PRINTF_PARSE): Likewise.
+ * relocatable.c (find_shared_library_fullname): Treat uClibc like
+ glibc.
+ * vasnprintf.c (decimal_point_char): Treat uClibc like glibc.
+ (VASNPRINTF): Treat uClibc like a non-glibc platform.
+ Reported by Mike Frysinger <vapier@gentoo.org>.
+
2010-11-20 Bruno Haible <bruno@clisp.org>
Fix a comment.
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
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
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. */
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';
+2010-11-20 Bruno Haible <bruno@clisp.org>
+
+ Port to uClibc.
+ * printf-parse.h (FLAG_LOCALIZED): Treat uClibc like a non-glibc platform.
+ * printf-parse.c (PRINTF_PARSE): Likewise.
+ * vasnprintf.c (decimal_point_char): Treat uClibc like glibc.
+ (VASNPRINTF): Treat uClibc like a non-glibc platform.
+ Reported by Mike Frysinger <vapier@gentoo.org>.
+
2010-11-20 Bruno Haible <bruno@clisp.org>
Fix a comment.
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
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';
+2010-11-20 Bruno Haible <bruno@clisp.org>
+
+ Port to uClibc.
+ * glibc21.m4 (gl_GLIBC21): Treat uClibc like glibc.
+ * glibc2.m4 (gt_GLIBC2): Treat uClibc like a non-glibc platform.
+ Reported by Mike Frysinger <vapier@gentoo.org>.
+
2010-10-04 Bruno Haible <bruno@clisp.org>
Make option --with-libpth-prefix work.
-# 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],
+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>.
+
2010-10-10 Bruno Haible <bruno@clisp.org>
Rely more on libtool.
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