From: Bruno Haible Date: Fri, 1 Apr 2011 21:23:34 +0000 (+0200) Subject: wcpcpy, wcpncpy: Ensure declaration on glibc >= 2.13 systems. X-Git-Tag: stable/20110412~26 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=c8bdb920b373aa48a05e9bfd968ac34afcbe1dc0 wcpcpy, wcpncpy: Ensure declaration on glibc >= 2.13 systems. * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Require AC_USE_SYSTEM_EXTENSIONS. * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Likewise. * modules/wcpcpy (Depends-on): Add extensions. * modules/wcpncpy (Depends-on): Likewise. * doc/posix-functions/wcpcpy.texi: Mention missing declaration on glibc systems. * doc/posix-functions/wcpncpy.texi: Likewise. * doc/posix-functions/wcwidth.texi: Likewise. (cherry picked from commit b64c50cfe4fca783f23341fffebc7d8f84f58820) --- diff --git a/ChangeLog b/ChangeLog index 9f5847191..a742fbbe6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-04-01 Bruno Haible + + wcpcpy, wcpncpy: Ensure declaration on glibc >= 2.13 systems. + * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Require AC_USE_SYSTEM_EXTENSIONS. + * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Likewise. + * modules/wcpcpy (Depends-on): Add extensions. + * modules/wcpncpy (Depends-on): Likewise. + * doc/posix-functions/wcpcpy.texi: Mention missing declaration on glibc + systems. + * doc/posix-functions/wcpncpy.texi: Likewise. + * doc/posix-functions/wcwidth.texi: Likewise. + 2011-03-31 Eric Blake nonblocking: fix mingw test failures diff --git a/doc/posix-functions/wcpcpy.texi b/doc/posix-functions/wcpcpy.texi index 30b59befc..7566cd842 100644 --- a/doc/posix-functions/wcpcpy.texi +++ b/doc/posix-functions/wcpcpy.texi @@ -12,6 +12,9 @@ Portability problems fixed by Gnulib: This function is missing on some platforms: MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS. +@item +This function is not declared (without @code{-D_GNU_SOURCE}) on some platforms: +glibc 2.13. @end itemize Portability problems not fixed by Gnulib: diff --git a/doc/posix-functions/wcpncpy.texi b/doc/posix-functions/wcpncpy.texi index 0d8e644ea..ad7911391 100644 --- a/doc/posix-functions/wcpncpy.texi +++ b/doc/posix-functions/wcpncpy.texi @@ -12,6 +12,9 @@ Portability problems fixed by Gnulib: This function is missing on some platforms: MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS. +@item +This function is not declared (without @code{-D_GNU_SOURCE}) on some platforms: +glibc 2.13. @end itemize Portability problems not fixed by Gnulib: diff --git a/doc/posix-functions/wcwidth.texi b/doc/posix-functions/wcwidth.texi index a3aec68c1..ae33b75b4 100644 --- a/doc/posix-functions/wcwidth.texi +++ b/doc/posix-functions/wcwidth.texi @@ -12,6 +12,9 @@ Portability problems fixed by Gnulib: This function is missing on some platforms: IRIX 5.3, Solaris 2.5.1, mingw, BeOS. @item +This function is not declared (without @code{-D_GNU_SOURCE}) on some platforms: +glibc 2.8. +@item This function handles combining characters in UTF-8 locales incorrectly on some platforms: MacOS X 10.3. diff --git a/m4/wcpcpy.m4 b/m4/wcpcpy.m4 index 5ffe1a12e..b23c0ef9b 100644 --- a/m4/wcpcpy.m4 +++ b/m4/wcpcpy.m4 @@ -1,4 +1,4 @@ -# wcpcpy.m4 serial 1 +# wcpcpy.m4 serial 2 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,6 +7,10 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCPCPY], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + dnl Persuade glibc to declare wcpcpy(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([wcpcpy]) if test $ac_cv_func_wcpcpy = no; then HAVE_WCPCPY=0 diff --git a/m4/wcpncpy.m4 b/m4/wcpncpy.m4 index 939e8808f..a4d73e28d 100644 --- a/m4/wcpncpy.m4 +++ b/m4/wcpncpy.m4 @@ -1,4 +1,4 @@ -# wcpncpy.m4 serial 1 +# wcpncpy.m4 serial 2 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,6 +7,10 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCPNCPY], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + dnl Persuade glibc to declare wcpncpy(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([wcpncpy]) if test $ac_cv_func_wcpncpy = no; then HAVE_WCPNCPY=0 diff --git a/modules/wcpcpy b/modules/wcpcpy index 50ec8c316..90f6e849d 100644 --- a/modules/wcpcpy +++ b/modules/wcpcpy @@ -13,6 +13,7 @@ lib/wcpcpy-impl.h m4/wcpcpy.m4 Depends-on: +extensions wchar configure.ac: diff --git a/modules/wcpncpy b/modules/wcpncpy index 2ba35a257..8506bf446 100644 --- a/modules/wcpncpy +++ b/modules/wcpncpy @@ -7,6 +7,7 @@ lib/wcpncpy-impl.h m4/wcpncpy.m4 Depends-on: +extensions wchar configure.ac: