changeset 34209:21193ecf40fb

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.
author Bruno Haible <bruno@clisp.org>
date Fri, 01 Apr 2011 23:23:34 +0200
parents 2fff6e07d2da
children dc47b34965b1
files ChangeLog doc/posix-functions/wcpcpy.texi doc/posix-functions/wcpncpy.texi doc/posix-functions/wcwidth.texi m4/wcpcpy.m4 m4/wcpncpy.m4 modules/wcpcpy modules/wcpncpy
diffstat 8 files changed, 33 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Mar 31 15:28:37 2011 -0600
+++ b/ChangeLog	Fri Apr 01 23:23:34 2011 +0200
@@ -1,3 +1,15 @@
+2011-04-01  Bruno Haible  <bruno@clisp.org>
+
+	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  <eblake@redhat.com>
 
 	nonblocking: fix mingw test failures
--- a/doc/posix-functions/wcpcpy.texi	Thu Mar 31 15:28:37 2011 -0600
+++ b/doc/posix-functions/wcpcpy.texi	Fri Apr 01 23:23:34 2011 +0200
@@ -12,6 +12,9 @@
 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:
--- a/doc/posix-functions/wcpncpy.texi	Thu Mar 31 15:28:37 2011 -0600
+++ b/doc/posix-functions/wcpncpy.texi	Fri Apr 01 23:23:34 2011 +0200
@@ -12,6 +12,9 @@
 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:
--- a/doc/posix-functions/wcwidth.texi	Thu Mar 31 15:28:37 2011 -0600
+++ b/doc/posix-functions/wcwidth.texi	Fri Apr 01 23:23:34 2011 +0200
@@ -12,6 +12,9 @@
 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.
--- a/m4/wcpcpy.m4	Thu Mar 31 15:28:37 2011 -0600
+++ b/m4/wcpcpy.m4	Fri Apr 01 23:23:34 2011 +0200
@@ -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 @@
 AC_DEFUN([gl_FUNC_WCPCPY],
 [
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  dnl Persuade glibc <wchar.h> 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
--- a/m4/wcpncpy.m4	Thu Mar 31 15:28:37 2011 -0600
+++ b/m4/wcpncpy.m4	Fri Apr 01 23:23:34 2011 +0200
@@ -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 @@
 AC_DEFUN([gl_FUNC_WCPNCPY],
 [
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  dnl Persuade glibc <wchar.h> 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
--- a/modules/wcpcpy	Thu Mar 31 15:28:37 2011 -0600
+++ b/modules/wcpcpy	Fri Apr 01 23:23:34 2011 +0200
@@ -13,6 +13,7 @@
 m4/wcpcpy.m4
 
 Depends-on:
+extensions
 wchar
 
 configure.ac:
--- a/modules/wcpncpy	Thu Mar 31 15:28:37 2011 -0600
+++ b/modules/wcpncpy	Fri Apr 01 23:23:34 2011 +0200
@@ -7,6 +7,7 @@
 m4/wcpncpy.m4
 
 Depends-on:
+extensions
 wchar
 
 configure.ac: