On 21/11/10 01:31, Bruno Haible wrote: >> 2010-11-20 Bruno Haible <br...@clisp.org> >> >> Port to uClibc. >> ... > > Oops, that patch and its ChangeLog entry were incomplete. > > Here is the corrected ChangeLog: > > 2010-11-20 Bruno Haible <br...@clisp.org> > > Port to uClibc. > * build-aux/link-warning.h (GL_LINK_WARNING): Treat uClibc like glibc. > * lib/fcntl.in.h: Likewise. > * lib/hard-locale.c (GLIBC_VERSION): Likewise. > * lib/mbrtowc.c (mbrtowc): Likewise. > * lib/relocatable.c (find_shared_library_fullname): Likewise. > * lib/strerror_r.c: Likewise. > * lib/unistr/u8-strnlen.c: Likewise. > * lib/vasnprintf.c (decimal_point_char): 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/freading.h: Treat uClibc like a non-glibc platform. > * lib/freading.c: Likewise. > * lib/gettext.h: Likewise. > * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL): > Likewise. > * lib/printf-parse.h (FLAG_LOCALIZED): Likewise. > * lib/printf-parse.c (PRINTF_PARSE): Likewise. > * 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. > * lib/uniconv/u16-conv-from-enc.c (UTF16_NAME): Likewise. > * lib/uniconv/u16-conv-to-enc.c (UTF16_NAME): Likewise. > * lib/uniconv/u16-strconv-to-enc.c (UTF16_NAME): Likewise. > * lib/uniconv/u32-conv-from-enc.c (UTF32_NAME): Likewise. > * lib/uniconv/u32-conv-to-enc.c (UTF32_NAME): Likewise. > * lib/uniconv/u32-strconv-to-enc.c (UTF32_NAME): Likewise. > * lib/unistr/u8-stpncpy.c: Likewise. > * lib/vasnprintf.c (VASNPRINTF): Likewise. > * lib/xmalloc.c (HAVE_GNU_CALLOC): 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. > * tests/test-vasnprintf-posix.c (test_function): Likewise. > * tests/test-vasnprintf-posix3.c (test_function, main): Likewise. > * doc/posix-functions/getdelim.texi: Mention an uClibc bug. > * doc/posix-functions/getline.texi: Likewise. > Reported by Mike Frysinger <vap...@gentoo.org>. > > The completed patch is at > <http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=63bc47a1fecb6e16b620d95fc6f5313f317bb550> > >
I noticed a slight issue with this on code inspection. When cross-compiling for uClibc, memmem, printf, strcasestr and strstr would be replaced, which was a change from the original. OK to apply the attached? cheers, Pádraig.
>From e4098dbe87a69aaa6a9cac5fa2a29aa53336285b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com> Date: Wed, 15 Dec 2010 17:24:00 +0000 Subject: [PATCH] memmem, printf, strcasestr, strstr: assume OK on uClibc * m4/memmem.m4: Assume works when cross-compiling for uClibc. * m4/strcasestr.m4: Likewise. * m4/strstr.m4: Likewise. * m4/printf.m4: Rearrange long line. --- ChangeLog | 9 +++++++++ m4/memmem.m4 | 7 +++---- m4/printf.m4 | 6 +++--- m4/strcasestr.m4 | 12 +++++------- m4/strstr.m4 | 12 +++++------- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3354ae..cbbbffa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-12-15 Pádraig Brady <p...@draigbrady.com> + + memmem, printf, strcasestr, strstr: Don't automatically + replace when cross-compiling for uClibc. + * m4/memmem.m4: Assume works on uClibc. + * m4/strcasestr.m4: Likewise. + * m4/strstr.m4: Likewise. + * m4/printf.m4: Rearrange long line. + 2010-12-13 Pádraig Brady <p...@draigbrady.com> read-file: Improve handling of large files diff --git a/m4/memmem.m4 b/m4/memmem.m4 index 7df132e..1a7d05f 100644 --- a/m4/memmem.m4 +++ b/m4/memmem.m4 @@ -1,4 +1,4 @@ -# memmem.m4 serial 20 +# memmem.m4 serial 21 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 @@ -33,10 +33,9 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], dnl works on all other platforms, even if it is not linear. AC_EGREP_CPP([Lucky user], [ -#ifdef __GNU_LIBRARY__ +#ifdef __GNU_LIBRARY__ && !defined __UCLIBC__ #include <features.h> - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) Lucky user #endif #elif defined __CYGWIN__ diff --git a/m4/printf.m4 b/m4/printf.m4 index 6d1cbfe..cd679c1 100644 --- a/m4/printf.m4 +++ b/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 40 +# printf.m4 serial 41 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, @@ -530,8 +530,8 @@ int main () *-gnu*) AC_EGREP_CPP([BZ2908], [ #include <features.h> - #ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ + #ifdef __GNU_LIBRARY__ && !defined __UCLIBC__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) BZ2908 #endif #endif diff --git a/m4/strcasestr.m4 b/m4/strcasestr.m4 index 5c4cef4..cf0abdf 100644 --- a/m4/strcasestr.m4 +++ b/m4/strcasestr.m4 @@ -1,4 +1,4 @@ -# strcasestr.m4 serial 18 +# strcasestr.m4 serial 19 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, @@ -36,10 +36,9 @@ AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], dnl works on all other platforms, even if it is not linear. AC_EGREP_CPP([Lucky user], [ -#ifdef __GNU_LIBRARY__ +#ifdef __GNU_LIBRARY__ && !defined __UCLIBC__ #include <features.h> - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) Lucky user #endif #elif defined __CYGWIN__ @@ -109,9 +108,8 @@ static void quit (int sig) { exit (sig + 128); } AC_EGREP_CPP([Lucky user], [ #include <features.h> -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ +#ifdef __GNU_LIBRARY__ && !defined __UCLIBC__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) Lucky user #endif #endif diff --git a/m4/strstr.m4 b/m4/strstr.m4 index d83503e..faa039c 100644 --- a/m4/strstr.m4 +++ b/m4/strstr.m4 @@ -1,4 +1,4 @@ -# strstr.m4 serial 12 +# strstr.m4 serial 13 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, @@ -29,10 +29,9 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], dnl works on all other platforms, even if it is not linear. AC_EGREP_CPP([Lucky user], [ -#ifdef __GNU_LIBRARY__ +#ifdef __GNU_LIBRARY__ && !defined __UCLIBC__ #include <features.h> - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) Lucky user #endif #elif defined __CYGWIN__ @@ -97,9 +96,8 @@ static void quit (int sig) { exit (sig + 128); } AC_EGREP_CPP([Lucky user], [ #include <features.h> -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ +#ifdef __GNU_LIBRARY__ && !defined __UCLIBC__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) Lucky user #endif #endif -- 1.7.3.2