summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-07-12 22:26:05 +0200
committerSimon Josefsson <simon@josefsson.org>2007-07-12 22:26:05 +0200
commit93c61f9780649dc48cfa3b3bd8608fa68a5c4b97 (patch)
tree3dc6b0b35f037cc2f7ad7a957f40d83507a4aa76
parenta9b17febc03c20fcc570c1e97f72e67f15f6883b (diff)
downloadgnutls-93c61f9780649dc48cfa3b3bd8608fa68a5c4b97.tar.gz
Update.
-rwxr-xr-xbuild-aux/gendocs.sh14
-rw-r--r--gl/override/lib/version-etc.c.diff11
-rw-r--r--lgl/Makefile.am4
-rw-r--r--lgl/m4/wchar.m446
-rw-r--r--lgl/wchar_.h35
5 files changed, 87 insertions, 23 deletions
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index cf96b26a58..c775c99306 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,14 +2,14 @@
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2007-04-02.15
+scriptversion=2007-07-01.15
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# the Free Software Foundation; either version 3 of the License,
+# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,10 +17,8 @@ scriptversion=2007-04-02.15
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, you can either send email to this
-# program's maintainer or write to: The Free Software Foundation,
-# Inc.; 51 Franklin Street, Fifth Floor; Boston, MA 02110-1301, USA.
-#
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
# Original author: Mohit Agarwal.
# Send bug reports and any other correspondence to bug-texinfo@gnu.org.
diff --git a/gl/override/lib/version-etc.c.diff b/gl/override/lib/version-etc.c.diff
new file mode 100644
index 0000000000..3eaffc6445
--- /dev/null
+++ b/gl/override/lib/version-etc.c.diff
@@ -0,0 +1,11 @@
+--- version-etc.c.orig 2007-07-12 22:23:47.000000000 +0200
++++ version-etc.c 2007-07-12 22:24:01.000000000 +0200
+@@ -67,7 +67,7 @@
+
+ fputs (_("\
+ \n\
+-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
++License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n\
+ This is free software: you are free to change and redistribute it.\n\
+ There is NO WARRANTY, to the extent permitted by law.\n\
+ \n\
diff --git a/lgl/Makefile.am b/lgl/Makefile.am
index c880187d89..a143df0719 100644
--- a/lgl/Makefile.am
+++ b/lgl/Makefile.am
@@ -641,6 +641,10 @@ wchar.h: wchar_.h
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/wchar_.h; \
} > $@-t
mv $@-t $@
diff --git a/lgl/m4/wchar.m4 b/lgl/m4/wchar.m4
index bf32d2831e..70b1248f8f 100644
--- a/lgl/m4/wchar.m4
+++ b/lgl/m4/wchar.m4
@@ -7,30 +7,48 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar.m4 serial 3
+# wchar.m4 serial 4
AC_DEFUN([gl_WCHAR_H],
[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
AC_CACHE_CHECK([whether <wchar.h> is standalone],
[gl_cv_header_wchar_h_standalone],
[AC_COMPILE_IFELSE([[#include <wchar.h>
wchar_t w;]],
[gl_cv_header_wchar_h_standalone=yes],
[gl_cv_header_wchar_h_standalone=no])])
- if test $gl_cv_header_wchar_h_standalone = yes; then
- WCHAR_H=
- else
- dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
- dnl character support).
- AC_CHECK_HEADERS_ONCE([wchar.h])
- if test $ac_cv_header_wchar_h = yes; then
- HAVE_WCHAR_H=1
- else
- HAVE_WCHAR_H=0
- fi
- AC_SUBST([HAVE_WCHAR_H])
- gl_CHECK_NEXT_HEADERS([wchar.h])
+ if test $gl_cv_header_wchar_h_standalone != yes; then
WCHAR_H=wchar.h
fi
+
+ dnl Prepare for creating substitute <wchar.h>.
+ dnl Do it always: WCHAR_H may be empty here but can be set later.
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+ AC_SUBST([HAVE_WCHAR_H])
+ gl_CHECK_NEXT_HEADERS([wchar.h])
+])
+
+AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_WCHAR_H_DEFAULTS],
+[
+ GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
+ REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
+ WCHAR_H=
AC_SUBST([WCHAR_H])
])
diff --git a/lgl/wchar_.h b/lgl/wchar_.h
index 5b6a5f173d..0aba1cac10 100644
--- a/lgl/wchar_.h
+++ b/lgl/wchar_.h
@@ -22,7 +22,8 @@
* ISO C 99 <wchar.h> for platforms that have issues.
* <http://www.opengroup.org/susv3xbd/wchar.h.html>
*
- * For now, this just ensures proper prerequisite inclusion order.
+ * For now, this just ensures proper prerequisite inclusion order and
+ * the declaration of wcwidth().
*/
#ifndef _GL_WCHAR_H
@@ -45,5 +46,37 @@
#ifndef _GL_WCHAR_H
#define _GL_WCHAR_H
+/* The definition of GL_LINK_WARNING is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return the number of screen columns needed for WC. */
+#if @GNULIB_WCWIDTH@
+# if @REPLACE_WCWIDTH@
+# undef wcwidth
+# define wcwidth rpl_wcwidth
+extern int wcwidth (wchar_t);
+# else
+# if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
+/* wcwidth exists but is not declared. */
+extern int wcwidth (int /* actually wchar_t */);
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcwidth
+# define wcwidth(w) \
+ (GL_LINK_WARNING ("wcwidth is unportable - " \
+ "use gnulib module wcwidth for portability"), \
+ wcwidth (w))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _GL_WCHAR_H */
#endif /* _GL_WCHAR_H */