summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile2
-rwxr-xr-x[-rw-r--r--]build-aux/gendocs.sh12
-rw-r--r--build-aux/pmccabe.css68
-rw-r--r--build-aux/pmccabe2html66
-rw-r--r--gl/Makefile.am16
-rw-r--r--gl/getopt.in.h1
-rw-r--r--gl/gettext.h2
-rw-r--r--gl/m4/gnulib-common.m415
-rw-r--r--gl/m4/include_next.m427
-rw-r--r--gl/m4/unistd_h.m47
-rw-r--r--gl/m4/wchar_h.m46
-rw-r--r--gl/stdarg.in.h1
-rw-r--r--gl/stddef.in.h1
-rw-r--r--gl/stdint.in.h72
-rw-r--r--gl/stdio.in.h8
-rw-r--r--gl/stdlib.in.h6
-rw-r--r--gl/sys_stat.in.h1
-rw-r--r--gl/time.in.h10
-rw-r--r--gl/unistd.in.h30
-rw-r--r--gl/wchar.in.h5
-rw-r--r--lib/gllib/Makefile.am9
-rw-r--r--lib/gllib/stddef.in.h1
-rw-r--r--lib/gllib/stdint.in.h72
-rw-r--r--lib/gllib/string.in.h48
-rw-r--r--lib/gllib/wchar.in.h5
-rw-r--r--lib/glm4/gnulib-common.m415
-rw-r--r--lib/glm4/include_next.m427
-rw-r--r--lib/glm4/string_h.m49
-rw-r--r--lib/glm4/wchar_h.m46
-rw-r--r--maint.mk25
30 files changed, 373 insertions, 200 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 97fea36..0394d98 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -57,7 +57,7 @@ _have-git-version-gen := \
$(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
_is-dist-target ?= $(filter-out %clean, \
- $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
+ $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
_is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
ifneq (,$(_is-dist-target)$(_is-install-target))
_curr-ver := $(shell cd $(srcdir) \
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 3c5ca76..3180841 100644..100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,10 +2,9 @@
# 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=2010-09-17.07
+scriptversion=2010-11-27.07
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright 2003-2010 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
@@ -22,6 +21,13 @@ scriptversion=2010-09-17.07
#
# Original author: Mohit Agarwal.
# Send bug reports and any other correspondence to bug-texinfo@gnu.org.
+#
+# The latest version of this script, and the companion template, is
+# available from Texinfo CVS:
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template
+#
+# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
prog=`basename "$0"`
srcdir=`pwd`
diff --git a/build-aux/pmccabe.css b/build-aux/pmccabe.css
index 2d94c91..b78bc10 100644
--- a/build-aux/pmccabe.css
+++ b/build-aux/pmccabe.css
@@ -1,56 +1,41 @@
body {
-
font-family: Helvetica, sans-serif;
-
}
.page_title {
-
font: 18pt Georgia, serif;
-/* font-size: 1.5em;
- font-weight: bold; */
color: darkred;
- border-bottom: 2px solid darkred;
}
.section_title {
-
font: 14pt Georgia, serif;
color: darkred;
- border-bottom: 2px dashed darkred;
}
.report_timestamp {
-
color: darkred;
font-weight: bold;
-
}
.function_src {
-
text-align: left;
background: white;
}
.resume_table {
-
}
.resume_header_entry {
-
color: black;
}
.resume_number_entry {
-
color: darkred;
font-weight: bold;
text-align: right;
}
.ranges_table {
-
border-spacing: 0px;
border-bottom: solid 2px black;
border-top: solid 2px black;
@@ -59,7 +44,6 @@ body {
}
.ranges_header_entry {
-
padding: 5px;
border-bottom: solid 1px black;
font-size: 1em;
@@ -69,36 +53,26 @@ body {
}
.ranges_entry {
-
}
.ranges_entry_simple {
-
background: #87ff75;
-
}
.ranges_entry_moderate {
-
background: #fffc60;
-
}
.ranges_entry_high {
-
background: #ff5a5d;
-
}
.ranges_entry_untestable {
-
background: #993300
-
}
.function_table {
-
border-spacing: 0px;
border-bottom: solid 2px black;
border-top: solid 2px black;
@@ -107,7 +81,6 @@ body {
}
.function_table_caption {
-
font-size: 1.1em;
font-weight: bold;
color: black;
@@ -115,12 +88,10 @@ body {
}
.function_table_header {
-
}
.function_table_header_entry {
-
padding: 5px;
border-bottom: solid 1px black;
font-size: 1em;
@@ -130,38 +101,27 @@ body {
}
.function_entry {
-
-
}
.function_entry_simple {
-
background: #87ff75;
-
}
.function_entry_moderate {
-
background: #fffc60;
-
}
.function_entry_high {
-
background: #ff5a5d;
-
}
.function_entry_untestable {
-
background: #993300
-
}
.function_entry_name {
-
font-size: 1em;
text-align: left;
font-weight: bold;
@@ -172,7 +132,6 @@ body {
}
.function_entry_cyclo {
-
font-size: 1em;
text-align: right;
text-valign: top;
@@ -182,7 +141,6 @@ body {
}
.function_entry_number {
-
font-size: 1em;
text-align: right;
text-valign: top;
@@ -192,7 +150,6 @@ body {
}
.function_entry_filename {
-
font-size: 1em;
text-align: left;
text-valign: top;
@@ -200,28 +157,3 @@ body {
border-top: solid 1px black;
padding: 3px;
}
-
-.sidemenu {
-
- border: 1px black solid;
- padding: 5px;
-
-}
-
-.sidemenuheader {
-
- color: darkred;
- font-size: 1.1em;
- font-weight: bold;
- border-bottom: 1px dashed darkred;
-}
-
-.sidemenuentry {
-
-
-}
-
-.menu {
-
-}
-
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 28117af..1a4cdd1 100644
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -21,8 +21,10 @@
# Typical Invocation is from a Makefile.am:
#
-# cyclo-$(PACKAGE).html:
-# $(PMCCABE) ${top_srcdir}/src/*.[ch] \
+# CYCLO_SOURCES = ${top_srcdir}/src/*.[ch]
+#
+# cyclo-$(PACKAGE).html: $(CYCLO_SOURCES)
+# $(PMCCABE) $(CYCLO_SOURCES) \
# | sort -nr \
# | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \
# -v lang=html -v name="$(PACKAGE_NAME)" \
@@ -112,12 +114,12 @@ function build_stats()
function html_fnc_table_complete (caption)
{
- html_fnc_table(caption, 1, 0, 1, 1, 1, 0, 1)
+ html_fnc_table(caption, 1, 1, 0, 1, 1, 0, 1)
}
function html_fnc_table_abbrev (caption)
{
- html_fnc_table(caption, 1, 0, 1, 0, 1, 0, 0)
+ html_fnc_table(caption, 1, 1, 0, 0, 1, 0, 0)
}
@@ -142,7 +144,7 @@ function html_fnc_table (caption,
num_lines_p,
first_line_p,
file_p)
- for (nfnc = 1; nfnc < nfuncs; nfnc++)
+ for (nfnc = 1; nfnc <= nfuncs; nfnc++)
{
html_fnc(nfnc,
fname_p,
@@ -423,7 +425,7 @@ function html_fnc (nfun,
print codeline
}
close(fname nfun "_fn.txt")
- system("rm " fname nfun "_fn.txt")
+ system("rm " "'" fname "'" nfun "_fn.txt")
print "</pre>"
print "</div>"
print "</td>"
@@ -435,52 +437,51 @@ function html_fnc (nfun,
function html_global_stats ()
{
- print "<div class=\"section_title\">Resume</div>"
+ print "<div class=\"section_title\">Summary</div>"
- print "<br/>"
- print "<table class=\"resume_table\">"
+ print "<table class=\"summary_table\">"
# Total number of functions
print "<tr>"
- print "<td class=\"resume_header_entry\">"
+ print "<td class=\"summary_header_entry\">"
print "Total number of functions"
print "</td>"
- print "<td class=\"resume_number_entry\">"
+ print "<td class=\"summary_number_entry\">"
print num_of_functions
print "</td>"
print "</tr>"
# Number of simple functions
print "<tr>"
- print "<td class=\"resume_header_entry\">"
+ print "<td class=\"summary_header_entry\">"
print "Number of low risk functions"
print "</td>"
- print "<td class=\"resume_number_entry\">"
+ print "<td class=\"summary_number_entry\">"
print num_of_simple_functions
print "</td>"
print "</tr>"
# Number of moderate functions
print "<tr>"
- print "<td class=\"resume_header_entry\">"
+ print "<td class=\"summary_header_entry\">"
print "Number of moderate risk functions"
print "</td>"
- print "<td class=\"resume_number_entry\">"
+ print "<td class=\"summary_number_entry\">"
print num_of_moderate_functions
print "</td>"
print "</tr>"
# Number of high functions
print "<tr>"
- print "<td class=\"resume_header_entry\">"
+ print "<td class=\"summary_header_entry\">"
print "Number of high risk functions"
print "</td>"
- print "<td class=\"resume_number_entry\">"
+ print "<td class=\"summary_number_entry\">"
print num_of_high_functions
print "</td>"
print "</tr>"
# Number of untestable functions
print "<tr>"
- print "<td class=\"resume_header_entry\">"
+ print "<td class=\"summary_header_entry\">"
print "Number of untestable functions"
print "</td>"
- print "<td class=\"resume_number_entry\">"
+ print "<td class=\"summary_number_entry\">"
print num_of_untestable_functions
print "</td>"
print "</tr>"
@@ -491,7 +492,6 @@ function html_global_stats ()
function html_function_cyclo ()
{
print "<div class=\"section_title\">Details for all functions</div>"
- print "<p>Used ranges:</p>"
print "<table class=\"ranges_table\">"
print "<tr>"
@@ -560,27 +560,27 @@ function html_function_cyclo ()
function wiki_global_stats ()
{
- print "{| class=\"cyclo_resume_table\""
+ print "{| class=\"cyclo_summary_table\""
# Total number of functions
print "|-"
- print "| class=\"cyclo_resume_header_entry\" | Total number of functions"
- print "| class=\"cyclo_resume_number_entry\" |" num_of_functions
+ print "| class=\"cyclo_summary_header_entry\" | Total number of functions"
+ print "| class=\"cyclo_summary_number_entry\" |" num_of_functions
# Number of simple functions
print "|-"
- print "| class=\"cyclo_resume_header_entry\" | Number of low risk functions"
- print "| class=\"cyclo_resume_number_entry\" |" num_of_simple_functions
+ print "| class=\"cyclo_summary_header_entry\" | Number of low risk functions"
+ print "| class=\"cyclo_summary_number_entry\" |" num_of_simple_functions
# Number of moderate functions
print "|-"
- print "| class=\"cyclo_resume_header_entry\" | Number of moderate risk functions"
- print "| class=\"cyclo_resume_number_entry\" |" num_of_moderate_functions
+ print "| class=\"cyclo_summary_header_entry\" | Number of moderate risk functions"
+ print "| class=\"cyclo_summary_number_entry\" |" num_of_moderate_functions
# Number of high functions
print "|-"
- print "| class=\"cyclo_resume_header_entry\" | Number of high risk functions"
- print "| class=\"cyclo_resume_number_entry\" |" num_of_high_functions
+ print "| class=\"cyclo_summary_header_entry\" | Number of high risk functions"
+ print "| class=\"cyclo_summary_number_entry\" |" num_of_high_functions
# Number of untestable functions
print "|-"
- print "| class=\"cyclo_resume_header_entry\" | Number of untestable functions"
- print "| class=\"cyclo_resume_number_entry\" |" num_of_untestable_functions
+ print "| class=\"cyclo_summary_header_entry\" | Number of untestable functions"
+ print "| class=\"cyclo_summary_number_entry\" |" num_of_untestable_functions
print "|}"
}
@@ -624,7 +624,7 @@ function wiki_function_cyclo ()
function wiki_fnc_table_complete (caption)
{
- wiki_fnc_table(caption, 1, 0, 1, 1, 1, 0, 1)
+ wiki_fnc_table(caption, 1, 1, 0, 1, 1, 0, 1)
}
function wiki_fnc_table_abbrev (caption)
@@ -653,7 +653,7 @@ function wiki_fnc_table (caption,
num_lines_p,
first_line_p,
file_p)
- for (nfnc = 1; nfnc < nfuncs; nfnc++)
+ for (nfnc = 1; nfnc <= nfuncs; nfnc++)
{
wiki_fnc(nfnc,
fname_p,
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 11333a1..adf014a 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -37,6 +37,8 @@ libgnu_la_LIBADD = $(gl_LTLIBOBJS)
libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
+libgnu_la_LDFLAGS += -no-undefined
+libgnu_la_LDFLAGS += $(LTLIBINTL)
## begin gnulib module arg-nonnull
@@ -114,6 +116,7 @@ getopt.h: getopt.in.h $(ARG_NONNULL_H)
sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/getopt.in.h; \
@@ -209,6 +212,7 @@ stdarg.h: stdarg.in.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
< $(srcdir)/stdarg.in.h; \
} > $@-t && \
@@ -230,6 +234,7 @@ stddef.h: stddef.in.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
@@ -254,6 +259,7 @@ stdint.h: stdint.in.h
sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
@@ -295,6 +301,7 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
-e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
@@ -405,6 +412,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
-e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
@@ -490,6 +498,7 @@ sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
-e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
-e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
@@ -547,6 +556,7 @@ time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
-e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
@@ -588,6 +598,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
@@ -639,7 +650,6 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
-e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
- -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
@@ -660,6 +670,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
@@ -671,6 +682,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
@@ -764,6 +776,8 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 57a8e89..adc2890 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -21,6 +21,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. We must
also inform the replacement unistd.h to not recursively use
diff --git a/gl/gettext.h b/gl/gettext.h
index 881ae33..0a77a35 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -54,7 +54,7 @@
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
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 4c7ac30..d0c8b66 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 20
+# gnulib-common.m4 serial 21
dnl Copyright (C) 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,
@@ -102,6 +102,19 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
[Define to 1 when the gnulib module $1 should be tested.])
])
+# Test whether <features.h> exists.
+# Set HAVE_FEATURES_H.
+AC_DEFUN([gl_FEATURES_H],
+[
+ AC_CHECK_HEADERS_ONCE([features.h])
+ if test $ac_cv_header_features_h = yes; then
+ HAVE_FEATURES_H=1
+ else
+ HAVE_FEATURES_H=0
+ fi
+ AC_SUBST([HAVE_FEATURES_H])
+])
+
# m4_foreach_w
# is a backport of autoconf-2.59c's m4_foreach_w.
# Remove this macro when we can assume autoconf >= 2.60.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index 51a719b..e37eb05 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 15
+# include_next.m4 serial 16
dnl Copyright (C) 2006-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,
@@ -24,6 +24,13 @@ dnl does not warn about some things, and on some systems (Solaris and Interix)
dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
dnl of plain '__STDC__'.
+dnl
+dnl PRAGMA_COLUMNS can be used in files that override system header files, so
+dnl as to avoid compilation errors on HP NonStop systems when the gnulib file
+dnl is included by a system header file that does a "#pragma COLUMNS 80" (which
+dnl has the effect of truncating the lines of that file and all files that it
+dnl includes to 80 columns) and the gnulib file has lines longer than 80
+dnl columns.
AC_DEFUN([gl_INCLUDE_NEXT],
[
@@ -98,6 +105,24 @@ dnl We intentionally avoid using AC_LANG_SOURCE here.
AC_SUBST([INCLUDE_NEXT])
AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
AC_SUBST([PRAGMA_SYSTEM_HEADER])
+ AC_CACHE_CHECK([whether system header files limit the line length],
+ [gl_cv_pragma_columns],
+ [dnl HP NonStop systems, which define __TANDEM, have this misfeature.
+ AC_EGREP_CPP([choke me],
+ [
+#ifdef __TANDEM
+choke me
+#endif
+ ],
+ [gl_cv_pragma_columns=yes],
+ [gl_cv_pragma_columns=no])
+ ])
+ if test $gl_cv_pragma_columns = yes; then
+ PRAGMA_COLUMNS="#pragma COLUMNS 10000"
+ else
+ PRAGMA_COLUMNS=
+ fi
+ AC_SUBST([PRAGMA_COLUMNS])
])
# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 48d06c7..e2f7f2b 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 46
+# unistd_h.m4 serial 48
dnl Copyright (C) 2006-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,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_UNISTD_H],
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
/* Some systems declare various items in the wrong headers. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <fcntl.h>
# include <stdio.h>
# include <stdlib.h>
@@ -104,7 +104,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
- HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME])
HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
@@ -125,6 +124,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
+ HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
@@ -136,6 +136,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
+ REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 8cae82d..8c8fad9 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 33
+# wchar_h.m4 serial 35
AC_DEFUN([gl_WCHAR_H],
[
@@ -26,6 +26,8 @@ AC_DEFUN([gl_WCHAR_H],
fi
AC_SUBST([HAVE_WCHAR_H])
+ AC_REQUIRE([gl_FEATURES_H])
+
AC_REQUIRE([gt_TYPE_WINT_T])
if test $gt_cv_c_wint_t = yes; then
HAVE_WINT_T=1
@@ -38,7 +40,7 @@ AC_DEFUN([gl_WCHAR_H],
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* Some systems require additional headers. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <stddef.h>
# include <stdio.h>
# include <time.h>
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 3e0c49d..8b88449 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -20,6 +20,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDARG_H@
diff --git a/gl/stddef.in.h b/gl/stddef.in.h
index 08778a2..6642d49 100644
--- a/gl/stddef.in.h
+++ b/gl/stddef.in.h
@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
#if defined __need_wchar_t || defined __need_size_t \
|| defined __need_ptrdiff_t || defined __need_NULL \
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 7da6567..9909f57 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* When including a system file that in turn includes <inttypes.h>,
use the system <inttypes.h>, not our substitute. This avoids
@@ -133,40 +134,53 @@ typedef unsigned int gl_uint32_t;
#define int32_t gl_int32_t
#define uint32_t gl_uint32_t
+/* If the system defines INT64_MAX, assume int64_t works. That way,
+ if the underlying platform defines int64_t to be a 64-bit long long
+ int, the code below won't mistakenly define it to be a 64-bit long
+ int, which would mess up C++ name mangling. */
+
+#if INT64_MAX
+# define GL_INT64_T
+#else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
-#if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
+# if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif defined _MSC_VER
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif defined _MSC_VER
+# undef int64_t
typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif @HAVE_LONG_LONG_INT@
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+# undef int64_t
typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# endif
#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
+#if UINT64_MAX
# define GL_UINT64_T
-#elif defined _MSC_VER
-# undef uint64_t
+#else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif defined _MSC_VER
+# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# endif
#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
@@ -278,7 +292,8 @@ typedef unsigned long int gl_uintmax_t;
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
to be found in the autoconf macros. */
-typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
+typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
+ ? 1 : -1];
/* 7.18.2. Limits of specified-width integer types */
@@ -310,17 +325,14 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
#define INT32_MAX 2147483647
#define UINT32_MAX 4294967295U
-#undef INT64_MIN
-#undef INT64_MAX
-#ifdef GL_INT64_T
+#if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
evaluates the latter incorrectly in preprocessor expressions. */
# define INT64_MIN (- INTMAX_C (1) << 63)
# define INT64_MAX INTMAX_C (9223372036854775807)
#endif
-#undef UINT64_MAX
-#ifdef GL_UINT64_T
+#if defined GL_UINT64_T && ! defined UINT64_MAX
# define UINT64_MAX UINTMAX_C (18446744073709551615)
#endif
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 0bf2cc5..45eaa1c 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -19,6 +19,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
#if defined __need_FILE || defined __need___FILE
/* Special invocation convention inside glibc header files. */
@@ -56,6 +57,13 @@
# endif
#endif
+/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
+ && ! defined __GLIBC__
+# include <unistd.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 10efdca..e6dcdbc 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -18,6 +18,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
#if defined __need_malloc_and_calloc
/* Special invocation convention inside glibc header files. */
@@ -60,6 +61,9 @@
#endif
#if !@HAVE_STRUCT_RANDOM_DATA@
+/* Define 'struct random_data'.
+ But allow multiple gnulib generated <stdlib.h> replacements to coexist. */
+# if !GNULIB_defined_struct_random_data
struct random_data
{
int32_t *fptr; /* Front pointer. */
@@ -70,6 +74,8 @@ struct random_data
int rand_sep; /* Distance between front and rear. */
int32_t *end_ptr; /* Pointer behind state table. */
};
+# define GNULIB_defined_struct_random_data 1
+# endif
#endif
#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index f16ccbd..f0c61c1 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -24,6 +24,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
#if defined __need_system_sys_stat_h
/* Special invocation convention. */
diff --git a/gl/time.in.h b/gl/time.in.h
index 6fb4fd7..0f6adac 100644
--- a/gl/time.in.h
+++ b/gl/time.in.h
@@ -19,6 +19,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* Don't get in the way of glibc when it includes time.h merely to
declare a few standard symbols, rather than to declare all the
@@ -83,6 +84,15 @@ struct timespec
# endif
# endif
+/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
+ time_t to be an integer type, even though C99 permits floating
+ point. We don't know of any implementation that uses floating
+ point, and it is much easier to write code that doesn't have to
+ worry about that corner case, so we force the issue. */
+struct __time_t_must_be_integral {
+ unsigned int __floating_time_t_unsupported : (time_t) 1;
+};
+
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
return -1 and store the remaining time into RMTP. See
<http://www.opengroup.org/susv3xsh/nanosleep.html>. */
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 26a4cbd..fcf7c43 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -18,6 +18,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* Special invocation convention:
- On mingw, several headers, including <winsock2.h>, include <unistd.h>,
@@ -60,14 +61,16 @@
/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
/* But avoid namespace pollution on glibc systems. */
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
- || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \
+ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
+ && defined __CYGWIN__)) \
&& ! defined __GLIBC__
# include <stdio.h>
#endif
/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
/* But avoid namespace pollution on glibc systems. */
-#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
+ && ! defined __GLIBC__
# include <fcntl.h>
#endif
@@ -85,6 +88,13 @@
# include <io.h>
#endif
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if @GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \
+ && !defined __GLIBC__
+# include <netdb.h>
+#endif
+
#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
|| @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
/* Get ssize_t. */
@@ -548,13 +558,21 @@ _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
Null terminate it if the name is shorter than LEN.
If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
Return 0 if successful, otherwise set errno and return -1. */
-# if !@HAVE_GETDOMAINNAME@
+# if @REPLACE_GETDOMAINNAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getdomainname
+# define getdomainname rpl_getdomainname
+# endif
+_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
+# else
+# if !@HAVE_DECL_GETDOMAINNAME@
_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
_GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
# endif
-/* Need to cast, because on MacOS X 10.5 systems, the second parameter is
- int len. */
-_GL_CXXALIAS_SYS_CAST (getdomainname, int, (char *name, size_t len));
_GL_CXXALIASWARN (getdomainname);
#elif defined GNULIB_POSIXCHECK
# undef getdomainname
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index 88d47db..c22dc06 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -29,6 +29,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
/* Special invocation convention:
@@ -52,6 +53,10 @@
#define _GL_ALREADY_INCLUDING_WCHAR_H
+#if @HAVE_FEATURES_H@
+# include <features.h> /* for __GLIBC__ */
+#endif
+
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
diff --git a/lib/gllib/Makefile.am b/lib/gllib/Makefile.am
index 05fc4a2..b59fab2 100644
--- a/lib/gllib/Makefile.am
+++ b/lib/gllib/Makefile.am
@@ -36,6 +36,7 @@ libgnu_la_LIBADD = $(lgl_LTLIBOBJS)
libgnu_la_DEPENDENCIES = $(lgl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
+libgnu_la_LDFLAGS += -no-undefined
## begin gnulib module arg-nonnull
@@ -106,6 +107,7 @@ stddef.h: stddef.in.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
@@ -130,6 +132,7 @@ stdint.h: stdint.in.h
sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
@@ -171,6 +174,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
@@ -204,6 +208,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
-e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
-e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+ -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
-e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
-e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
< $(srcdir)/string.in.h | \
@@ -223,6 +228,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -232,6 +238,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
@@ -289,6 +296,8 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
diff --git a/lib/gllib/stddef.in.h b/lib/gllib/stddef.in.h
index c8900d5..4f25aee 100644
--- a/lib/gllib/stddef.in.h
+++ b/lib/gllib/stddef.in.h
@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
#if defined __need_wchar_t || defined __need_size_t \
|| defined __need_ptrdiff_t || defined __need_NULL \
diff --git a/lib/gllib/stdint.in.h b/lib/gllib/stdint.in.h
index f23bcf7..6fafca4 100644
--- a/lib/gllib/stdint.in.h
+++ b/lib/gllib/stdint.in.h
@@ -26,6 +26,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* When including a system file that in turn includes <inttypes.h>,
use the system <inttypes.h>, not our substitute. This avoids
@@ -133,40 +134,53 @@ typedef unsigned int gl_uint32_t;
#define int32_t gl_int32_t
#define uint32_t gl_uint32_t
+/* If the system defines INT64_MAX, assume int64_t works. That way,
+ if the underlying platform defines int64_t to be a 64-bit long long
+ int, the code below won't mistakenly define it to be a 64-bit long
+ int, which would mess up C++ name mangling. */
+
+#if INT64_MAX
+# define GL_INT64_T
+#else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
-#if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
+# if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif defined _MSC_VER
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif defined _MSC_VER
+# undef int64_t
typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif @HAVE_LONG_LONG_INT@
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+# undef int64_t
typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# endif
#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
+#if UINT64_MAX
# define GL_UINT64_T
-#elif defined _MSC_VER
-# undef uint64_t
+#else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif defined _MSC_VER
+# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# endif
#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
@@ -278,7 +292,8 @@ typedef unsigned long int gl_uintmax_t;
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
to be found in the autoconf macros. */
-typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
+typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
+ ? 1 : -1];
/* 7.18.2. Limits of specified-width integer types */
@@ -310,17 +325,14 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
#define INT32_MAX 2147483647
#define UINT32_MAX 4294967295U
-#undef INT64_MIN
-#undef INT64_MAX
-#ifdef GL_INT64_T
+#if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
evaluates the latter incorrectly in preprocessor expressions. */
# define INT64_MIN (- INTMAX_C (1) << 63)
# define INT64_MAX INTMAX_C (9223372036854775807)
#endif
-#undef UINT64_MAX
-#ifdef GL_UINT64_T
+#if defined GL_UINT64_T && ! defined UINT64_MAX
# define UINT64_MAX UINTMAX_C (18446744073709551615)
#endif
diff --git a/lib/gllib/string.in.h b/lib/gllib/string.in.h
index f5b61e4..b5711c0 100644
--- a/lib/gllib/string.in.h
+++ b/lib/gllib/string.in.h
@@ -21,6 +21,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
@@ -50,8 +51,8 @@
#endif
/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */
-/* But avoid namespace pollution on glibc systems. */
-#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) \
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
&& ! defined __GLIBC__
# include <unistd.h>
#endif
@@ -86,7 +87,7 @@ _GL_CXXALIAS_SYS_CAST2 (memchr,
void *, (void const *__s, int __c, size_t __n),
void const *, (void const *__s, int __c, size_t __n));
# endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
_GL_CXXALIASWARN1 (memchr, void const *,
@@ -171,7 +172,7 @@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
_GL_CXXALIAS_SYS_CAST2 (memrchr,
void *, (void const *, int, size_t),
void const *, (void const *, int, size_t));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
@@ -201,7 +202,7 @@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
_GL_CXXALIAS_SYS_CAST2 (rawmemchr,
void *, (void const *__s, int __c_in),
void const *, (void const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
@@ -292,7 +293,7 @@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
_GL_CXXALIAS_SYS_CAST2 (strchrnul,
char *, (char const *__s, int __c_in),
char const *, (char const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
@@ -438,7 +439,7 @@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
_GL_CXXALIAS_SYS_CAST2 (strpbrk,
char *, (char const *__s, char const *__accept),
const char *, (char const *__s, char const *__accept));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
_GL_CXXALIASWARN1 (strpbrk, char const *,
@@ -540,7 +541,7 @@ _GL_CXXALIAS_SYS_CAST2 (strstr,
char *, (const char *haystack, const char *needle),
const char *, (const char *haystack, const char *needle));
# endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
_GL_CXXALIASWARN1 (strstr, const char *,
@@ -589,7 +590,7 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr,
char *, (const char *haystack, const char *needle),
const char *, (const char *haystack, const char *needle));
# endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
_GL_CXXALIASWARN1 (strcasestr, const char *,
@@ -901,6 +902,35 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - "
"use gnulib module strerror to guarantee non-NULL result");
#endif
+/* Map any int, typically from errno, into an error message. Multithread-safe.
+ Uses the POSIX declaration, not the glibc declaration. */
+#if @GNULIB_STRERROR_R@
+# if @REPLACE_STRERROR_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strerror_r
+# define strerror_r rpl_strerror_r
+# endif
+_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# else
+# if !@HAVE_DECL_STRERROR_R@
+_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# endif
+# if @HAVE_DECL_STRERROR_R@
+_GL_CXXALIASWARN (strerror_r);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strerror_r
+# if HAVE_RAW_DECL_STRERROR_R
+_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
+ "use gnulib module strerror_r-posix for portability");
+# endif
+#endif
+
#if @GNULIB_STRSIGNAL@
# if @REPLACE_STRSIGNAL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/lib/gllib/wchar.in.h b/lib/gllib/wchar.in.h
index ed582e5..edae751 100644
--- a/lib/gllib/wchar.in.h
+++ b/lib/gllib/wchar.in.h
@@ -29,6 +29,7 @@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
+@PRAGMA_COLUMNS@
#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
/* Special invocation convention:
@@ -52,6 +53,10 @@
#define _GL_ALREADY_INCLUDING_WCHAR_H
+#if @HAVE_FEATURES_H@
+# include <features.h> /* for __GLIBC__ */
+#endif
+
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
diff --git a/lib/glm4/gnulib-common.m4 b/lib/glm4/gnulib-common.m4
index 4c7ac30..d0c8b66 100644
--- a/lib/glm4/gnulib-common.m4
+++ b/lib/glm4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 20
+# gnulib-common.m4 serial 21
dnl Copyright (C) 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,
@@ -102,6 +102,19 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
[Define to 1 when the gnulib module $1 should be tested.])
])
+# Test whether <features.h> exists.
+# Set HAVE_FEATURES_H.
+AC_DEFUN([gl_FEATURES_H],
+[
+ AC_CHECK_HEADERS_ONCE([features.h])
+ if test $ac_cv_header_features_h = yes; then
+ HAVE_FEATURES_H=1
+ else
+ HAVE_FEATURES_H=0
+ fi
+ AC_SUBST([HAVE_FEATURES_H])
+])
+
# m4_foreach_w
# is a backport of autoconf-2.59c's m4_foreach_w.
# Remove this macro when we can assume autoconf >= 2.60.
diff --git a/lib/glm4/include_next.m4 b/lib/glm4/include_next.m4
index 51a719b..e37eb05 100644
--- a/lib/glm4/include_next.m4
+++ b/lib/glm4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 15
+# include_next.m4 serial 16
dnl Copyright (C) 2006-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,
@@ -24,6 +24,13 @@ dnl does not warn about some things, and on some systems (Solaris and Interix)
dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
dnl of plain '__STDC__'.
+dnl
+dnl PRAGMA_COLUMNS can be used in files that override system header files, so
+dnl as to avoid compilation errors on HP NonStop systems when the gnulib file
+dnl is included by a system header file that does a "#pragma COLUMNS 80" (which
+dnl has the effect of truncating the lines of that file and all files that it
+dnl includes to 80 columns) and the gnulib file has lines longer than 80
+dnl columns.
AC_DEFUN([gl_INCLUDE_NEXT],
[
@@ -98,6 +105,24 @@ dnl We intentionally avoid using AC_LANG_SOURCE here.
AC_SUBST([INCLUDE_NEXT])
AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
AC_SUBST([PRAGMA_SYSTEM_HEADER])
+ AC_CACHE_CHECK([whether system header files limit the line length],
+ [gl_cv_pragma_columns],
+ [dnl HP NonStop systems, which define __TANDEM, have this misfeature.
+ AC_EGREP_CPP([choke me],
+ [
+#ifdef __TANDEM
+choke me
+#endif
+ ],
+ [gl_cv_pragma_columns=yes],
+ [gl_cv_pragma_columns=no])
+ ])
+ if test $gl_cv_pragma_columns = yes; then
+ PRAGMA_COLUMNS="#pragma COLUMNS 10000"
+ else
+ PRAGMA_COLUMNS=
+ fi
+ AC_SUBST([PRAGMA_COLUMNS])
])
# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
diff --git a/lib/glm4/string_h.m4 b/lib/glm4/string_h.m4
index 1977aec..5844b2d 100644
--- a/lib/glm4/string_h.m4
+++ b/lib/glm4/string_h.m4
@@ -5,7 +5,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 17
+# serial 18
# Written by Paul Eggert.
@@ -28,8 +28,8 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
gl_WARN_ON_USE_PREPARE([[#include <string.h>
]],
[memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
- strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal
- strverscmp])
+ strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
+ strsignal strverscmp])
])
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
@@ -75,6 +75,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
+ GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R])
GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
@@ -94,6 +95,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
+ HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R])
HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
@@ -103,6 +105,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
+ REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
diff --git a/lib/glm4/wchar_h.m4 b/lib/glm4/wchar_h.m4
index 8cae82d..8c8fad9 100644
--- a/lib/glm4/wchar_h.m4
+++ b/lib/glm4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 33
+# wchar_h.m4 serial 35
AC_DEFUN([gl_WCHAR_H],
[
@@ -26,6 +26,8 @@ AC_DEFUN([gl_WCHAR_H],
fi
AC_SUBST([HAVE_WCHAR_H])
+ AC_REQUIRE([gl_FEATURES_H])
+
AC_REQUIRE([gt_TYPE_WINT_T])
if test $gt_cv_c_wint_t = yes; then
HAVE_WINT_T=1
@@ -38,7 +40,7 @@ AC_DEFUN([gl_WCHAR_H],
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* Some systems require additional headers. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <stddef.h>
# include <stdio.h>
# include <time.h>
diff --git a/maint.mk b/maint.mk
index 55aeb7b..315b223 100644
--- a/maint.mk
+++ b/maint.mk
@@ -590,10 +590,19 @@ sc_changelog:
sc_program_name:
@require='set_program_name *\(m?argv\[0\]\);' \
in_vc_files='\.c$$' \
- containing='^main *(' \
+ containing='\<main *(' \
halt='the above files do not call set_program_name' \
$(_sc_search_regexp)
+# Ensure that each .c file containing a "main" function also
+# calls bindtextdomain.
+sc_bindtextdomain:
+ @require='bindtextdomain *\(' \
+ in_vc_files='\.c$$' \
+ containing='\<main *(' \
+ halt='the above files do not call bindtextdomain' \
+ $(_sc_search_regexp)
+
# Require that the final line of each test-lib.sh-using test be this one:
# Exit $fail
# Note: this test requires GNU grep's --label= option.
@@ -732,7 +741,8 @@ sc_GFDL_version:
halt='GFDL vN, N!=3' \
$(_sc_search_regexp)
-# Don't use Texinfo @acronym{} as it is not a good idea.
+# Don't use Texinfo's @acronym{}.
+# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
sc_texinfo_acronym:
@prohibit='@acronym\{' \
@@ -808,6 +818,13 @@ sc_prohibit_test_minus_ao:
halt='$(_ptm1); $(_ptm2)' \
$(_sc_search_regexp)
+# Avoid a test bashism.
+sc_prohibit_test_double_equal:
+ @prohibit='(\<test| \[+) .+ == ' \
+ containing='#! */bin/[a-z]*sh' \
+ halt='use "test x = x", not "test x =''= x"' \
+ $(_sc_search_regexp)
+
# Each program that uses proper_name_utf8 must link with one of the
# ICONV libraries. Otherwise, some ICONV library must appear in LDADD.
# The perl -0777 invocation below extracts the possibly-multi-line
@@ -1081,7 +1098,6 @@ emit_upload_commands:
@echo =====================================
@echo =====================================
-noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?]
define emit-commit-log
printf '%s\n' 'post-release administrivia' '' \
'* NEWS: Add header line for next release.' \
@@ -1119,6 +1135,7 @@ alpha beta stable: $(local-check) writable-files no-submodule-changes
# Override this in cfg.mk if you follow different procedures.
release-prep-hook ?= release-prep
+gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
.PHONY: release-prep
release-prep:
case $$RELEASE_TYPE in alpha|beta|stable) ;; \
@@ -1130,7 +1147,7 @@ release-prep:
fi
echo $(VERSION) > $(prev_version_file)
$(MAKE) update-NEWS-hash
- perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
+ perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS
$(emit-commit-log) > .ci-msg
$(VC) commit -F .ci-msg -a
rm .ci-msg