[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU libidn branch, master, updated. libidn-1-25-29-gec6c14a
From: |
Simon Josefsson |
Subject: |
[SCM] GNU libidn branch, master, updated. libidn-1-25-29-gec6c14a |
Date: |
Tue, 11 Dec 2012 16:11:24 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libidn".
http://git.savannah.gnu.org/cgit/libidn.git/commit/?id=ec6c14a46a926972bd57ee574f719406b08272dc
The branch, master has been updated
via ec6c14a46a926972bd57ee574f719406b08272dc (commit)
via 3403b9465c9fc193fd00c7bf73e13e0c1777bc3b (commit)
via 06eaa09511f8d53c227bda4283ed7ead74f088bf (commit)
via 27cc5a0eadbf97ba91682554bf992c5045d437fb (commit)
via c9a53203f31132a8081cd84d8ee31b012a4d4029 (commit)
via 2416b04740ec9a3a7a7148b58e610bfa97bb9b62 (commit)
via 7cf1b7d56d7c0cf9a94ecd66dd6ade1f365eb95e (commit)
via b2d7cc5f1a26c37696a09013f00879a065217d1c (commit)
via 005b8294fbcf7a49400914e92eb369a424703134 (commit)
via ff57031ecee8ce4914d7d678682db3206c1cbc99 (commit)
via 6dc5bb4abd800fc7fb0d5c490eeedbdfc4431e02 (commit)
via 069674b358b3cb42e425bc5fe320a3a3eb36bd04 (commit)
via ae207230e523f8c6fdd1d6d5e164ede48754bf93 (commit)
via 18f1feb0bbb84a1c6cf343ee4f358594c4bc36df (commit)
via da3f6cc4503e161ec88b99d0d0db468c3fa9fae6 (commit)
via 980e7e053362aae925fe6be34cf551e0aa00a703 (commit)
via 37b6284e6a0b54f7cde83cc2b41d7d74766e31a4 (commit)
from 1ae387a29aac1b598c0cf91d5f4b81cfbf0759b1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ec6c14a46a926972bd57ee574f719406b08272dc
Author: Simon Josefsson <address@hidden>
Date: Tue Dec 11 16:12:17 2012 +0100
Version 1.26.
commit 3403b9465c9fc193fd00c7bf73e13e0c1777bc3b
Author: Simon Josefsson <address@hidden>
Date: Mon Dec 10 22:08:14 2012 +0100
java: Permit usage by Apache projects.
commit 06eaa09511f8d53c227bda4283ed7ead74f088bf
Author: Simon Josefsson <address@hidden>
Date: Mon Dec 10 10:09:30 2012 +0100
Note additional dependencies.
commit 27cc5a0eadbf97ba91682554bf992c5045d437fb
Author: Simon Josefsson <address@hidden>
Date: Mon Dec 10 10:09:18 2012 +0100
Improve gendocs.sh usage.
commit c9a53203f31132a8081cd84d8ee31b012a4d4029
Author: Simon Josefsson <address@hidden>
Date: Sun Dec 9 05:35:36 2012 +0100
Add.
commit 2416b04740ec9a3a7a7148b58e610bfa97bb9b62
Author: Simon Josefsson <address@hidden>
Date: Sun Dec 9 05:32:55 2012 +0100
Fix mem leak.
commit 7cf1b7d56d7c0cf9a94ecd66dd6ade1f365eb95e
Author: Simon Josefsson <address@hidden>
Date: Sun Dec 9 05:32:45 2012 +0100
Ignore more.
commit b2d7cc5f1a26c37696a09013f00879a065217d1c
Author: Simon Josefsson <address@hidden>
Date: Sun Dec 9 05:32:02 2012 +0100
Check for out-of-bounds read (trigger with in={'f','o','o'} and inlen=3).
commit 005b8294fbcf7a49400914e92eb369a424703134
Author: Simon Josefsson <address@hidden>
Date: Sun Dec 9 05:03:48 2012 +0100
Silence warning.
commit ff57031ecee8ce4914d7d678682db3206c1cbc99
Author: Simon Josefsson <address@hidden>
Date: Sun Dec 9 04:58:49 2012 +0100
Update gnulib files.
commit 6dc5bb4abd800fc7fb0d5c490eeedbdfc4431e02
Author: Simon Josefsson <address@hidden>
Date: Thu Nov 22 10:40:13 2012 +0100
Sync with TP.
commit 069674b358b3cb42e425bc5fe320a3a3eb36bd04
Author: Simon Josefsson <address@hidden>
Date: Tue Sep 18 10:27:12 2012 +0200
Use modern gdoc.mk.
commit ae207230e523f8c6fdd1d6d5e164ede48754bf93
Author: Simon Josefsson <address@hidden>
Date: Tue Sep 18 10:23:43 2012 +0200
Silence clang warning in library.
commit 18f1feb0bbb84a1c6cf343ee4f358594c4bc36df
Author: Simon Josefsson <address@hidden>
Date: Tue Sep 18 10:21:17 2012 +0200
Add.
commit da3f6cc4503e161ec88b99d0d0db468c3fa9fae6
Author: Simon Josefsson <address@hidden>
Date: Tue Sep 18 10:05:56 2012 +0200
Improve tld self-test.
commit 980e7e053362aae925fe6be34cf551e0aa00a703
Author: Simon Josefsson <address@hidden>
Date: Tue Sep 18 09:52:59 2012 +0200
Sync with TP.
commit 37b6284e6a0b54f7cde83cc2b41d7d74766e31a4
Author: Simon Josefsson <address@hidden>
Date: Tue Sep 18 09:52:54 2012 +0200
Update gnulib files.
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 5 +
COPYING | 3 +
HACKING | 6 +
NEWS | 9 +-
build-aux/gendocs.sh | 167 ++++++++++++-------
build-aux/snippet/warn-on-use.h | 2 +-
cfg.mk | 5 +-
configure.ac | 1 +
doc/Makefile.am | 3 +-
doc/fdl-1.3.texi | 2 +-
doc/{Makefile.gdoci => gdoc.mk} | 8 +-
doc/gendocs_template | 2 -
gl/Makefile.am | 1 +
gl/errno.in.h | 5 +
gl/error.c | 4 +-
gl/m4/eealloc.m4 | 3 +-
gl/m4/errno_h.m4 | 5 +-
gl/m4/error.m4 | 1 -
gl/m4/extern-inline.m4 | 56 ++++++
gl/m4/fcntl-o.m4 | 13 ++-
gl/m4/fstat.m4 | 7 +-
gl/m4/gnulib-cache.m4 | 2 +-
gl/m4/gnulib-comp.m4 | 354 ++++++++++++++++++++-------------------
gl/m4/lstat.m4 | 8 +-
gl/m4/manywarnings.m4 | 185 +++++++++++++--------
gl/m4/open.m4 | 3 +-
gl/m4/stat.m4 | 8 +-
gl/m4/stdio_h.m4 | 3 +-
gl/m4/stdlib_h.m4 | 1 +
gl/m4/sys_socket_h.m4 | 3 +-
gl/m4/sys_stat_h.m4 | 5 +-
gl/m4/unistd_h.m4 | 3 +-
gl/strerror-override.c | 5 +
gl/strerror-override.h | 3 +-
gl/unistd.c | 3 +
gl/unistd.in.h | 10 +-
gltests/Makefile.am | 4 +-
gltests/binary-io.c | 3 +
gltests/binary-io.h | 11 +-
gltests/fcntl.in.h | 14 ++-
gltests/fstat.c | 4 +-
gltests/lstat.c | 2 +-
gltests/malloca.h | 2 +-
gltests/open.c | 2 +-
gltests/stat.c | 2 +-
gltests/stdbool.in.h | 51 ++++---
gltests/stdio.c | 3 +
gltests/stdio.in.h | 8 +-
gltests/stdlib.in.h | 13 ++-
gltests/sys_stat.in.h | 2 +-
java/LICENSE-2.0.txt | 202 ++++++++++++++++++++++
java/Makefile.am | 2 +
lib/gl/m4/eealloc.m4 | 3 +-
lib/gl/m4/extern-inline.m4 | 56 ++++++
lib/gl/m4/gnulib-cache.m4 | 2 +-
lib/gl/m4/gnulib-comp.m4 | 192 +++++++++++-----------
lib/gl/m4/lib-ld.m4 | 58 ++++---
lib/gl/m4/lock.m4 | 8 +-
lib/gl/m4/stdlib_h.m4 | 1 +
lib/gl/m4/thread.m4 | 3 +-
lib/gl/m4/unistd_h.m4 | 3 +-
lib/gl/stdbool.in.h | 51 ++++---
lib/gltests/Makefile.am | 2 +
lib/gltests/glthread/lock.c | 6 +-
lib/gltests/glthread/thread.c | 3 +-
lib/gltests/glthread/thread.h | 9 +-
lib/gltests/localename.c | 133 ++-------------
lib/gltests/malloca.h | 2 +-
lib/gltests/stdlib.in.h | 13 ++-
lib/gltests/unistd.c | 3 +
lib/gltests/unistd.in.h | 10 +-
lib/nfkc.c | 2 +-
lib/tld.c | 3 +-
maint.mk | 157 +++++++++++------
po/hr.po.in | 44 ++++-
tests/tst_tld.c | 122 ++++++++++++++
76 files changed, 1380 insertions(+), 735 deletions(-)
rename doc/{Makefile.gdoci => gdoc.mk} (81%)
create mode 100644 gl/m4/extern-inline.m4
create mode 100644 gl/unistd.c
create mode 100644 gltests/binary-io.c
create mode 100644 gltests/stdio.c
create mode 100644 java/LICENSE-2.0.txt
create mode 100644 lib/gl/m4/extern-inline.m4
create mode 100644 lib/gltests/unistd.c
diff --git a/.gitignore b/.gitignore
index 2ae340a..5d00fd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -149,6 +149,8 @@ gl/progname.o
gl/string.h
gl/sys/
gl/unistd.h
+gl/unistd.lo
+gl/unistd.o
gl/version-etc.lo
gl/version-etc.o
gl/warn-on-use.h
@@ -157,6 +159,7 @@ gltests/Makefile
gltests/Makefile.in
gltests/alloca.h
gltests/arg-nonnull.h
+gltests/binary-io.o
gltests/c++defs.h
gltests/fcntl.h
gltests/fd-hook.o
@@ -164,6 +167,7 @@ gltests/inttypes.h
gltests/libtests.a
gltests/malloca.o
gltests/stdio.h
+gltests/stdio.o
gltests/stdlib.h
gltests/sys/
gltests/test-alloca-opt
@@ -404,6 +408,7 @@ lib/gltests/test-verify
lib/gltests/test-wchar
lib/gltests/test-wchar.o
lib/gltests/unistd.h
+lib/gltests/unistd.o
lib/gltests/unistr/.deps/
lib/gltests/unistr/.dirstamp
lib/gltests/unistr/test-u8-mbtoucr.o
diff --git a/COPYING b/COPYING
index f651116..43418dd 100644
--- a/COPYING
+++ b/COPYING
@@ -9,6 +9,9 @@ or later (see the file COPYINGv2) or the GNU Lesser General
Public
License version 3.0 or later (see the file COPYING.LESSERv3), or both
in parallel as here.
+The author of the Java library has agreed to also distribute it under
+the Apache License Version 2.0 (see the file java/LICENSE-2.0).
+
The manual is licensed under the GNU Free Documentation License,
Version 1.3 or any later.
diff --git a/HACKING b/HACKING
index 45fe63f..5a9aea4 100644
--- a/HACKING
+++ b/HACKING
@@ -28,6 +28,11 @@ We require several tools to build the software, including:
- gjdoc <http://www.gnu.org/software/classpath/cp-tools/> (for java port)
- Mono mcs <http://www.mono.org/> (for C# port)
- fig2dev <http://www-epb.lbl.gov/xfig/>
+- Mingw (optional, to produce Windows binaries)
+- Wine (optional, to self-check Windows binaries)
+- Lcov (optional, to produce coverage HTML pages)
+- Clang (optional, to produce clang analysis)
+- Doxygen (optional, to produce doxygen manual)
The required software is typically distributed with your operating
system, and the instructions for installing them differ. Here are
@@ -38,6 +43,7 @@ apt-get install make git-core autoconf automake libtool
gettext cvs
apt-get install texinfo texlive texlive-generic-recommended texlive-extra-utils
apt-get install help2man gtk-doc-tools valgrind gengetopt
apt-get install gcj-jdk gjdoc transfig mono-mcs binfmt-support gperf
+apt-get install mingw-w64 wine binfmt-support zip lcov
To download the version controlled sources:
diff --git a/NEWS b/NEWS
index 153eaee..1e33cb5 100644
--- a/NEWS
+++ b/NEWS
@@ -2,14 +2,21 @@ Libidn NEWS -- History of user-visible changes.
-*- outline -*-
Copyright (C) 2002-2012 Simon Josefsson
See the end for copying conditions.
-* Version 1.26 (unreleased) [stable]
+* Version 1.26 (released 2012-12-11) [stable]
** libidn, idna_to_ascii: Propagate error on malloc failure.
Reported by Sarat Chandra Addepalli <address@hidden>.
+** libidn, tld_get_4: Fix out of bounds read access violation.
+
** i18n: Added Croatian translation. Updated Vietnamese translation.
Thanks to Tomislav Krznar and Trần Ngá»c Quân.
+** java: Permit usage by Apache projects.
+Thanks to Oliver Hitz and Angus Turner.
+
+** tests: Improve tld self-tests.
+
** API and ABI is backwards compatible with the previous version.
* Version 1.25 (released 2012-05-23) [stable]
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index c8abd55..0c0bc4b 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,10 +2,10 @@
# 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=2011-04-08.14
+scriptversion=2012-10-27.11
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+# 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
@@ -30,6 +30,12 @@ scriptversion=2011-04-08.14
#
# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
+# TODO:
+# - image importation was only implemented for HTML generated by
+# makeinfo. But it should be simple enough to adjust.
+# - images are not imported in the source tarball. All the needed
+# formats (PDF, PNG, etc.) should be included.
+
prog=`basename "$0"`
srcdir=`pwd`
@@ -39,35 +45,37 @@
templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/
: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
: ${TEXI2DVI="texi2dvi -t @finalout"}
-: ${DVIPS="dvips"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2PS="docbook2ps"}
: ${DOCBOOK2TXT="docbook2txt"}
: ${GENDOCS_TEMPLATE_DIR="."}
+: ${PERL='perl'}
: ${TEXI2HTML="texi2html"}
unset CDPATH
unset use_texi2html
version="gendocs.sh $scriptversion
-Copyright 2010 Free Software Foundation, Inc.
+Copyright 2012 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
-Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
-See the GNU Maintainers document for a more extensive discussion:
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source. See the GNU Maintainers document for a more extensive
+discussion:
http://www.gnu.org/prep/maintain_toc.html
Options:
-s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
-o OUTDIR write files into OUTDIR, instead of manual/.
+ -I DIR append DIR to the Texinfo search path.
--email ADR use ADR as contact in generated web pages.
- --docbook convert to DocBook too (xml, txt, html, pdf and ps).
+ --docbook convert through DocBook too (xml, txt, html, pdf).
--html ARG pass indicated ARG to makeinfo or texi2html for HTML targets.
+ --info ARG pass indicated ARG to makeinfo for Info, instead of --no-split.
--texi2html use texi2html to generate HTML targets.
--help display this help and exit successfully.
--version display version information and exit successfully.
@@ -80,11 +88,11 @@ Typical sequence:
wget \"$templateurl\"
$prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
-Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
-to override). Move all the new files into your web CVS tree, as
-explained in the Web Pages node of maintain.texi.
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override). Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
-Please use the --email ADDRESS option to specify your bug-reporting
+Please do use the --email ADDRESS option to specify your bug-reporting
address in the generated HTML pages.
MANUAL-TITLE is included as part of the HTML <title> of the overall
@@ -102,11 +110,14 @@ If a manual's Texinfo sources are spread across several
directories,
first copy or symlink all Texinfo sources into a single directory.
(Part of the script's work is to make a tar.gz of the sources.)
-You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and
-DVIPS to control the programs that get executed, and
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
+and PERL to control the programs that get executed, and
GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
looked for. With --docbook, the environment variables DOCBOOK2HTML,
-DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected.
+DOCBOOK2PDF, and DOCBOOK2TXT are also respected.
By default, makeinfo and texi2dvi are run in the default (English)
locale, since that's the language of most Texinfo manuals. If you
@@ -116,16 +127,13 @@ SETLANG setting in the source.
Email bug reports or enhancement requests to address@hidden
"
-calcsize()
-{
- size=`ls -ksl $1 | awk '{print $1}'`
- echo $size
-}
-
MANUAL_TITLE=
PACKAGE=
address@hidden # please override with --email
+commonarg= # Options passed to all the tools (-I dir).
+dirs= # -I's directories.
htmlarg=
+infoarg=--no-split
outdir=manual
srcfile=
@@ -136,8 +144,10 @@ while test $# -gt 0; do
--version) echo "$version"; exit 0;;
-s) shift; srcfile=$1;;
-o) shift; outdir=$1;;
+ -I) shift; commonarg="$commonarg -I '$1'"; dirs="$dirs $1";;
--docbook) docbook=yes;;
--html) shift; htmlarg=$1;;
+ --info) shift; infoarg=$1;;
--texi2html) use_texi2html=1;;
-*)
echo "$0: Unknown option \`$1'." >&2
@@ -183,15 +193,64 @@ if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
exit 1
fi
+# Function to return size of $1 in something resembling kilobytes.
+calcsize()
+{
+ size=`ls -ksl $1 | awk '{print $1}'`
+ echo $size
+}
+
+# copy_images OUTDIR HTML-FILE...
+# -------------------------------
+# Copy all the images needed by the HTML-FILEs into OUTDIR. Look
+# for them in the -I directories.
+copy_images()
+{
+ local odir
+ odir=$1
+ shift
+ $PERL -n -e "
+BEGIN {
+ \$me = '$prog';
+ \$odir = '$odir';
+ @dirs = qw($dirs);
+}
+" -e '
+/<img src="(.*?)"/g && ++$need{$1};
+
+END {
+ #print "$me: @{[keys %need]}\n"; # for debugging, show images found.
+ FILE: for my $f (keys %need) {
+ for my $d (@dirs) {
+ if (-f "$d/$f") {
+ use File::Basename;
+ my $dest = dirname ("$odir/$f");
+ #
+ use File::Path;
+ -d $dest || mkpath ($dest)
+ || die "$me: cannot mkdir $dest: $!\n";
+ #
+ use File::Copy;
+ copy ("$d/$f", $dest)
+ || die "$me: cannot copy $d/$f to $dest: $!\n";
+ next FILE;
+ }
+ }
+ die "$me: $ARGV: cannot find image $f\n";
+ }
+}
+' -- "$@" || exit 1
+}
+
case $outdir in
/*) abs_outdir=$outdir;;
*) abs_outdir=$srcdir/$outdir;;
esac
-echo Generating output formats for $srcfile
+echo "Generating output formats for $srcfile"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
-echo "Generating info files... ($cmd)"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+echo "Generating info file(s)... ($cmd)"
eval "$cmd"
mkdir -p "$outdir/"
tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
@@ -199,29 +258,23 @@ info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
# do not mv the info files, there's no point in having them available
# separately on the web.
-cmd="$SETLANG ${TEXI2DVI} \"$srcfile\""
+cmd="$SETLANG $TEXI2DVI $commonarg \"$srcfile\""
echo "Generating dvi ... ($cmd)"
eval "$cmd"
-# now, before we compress dvi:
-echo Generating postscript...
-${DVIPS} $PACKAGE -o
-gzip -f -9 $PACKAGE.ps
-ps_gz_size=`calcsize $PACKAGE.ps.gz`
-mv $PACKAGE.ps.gz "$outdir/"
-
# compress/finish dvi:
gzip -f -9 $PACKAGE.dvi
dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
mv $PACKAGE.dvi.gz "$outdir/"
-cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\""
+cmd="$SETLANG $TEXI2DVI --pdf $commonarg \"$srcfile\""
echo "Generating pdf ... ($cmd)"
eval "$cmd"
pdf_size=`calcsize $PACKAGE.pdf`
mv $PACKAGE.pdf "$outdir/"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
+opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
+cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
echo "Generating ASCII... ($cmd)"
eval "$cmd"
ascii_size=`calcsize $PACKAGE.txt`
@@ -231,7 +284,7 @@ mv $PACKAGE.txt "$outdir/"
html_split()
{
- opt="--split=$1 $htmlarg --node-files"
+ opt="--split=$1 $commonarg $htmlarg --node-files"
cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
echo "Generating html by $1... ($cmd)"
eval "$cmd"
@@ -249,7 +302,7 @@ html_split()
}
if test -z "$use_texi2html"; then
- opt="--no-split --html -o $PACKAGE.html $htmlarg"
+ opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
echo "Generating monolithic html... ($cmd)"
rm -rf $PACKAGE.html # in case a directory is left over
@@ -257,23 +310,25 @@ if test -z "$use_texi2html"; then
html_mono_size=`calcsize $PACKAGE.html`
gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ copy_images "$outdir/" $PACKAGE.html
mv $PACKAGE.html "$outdir/"
- cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\""
+ opt="--html -o $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
echo "Generating html by node... ($cmd)"
eval "$cmd"
split_html_dir=$PACKAGE.html
+ copy_images $split_html_dir/ $split_html_dir/*.html
(
- cd ${split_html_dir} || exit 1
- tar -czf "$abs_outdir/${PACKAGE}.html_node.tar.gz" -- *.html
+ cd $split_html_dir || exit 1
+ tar -czf "$abs_outdir/$PACKAGE.html_node.tar.gz" -- *
)
- html_node_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node.tar.gz"`
- rm -f "$outdir"/html_node/*.html
- mkdir -p "$outdir/html_node/"
- mv ${split_html_dir}/*.html "$outdir/html_node/"
- rmdir ${split_html_dir}
+ html_node_tgz_size=`calcsize "$outdir/$PACKAGE.html_node.tar.gz"`
+ rm -rf "$outdir/html_node/"
+ mv $split_html_dir "$outdir/html_node/"
else
- cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\""
+ opt="--output $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
echo "Generating monolithic html... ($cmd)"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
@@ -297,7 +352,8 @@ d=`dirname $srcfile`
texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
if test -n "$docbook"; then
- cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" >
${srcdir}/$PACKAGE-db.xml"
+ opt="-o - --docbook $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
echo "Generating docbook XML... ($cmd)"
eval "$cmd"
docbook_xml_size=`calcsize $PACKAGE-db.xml`
@@ -306,7 +362,8 @@ if test -n "$docbook"; then
mv $PACKAGE-db.xml "$outdir/"
split_html_db_dir=html_node_db
- cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\""
+ opt="$commonarg -o $split_html_db_dir"
+ cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
echo "Generating docbook HTML... ($cmd)"
eval "$cmd"
(
@@ -319,20 +376,13 @@ if test -n "$docbook"; then
mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
rmdir ${split_html_db_dir}
- cmd="${DOCBOOK2TXT} \"${outdir}/$PACKAGE-db.xml\""
+ cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
echo "Generating docbook ASCII... ($cmd)"
eval "$cmd"
docbook_ascii_size=`calcsize $PACKAGE-db.txt`
mv $PACKAGE-db.txt "$outdir/"
- cmd="${DOCBOOK2PS} \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook PS... ($cmd)"
- eval "$cmd"
- gzip -f -9 -c $PACKAGE-db.ps >"$outdir/$PACKAGE-db.ps.gz"
- docbook_ps_gz_size=`calcsize "$outdir/$PACKAGE-db.ps.gz"`
- mv $PACKAGE-db.ps "$outdir/"
-
- cmd="${DOCBOOK2PDF} \"${outdir}/$PACKAGE-db.xml\""
+ cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
echo "Generating docbook PDF... ($cmd)"
eval "$cmd"
docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
@@ -346,6 +396,7 @@ if test -z "$use_texi2html"; then
else
CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
fi
+
curdate=`$SETLANG date '+%B %d, %Y'`
sed \
-e "s!%%TITLE%%!$MANUAL_TITLE!g" \
@@ -360,13 +411,11 @@ sed \
-e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
-e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
-e "s!%%PDF_SIZE%%!$pdf_size!g" \
- -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \
-e "s!%%ASCII_SIZE%%!$ascii_size!g" \
-e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
-e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
-e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
-e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
- -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \
-e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
-e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
-e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h
index d4cb94f..51e69bb 100644
--- a/build-aux/snippet/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -55,7 +55,7 @@
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
#if HAVE_RAW_DECL_ENVIRON
- static inline char ***rpl_environ (void) { return &environ; }
+ static char ***rpl_environ (void) { return &environ; }
_GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
# undef environ
# define environ (*rpl_environ ())
diff --git a/cfg.mk b/cfg.mk
index a8638ed..c639363 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -112,9 +112,8 @@ cyclo-upload:
cd $(htmldir) && cvs commit -m "Update." cyclo/index.html
gendoc-copy:
- cd doc && env MAKEINFO="makeinfo -I ../examples" \
- TEXI2DVI="texi2dvi -I ../examples" \
- $(SHELL) ../build-aux/gendocs.sh \
+ cd doc && $(SHELL) ../build-aux/gendocs.sh -I ../examples -I . \
+ --email $(PACKAGE_BUGREPORT) \
--html "--css-include=texinfo.css" \
-o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
diff --git a/configure.ac b/configure.ac
index f67afb7..0fdef2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -156,6 +156,7 @@ if test "$gl_gcc_warnings" = yes; then
done
gl_WARN_ADD([-fdiagnostics-show-option])
+ gl_WARN_ADD([-Wno-missing-field-initializers]) # Rely on missing field = 0.
fi
AC_CONFIG_FILES([
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 100eaf0..b99c5e7 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -60,6 +60,7 @@ idn.1: $(top_srcdir)/src/idn.c $(top_srcdir)/src/idn.ggo \
# GDOC
+GDOC_BIN = $(srcdir)/gdoc
GDOC_SRC = $(top_srcdir)/lib/idna.c $(top_srcdir)/lib/nfkc.c \
$(top_srcdir)/lib/pr29.c $(top_srcdir)/lib/punycode.c \
$(top_srcdir)/lib/stringprep.c $(top_srcdir)/lib/tld.c \
@@ -76,4 +77,4 @@ GDOC_MAN_EXTRA_ARGS = -module $(PACKAGE) -sourceversion
$(VERSION) \
-includefuncprefix -seeinfo $(PACKAGE) \
-copyright "2002-2012 Simon Josefsson" \
-verbatimcopying
-include $(srcdir)/Makefile.gdoci
+include $(srcdir)/gdoc.mk
diff --git a/doc/fdl-1.3.texi b/doc/fdl-1.3.texi
index cb71f05..9c3bbe5 100644
--- a/doc/fdl-1.3.texi
+++ b/doc/fdl-1.3.texi
@@ -97,7 +97,7 @@ format, SGML or XML using a publicly available
DTD, and standard-conforming simple HTML,
PostScript or PDF designed for human modification. Examples
of transparent image formats include PNG, XCF and
-JPG. Opaque formats include proprietary formats that can be
address@hidden Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, SGML or
XML for which the DTD and/or processing tools are
not generally available, and the machine-generated HTML,
diff --git a/doc/Makefile.gdoci b/doc/gdoc.mk
similarity index 81%
rename from doc/Makefile.gdoci
rename to doc/gdoc.mk
index 0198095..3d67714 100644
--- a/doc/Makefile.gdoci
+++ b/doc/gdoc.mk
@@ -18,7 +18,7 @@
BUILT_SOURCES = Makefile.gdoc
-Makefile.gdoc: $(top_builddir)/configure Makefile.am Makefile.gdoci $(GDOC_SRC)
+Makefile.gdoc: $(top_builddir)/configure Makefile.am gdoc.mk $(GDOC_SRC)
echo '# This file is automatically generated. DO NOT EDIT!
-*- makefile -*-' > Makefile.gdoc
echo >> Makefile.gdoc
echo 'gdoc_TEXINFOS =' >> Makefile.gdoc
@@ -32,7 +32,7 @@ Makefile.gdoc: $(top_builddir)/configure Makefile.am
Makefile.gdoci $(GDOC_SRC)
echo "gdoc_TEXINFOS += $(GDOC_TEXI_PREFIX)$$shortfile.texi" >>
Makefile.gdoc; \
echo "$(GDOC_TEXI_PREFIX)$$shortfile.texi: $$file" >> Makefile.gdoc; \
echo 'TABmkdir -p `dirname address@hidden' | sed "s/TAB/ /" >>
Makefile.gdoc; \
- echo 'TAB$$(PERL) $$(top_srcdir)/doc/gdoc -texinfo
$$(GDOC_TEXI_EXTRA_ARGS) $$< > $$@' | sed "s/TAB/ /" >> Makefile.gdoc; \
+ echo 'TAB$$(PERL) $(GDOC_BIN) -texinfo $$(GDOC_TEXI_EXTRA_ARGS) $$< >
$$@' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo >> Makefile.gdoc; \
functions=`$(PERL) $(srcdir)/gdoc -listfunc $$file`; \
for function in $$functions; do \
@@ -40,12 +40,12 @@ Makefile.gdoc: $(top_builddir)/configure Makefile.am
Makefile.gdoci $(GDOC_SRC)
echo "gdoc_TEXINFOS += $(GDOC_TEXI_PREFIX)$$function.texi" >>
Makefile.gdoc; \
echo "$(GDOC_TEXI_PREFIX)$$function.texi: $$file" >> Makefile.gdoc;
\
echo 'TABmkdir -p `dirname address@hidden' | sed "s/TAB/ /" >>
Makefile.gdoc; \
- echo 'TAB$$(PERL) $$(top_srcdir)/doc/gdoc -texinfo
$$(GDOC_TEXI_EXTRA_ARGS) -function'" $$function"' $$< > $$@' | sed "s/TAB/
/" >> Makefile.gdoc; \
+ echo 'TAB$$(PERL) $(GDOC_BIN) -texinfo $$(GDOC_TEXI_EXTRA_ARGS)
-function'" $$function"' $$< > $$@' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo >> Makefile.gdoc; \
echo "gdoc_MANS += $(GDOC_MAN_PREFIX)$$function.3" >>
Makefile.gdoc; \
echo "$(GDOC_MAN_PREFIX)$$function.3: $$file" >> Makefile.gdoc; \
echo 'TABmkdir -p `dirname address@hidden' | sed "s/TAB/ /" >>
Makefile.gdoc; \
- echo 'TAB$$(PERL) $$(top_srcdir)/doc/gdoc -man
$$(GDOC_MAN_EXTRA_ARGS) -function'" $$function"' $$< > $$@' | sed "s/TAB/ /"
>> Makefile.gdoc; \
+ echo 'TAB$$(PERL) $(GDOC_BIN) -man $$(GDOC_MAN_EXTRA_ARGS)
-function'" $$function"' $$< > $$@' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo >> Makefile.gdoc; \
done; \
echo >> Makefile.gdoc; \
diff --git a/doc/gendocs_template b/doc/gendocs_template
index c5d84c7..e58e939 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -45,8 +45,6 @@
(%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
(%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
-<li><a href="%%PACKAGE%%.ps.gz">PostScript file
- (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.pdf">PDF file
(%%PDF_SIZE%%K bytes)</a>.</li>
<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
diff --git a/gl/Makefile.am b/gl/Makefile.am
index e6d8273..2b3422a 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -483,6 +483,7 @@ EXTRA_DIST += sys_types.in.h
## begin gnulib module unistd
BUILT_SOURCES += unistd.h
+libgnu_la_SOURCES += unistd.c
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
diff --git a/gl/errno.in.h b/gl/errno.in.h
index 5e5af92..f9612c3 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -270,5 +270,10 @@
# define GNULIB_defined_ENOTRECOVERABLE 1
# endif
+# ifndef EILSEQ
+# define EILSEQ 2015
+# define GNULIB_defined_EILSEQ 1
+# endif
+
#endif /* address@hidden@_ERRNO_H */
#endif /* address@hidden@_ERRNO_H */
diff --git a/gl/error.c b/gl/error.c
index dc8c65f..7d2bc71 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -121,7 +121,7 @@ extern char *program_name;
#if !_LIBC
/* Return non-zero if FD is open. */
-static inline int
+static int
is_open (int fd)
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@@ -139,7 +139,7 @@ is_open (int fd)
}
#endif
-static inline void
+static void
flush_stdout (void)
{
#if !_LIBC
diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
index 75f17e2..9e5df45 100644
--- a/gl/m4/eealloc.m4
+++ b/gl/m4/eealloc.m4
@@ -1,4 +1,4 @@
-# eealloc.m4 serial 2
+# eealloc.m4 serial 3
dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,6 @@ AC_DEFUN([gl_EEALLOC],
[
AC_REQUIRE([gl_EEMALLOC])
AC_REQUIRE([gl_EEREALLOC])
- AC_REQUIRE([AC_C_INLINE])
])
AC_DEFUN([gl_EEMALLOC],
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 1e76ba2..4e33ba8 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,4 +1,4 @@
-# errno_h.m4 serial 11
+# errno_h.m4 serial 12
dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -58,6 +58,9 @@ booboo
#if !defined ENOTRECOVERABLE
booboo
#endif
+#if !defined EILSEQ
+booboo
+#endif
],
[gl_cv_header_errno_h_complete=no],
[gl_cv_header_errno_h_complete=yes])
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index 5d9c70a..1190e32 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -23,6 +23,5 @@ AC_DEFUN([gl_ERROR],
AC_DEFUN([gl_PREREQ_ERROR],
[
AC_REQUIRE([AC_FUNC_STRERROR_R])
- AC_REQUIRE([AC_C_INLINE])
:
])
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
new file mode 100644
index 0000000..2492260
--- /dev/null
+++ b/gl/m4/extern-inline.m4
@@ -0,0 +1,56 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+ AH_VERBATIM([extern_inline],
+[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
+ _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
+ _GL_INLINE_HEADER_BEGIN contains useful stuff to put
+ in an include file, before uses of _GL_INLINE.
+ It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
+ when FOO is an inline function in the header; see
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
+ _GL_INLINE_HEADER_END contains useful stuff to put
+ in the same include file, after uses of _GL_INLINE. */
+#if (__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : 199901L <= __STDC_VERSION__)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# if __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+#else
+# define _GL_INLINE static
+# define _GL_EXTERN_INLINE static
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 9862741..740e78b 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -50,7 +50,18 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
#if HAVE_SYMLINK
{
static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0)
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
result |= 2;
else
{
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index 3ab3297..a73baa2 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,4 +1,4 @@
-# fstat.m4 serial 3
+# fstat.m4 serial 4
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,4 @@ AC_DEFUN([gl_FUNC_FSTAT],
])
# Prerequisites of lib/fstat.c.
-AC_DEFUN([gl_PREREQ_FSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FSTAT], [:])
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 0525d68..36620d9 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -63,5 +63,5 @@ gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([gl])
gl_PO_DOMAIN([])
-gl_WITNESS_C_DOMAIN([])
+gl_WITNESS_C_MACRO([])
gl_VC_FILES([false])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index c295cdb..e6a49df 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -58,6 +58,7 @@ AC_DEFUN([gl_EARLY],
# Code from module error:
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ # Code from module extern-inline:
# Code from module fcntl-h:
# Code from module fd-hook:
# Code from module fdl-1.3:
@@ -174,84 +175,85 @@ AC_DEFUN([gl_INIT],
m4_pushdef([gl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='gl'
-AC_REQUIRE([gt_CSHARPCOMP])
-AC_CONFIG_FILES([csharpcomp.sh:build-aux/csharpcomp.sh.in])
-# You need to invoke gt_CSHARPEXEC yourself, possibly with arguments.
-AC_CONFIG_FILES([csharpexec.sh:build-aux/csharpexec.sh.in])
-gl_HEADER_ERRNO_H
-gl_ERROR
-if test $ac_cv_lib_error_at_line = no; then
- AC_LIBOBJ([error])
- gl_PREREQ_ERROR
-fi
-m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
- AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
-gl_FUNC_GETOPT_GNU
-if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_GL_UNISTD_H_GETOPT=1
-fi
-AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
-gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
-gl_FUNC_GETOPT_POSIX
-if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_GL_UNISTD_H_GETOPT=1
-fi
-AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
-AC_SUBST([LIBINTL])
-AC_SUBST([LTLIBINTL])
-# Autoconf 2.61a.99 and earlier don't support linking a file only
-# in VPATH builds. But since GNUmakefile is for maintainer use
-# only, it does not matter if we skip the link with older autoconf.
-# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
-# builds, so use a shell variable to bypass this.
-GNUmakefile=GNUmakefile
-m4_if(m4_version_compare([2.61a.100],
- m4_defn([m4_PACKAGE_VERSION])), [1], [],
- [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
- [GNUmakefile=$GNUmakefile])])
-AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
- [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
-gl_MSVC_INVAL
-if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- AC_LIBOBJ([msvc-inval])
-fi
-gl_MSVC_NOTHROW
-if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- AC_LIBOBJ([msvc-nothrow])
-fi
-AC_PATH_PROG([PMCCABE], [pmccabe], [false])
-AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
-AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
-gt_TYPE_SSIZE_T
-gl_STDARG_H
-gl_STDDEF_H
-gl_FUNC_STRERROR
-if test $REPLACE_STRERROR = 1; then
- AC_LIBOBJ([strerror])
-fi
-gl_MODULE_INDICATOR([strerror])
-gl_STRING_MODULE_INDICATOR([strerror])
-AC_REQUIRE([gl_HEADER_ERRNO_H])
-AC_REQUIRE([gl_FUNC_STRERROR_0])
-if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
- AC_LIBOBJ([strerror-override])
- gl_PREREQ_SYS_H_WINSOCK2
-fi
-gl_HEADER_STRING_H
-gl_SYS_TYPES_H
-AC_PROG_MKDIR_P
-gl_UNISTD_H
-gl_VALGRIND_TESTS
-gl_VERSION_ETC
+ AC_REQUIRE([gt_CSHARPCOMP])
+ AC_CONFIG_FILES([csharpcomp.sh:build-aux/csharpcomp.sh.in])
+ # You need to invoke gt_CSHARPEXEC yourself, possibly with arguments.
+ AC_CONFIG_FILES([csharpexec.sh:build-aux/csharpexec.sh.in])
+ gl_HEADER_ERRNO_H
+ gl_ERROR
+ if test $ac_cv_lib_error_at_line = no; then
+ AC_LIBOBJ([error])
+ gl_PREREQ_ERROR
+ fi
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+ AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ AC_REQUIRE([gl_EXTERN_INLINE])
+ gl_FUNC_GETOPT_GNU
+ if test $REPLACE_GETOPT = 1; then
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_PREREQ_GETOPT
+ dnl Arrange for unistd.h to include getopt.h.
+ GNULIB_GL_UNISTD_H_GETOPT=1
+ fi
+ AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+ gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
+ gl_FUNC_GETOPT_POSIX
+ if test $REPLACE_GETOPT = 1; then
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_PREREQ_GETOPT
+ dnl Arrange for unistd.h to include getopt.h.
+ GNULIB_GL_UNISTD_H_GETOPT=1
+ fi
+ AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ m4_if(m4_version_compare([2.61a.100],
+ m4_defn([m4_PACKAGE_VERSION])), [1], [],
+ [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+ [GNUmakefile=$GNUmakefile])])
+ AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+ [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+ gl_MSVC_INVAL
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ AC_LIBOBJ([msvc-inval])
+ fi
+ gl_MSVC_NOTHROW
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ AC_LIBOBJ([msvc-nothrow])
+ fi
+ AC_PATH_PROG([PMCCABE], [pmccabe], [false])
+ AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+ gt_TYPE_SSIZE_T
+ gl_STDARG_H
+ gl_STDDEF_H
+ gl_FUNC_STRERROR
+ if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
+ fi
+ gl_MODULE_INDICATOR([strerror])
+ gl_STRING_MODULE_INDICATOR([strerror])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ AC_REQUIRE([gl_FUNC_STRERROR_0])
+ if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+ AC_LIBOBJ([strerror-override])
+ gl_PREREQ_SYS_H_WINSOCK2
+ fi
+ gl_HEADER_STRING_H
+ gl_SYS_TYPES_H
+ AC_PROG_MKDIR_P
+ gl_UNISTD_H
+ gl_VALGRIND_TESTS
+ gl_VERSION_ETC
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -298,103 +300,101 @@ changequote([, ])dnl
AC_SUBST([gltests_WITNESS])
gl_module_indicator_condition=$gltests_WITNESS
m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
-gl_FUNC_ALLOCA
-AC_REQUIRE([AC_C_INLINE])
-gl_FUNC_CLOSE
-if test $REPLACE_CLOSE = 1; then
- AC_LIBOBJ([close])
-fi
-gl_UNISTD_MODULE_INDICATOR([close])
-gl_FUNC_DUP2
-if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
- AC_LIBOBJ([dup2])
- gl_PREREQ_DUP2
-fi
-gl_UNISTD_MODULE_INDICATOR([dup2])
-gl_ENVIRON
-gl_UNISTD_MODULE_INDICATOR([environ])
-gl_FCNTL_H
-gl_FUNC_FDOPEN
-if test $REPLACE_FDOPEN = 1; then
- AC_LIBOBJ([fdopen])
- gl_PREREQ_FDOPEN
-fi
-gl_STDIO_MODULE_INDICATOR([fdopen])
-gl_FUNC_FSTAT
-if test $REPLACE_FSTAT = 1; then
- AC_LIBOBJ([fstat])
- gl_PREREQ_FSTAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([fstat])
-gl_FUNC_GETCWD_LGPL
-if test $REPLACE_GETCWD = 1; then
- AC_LIBOBJ([getcwd-lgpl])
-fi
-gl_UNISTD_MODULE_INDICATOR([getcwd])
-AC_REQUIRE([AC_C_INLINE])
-gl_INTTYPES_H
-gl_INTTYPES_INCOMPLETE
-AC_REQUIRE([gl_LARGEFILE])
-gl_FUNC_LSTAT
-if test $REPLACE_LSTAT = 1; then
- AC_LIBOBJ([lstat])
- gl_PREREQ_LSTAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([lstat])
-gl_FUNC_MALLOC_POSIX
-if test $REPLACE_MALLOC = 1; then
- AC_LIBOBJ([malloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([malloc-posix])
-gl_MALLOCA
-gl_MULTIARCH
-gl_FUNC_OPEN
-if test $REPLACE_OPEN = 1; then
- AC_LIBOBJ([open])
- gl_PREREQ_OPEN
-fi
-gl_FCNTL_MODULE_INDICATOR([open])
-gl_PATHMAX
-gl_FUNC_PUTENV
-if test $REPLACE_PUTENV = 1; then
- AC_LIBOBJ([putenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([putenv])
-gl_FUNC_SETENV
-if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
- AC_LIBOBJ([setenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([setenv])
-gl_FUNC_STAT
-if test $REPLACE_STAT = 1; then
- AC_LIBOBJ([stat])
- gl_PREREQ_STAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([stat])
-AM_STDBOOL_H
-gl_STDINT_H
-gt_TYPE_WCHAR_T
-gt_TYPE_WINT_T
-gl_STDIO_H
-gl_STDLIB_H
-gl_FUNC_SYMLINK
-if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
- AC_LIBOBJ([symlink])
-fi
-gl_UNISTD_MODULE_INDICATOR([symlink])
-gl_HEADER_SYS_STAT_H
-AC_PROG_MKDIR_P
-gl_HEADER_TIME_H
-gl_FUNC_UNSETENV
-if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
- AC_LIBOBJ([unsetenv])
- gl_PREREQ_UNSETENV
-fi
-gl_STDLIB_MODULE_INDICATOR([unsetenv])
-gl_VALGRIND_TESTS
-abs_aux_dir=`cd "$ac_aux_dir"; pwd`
-AC_SUBST([abs_aux_dir])
-gl_WCHAR_H
+ gl_FUNC_ALLOCA
+ gl_FUNC_CLOSE
+ if test $REPLACE_CLOSE = 1; then
+ AC_LIBOBJ([close])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([close])
+ gl_FUNC_DUP2
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+ AC_LIBOBJ([dup2])
+ gl_PREREQ_DUP2
+ fi
+ gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_FCNTL_H
+ gl_FUNC_FDOPEN
+ if test $REPLACE_FDOPEN = 1; then
+ AC_LIBOBJ([fdopen])
+ gl_PREREQ_FDOPEN
+ fi
+ gl_STDIO_MODULE_INDICATOR([fdopen])
+ gl_FUNC_FSTAT
+ if test $REPLACE_FSTAT = 1; then
+ AC_LIBOBJ([fstat])
+ gl_PREREQ_FSTAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([fstat])
+ gl_FUNC_GETCWD_LGPL
+ if test $REPLACE_GETCWD = 1; then
+ AC_LIBOBJ([getcwd-lgpl])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([getcwd])
+ gl_INTTYPES_H
+ gl_INTTYPES_INCOMPLETE
+ AC_REQUIRE([gl_LARGEFILE])
+ gl_FUNC_LSTAT
+ if test $REPLACE_LSTAT = 1; then
+ AC_LIBOBJ([lstat])
+ gl_PREREQ_LSTAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([lstat])
+ gl_FUNC_MALLOC_POSIX
+ if test $REPLACE_MALLOC = 1; then
+ AC_LIBOBJ([malloc])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+ gl_MALLOCA
+ gl_MULTIARCH
+ gl_FUNC_OPEN
+ if test $REPLACE_OPEN = 1; then
+ AC_LIBOBJ([open])
+ gl_PREREQ_OPEN
+ fi
+ gl_FCNTL_MODULE_INDICATOR([open])
+ gl_PATHMAX
+ gl_FUNC_PUTENV
+ if test $REPLACE_PUTENV = 1; then
+ AC_LIBOBJ([putenv])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([putenv])
+ gl_FUNC_SETENV
+ if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+ AC_LIBOBJ([setenv])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([setenv])
+ gl_FUNC_STAT
+ if test $REPLACE_STAT = 1; then
+ AC_LIBOBJ([stat])
+ gl_PREREQ_STAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([stat])
+ AM_STDBOOL_H
+ gl_STDINT_H
+ gt_TYPE_WCHAR_T
+ gt_TYPE_WINT_T
+ gl_STDIO_H
+ gl_STDLIB_H
+ gl_FUNC_SYMLINK
+ if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+ AC_LIBOBJ([symlink])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([symlink])
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_TIME_H
+ gl_FUNC_UNSETENV
+ if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ fi
+ gl_STDLIB_MODULE_INDICATOR([unsetenv])
+ gl_VALGRIND_TESTS
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
+ gl_WCHAR_H
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(gltests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
@@ -524,6 +524,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strerror.c
lib/string.in.h
lib/sys_types.in.h
+ lib/unistd.c
lib/unistd.in.h
lib/verify.h
lib/version-etc.c
@@ -541,6 +542,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/errno_h.m4
m4/error.m4
m4/extensions.m4
+ m4/extern-inline.m4
m4/fcntl-o.m4
m4/fcntl_h.m4
m4/fdopen.m4
@@ -639,6 +641,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-version-etc.c
tests/test-version-etc.sh
tests=lib/alloca.in.h
+ tests=lib/binary-io.c
tests=lib/binary-io.h
tests=lib/close.c
tests=lib/dosname.h
@@ -664,6 +667,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/stat.c
tests=lib/stdbool.in.h
tests=lib/stdint.in.h
+ tests=lib/stdio.c
tests=lib/stdio.in.h
tests=lib/stdlib.in.h
tests=lib/symlink.c
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index b7335bd..01b4eb9 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 25
+# serial 26
# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
#
@@ -27,11 +27,7 @@ AC_DEFUN([gl_FUNC_LSTAT],
])
# Prerequisites of lib/lstat.c.
-AC_DEFUN([gl_PREREQ_LSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_LSTAT], [:])
AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index 864fc85..f3cb23b 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 4
+# manywarnings.m4 serial 5
dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -35,14 +35,12 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
# make sure your gcc understands it.
AC_DEFUN([gl_MANYWARN_ALL_GCC],
[
- dnl First, check if -Wno-missing-field-initializers is needed.
- dnl -Wmissing-field-initializers is implied by -W, but that issues
- dnl warnings with GCC version before 4.7, for the common idiom
- dnl of initializing types on the stack to zero, using { 0, }
+ dnl First, check for some issues that only occur when combining multiple
+ dnl gcc warning categories.
AC_REQUIRE([AC_PROG_CC])
if test -n "$GCC"; then
- dnl First, check -W -Werror -Wno-missing-field-initializers is supported
+ dnl Check if -W -Werror -Wno-missing-field-initializers is supported
dnl with the current $CC $CFLAGS $CPPFLAGS.
AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
@@ -77,107 +75,150 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
])
AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
fi
+
+ dnl Next, check if -Werror -Wuninitialized is useful with the
+ dnl user's choice of $CFLAGS; some versions of gcc warn that it
+ dnl has no effect if -O is not also used
+ AC_MSG_CHECKING([whether -Wuninitialized is supported])
+ AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_uninitialized_supported=yes],
+ [gl_cv_cc_uninitialized_supported=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported])
+
fi
+ # List all gcc warning categories.
gl_manywarn_set=
for gl_manywarn_item in \
- -Wall \
-W \
- -Wformat-y2k \
- -Wformat-nonliteral \
- -Wformat-security \
- -Winit-self \
- -Wmissing-include-dirs \
- -Wswitch-default \
- -Wswitch-enum \
- -Wunused \
- -Wunknown-pragmas \
- -Wstrict-aliasing \
- -Wstrict-overflow \
- -Wsystem-headers \
- -Wfloat-equal \
- -Wtraditional \
- -Wtraditional-conversion \
- -Wdeclaration-after-statement \
- -Wundef \
- -Wshadow \
- -Wunsafe-loop-optimizations \
- -Wpointer-arith \
+ -Wabi \
+ -Waddress \
+ -Wall \
+ -Warray-bounds \
+ -Wattributes \
-Wbad-function-cast \
- -Wc++-compat \
- -Wcast-qual \
- -Wcast-align \
- -Wwrite-strings \
- -Wconversion \
- -Wsign-conversion \
- -Wlogical-op \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wold-style-definition \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wmissing-noreturn \
- -Wmissing-format-attribute \
- -Wpacked \
- -Wpadded \
- -Wredundant-decls \
- -Wnested-externs \
- -Wunreachable-code \
- -Winline \
- -Winvalid-pch \
- -Wlong-long \
- -Wvla \
- -Wvolatile-register-var \
- -Wdisabled-optimization \
- -Wstack-protector \
- -Woverlength-strings \
-Wbuiltin-macro-redefined \
- -Wmudflap \
- -Wpacked-bitfield-compat \
- -Wsync-nand \
- ; do
- gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
- done
- # The following are not documented in the manual but are included in
- # output from gcc --help=warnings.
- for gl_manywarn_item in \
- -Wattributes \
+ -Wcast-align \
+ -Wchar-subscripts \
+ -Wclobbered \
+ -Wcomment \
+ -Wcomments \
-Wcoverage-mismatch \
- -Wunused-macros \
- ; do
- gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
- done
- # More warnings from gcc 4.6.2 --help=warnings.
- for gl_manywarn_item in \
- -Wabi \
-Wcpp \
-Wdeprecated \
-Wdeprecated-declarations \
+ -Wdisabled-optimization \
-Wdiv-by-zero \
-Wdouble-promotion \
+ -Wempty-body \
-Wendif-labels \
+ -Wenum-compare \
-Wextra \
-Wformat-contains-nul \
-Wformat-extra-args \
+ -Wformat-nonliteral \
+ -Wformat-security \
+ -Wformat-y2k \
-Wformat-zero-length \
-Wformat=2 \
+ -Wfree-nonheap-object \
+ -Wignored-qualifiers \
+ -Wimplicit \
+ -Wimplicit-function-declaration \
+ -Wimplicit-int \
+ -Winit-self \
+ -Winline \
+ -Wint-to-pointer-cast \
+ -Winvalid-memory-model \
+ -Winvalid-pch \
+ -Wjump-misses-init \
+ -Wlogical-op \
+ -Wmain \
+ -Wmaybe-uninitialized \
+ -Wmissing-braces \
+ -Wmissing-declarations \
+ -Wmissing-field-initializers \
+ -Wmissing-format-attribute \
+ -Wmissing-include-dirs \
+ -Wmissing-noreturn \
+ -Wmissing-parameter-type \
+ -Wmissing-prototypes \
+ -Wmudflap \
-Wmultichar \
+ -Wnarrowing \
+ -Wnested-externs \
+ -Wnonnull \
-Wnormalized=nfc \
+ -Wold-style-declaration \
+ -Wold-style-definition \
-Woverflow \
+ -Woverlength-strings \
+ -Woverride-init \
+ -Wpacked \
+ -Wpacked-bitfield-compat \
+ -Wparentheses \
+ -Wpointer-arith \
+ -Wpointer-sign \
-Wpointer-to-int-cast \
-Wpragmas \
+ -Wreturn-type \
+ -Wsequence-point \
+ -Wshadow \
+ -Wsizeof-pointer-memaccess \
+ -Wstack-protector \
+ -Wstrict-aliasing \
+ -Wstrict-overflow \
+ -Wstrict-prototypes \
-Wsuggest-attribute=const \
+ -Wsuggest-attribute=format \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure \
+ -Wswitch \
+ -Wswitch-default \
+ -Wsync-nand \
+ -Wsystem-headers \
-Wtrampolines \
+ -Wtrigraphs \
+ -Wtype-limits \
+ -Wuninitialized \
+ -Wunknown-pragmas \
+ -Wunreachable-code \
+ -Wunsafe-loop-optimizations \
+ -Wunused \
+ -Wunused-but-set-parameter \
+ -Wunused-but-set-variable \
+ -Wunused-function \
+ -Wunused-label \
+ -Wunused-local-typedefs \
+ -Wunused-macros \
+ -Wunused-parameter \
+ -Wunused-result \
+ -Wunused-value \
+ -Wunused-variable \
+ -Wvarargs \
+ -Wvariadic-macros \
+ -Wvector-operation-performance \
+ -Wvla \
+ -Wvolatile-register-var \
+ -Wwrite-strings \
+ \
; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
- # Disable the missing-field-initializers warning if needed
+ # Disable specific options as needed.
if test "$gl_cv_cc_nomfi_needed" = yes; then
gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
fi
+ if test "$gl_cv_cc_uninitialized_supported" = no; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+ fi
+
$1=$gl_manywarn_set
])
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4
index c85971d..2577a22 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,4 +1,4 @@
-# open.m4 serial 13
+# open.m4 serial 14
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -86,7 +86,6 @@ changequote([,])dnl
# Prerequisites of lib/open.c.
AC_DEFUN([gl_PREREQ_OPEN],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
:
])
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index a8b79f5..0fd117e 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 10
+# serial 11
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
@@ -68,8 +68,4 @@ AC_DEFUN([gl_FUNC_STAT],
])
# Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_STAT], [:])
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 5298dd6..3bd6580 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 42
+# stdio_h.m4 serial 43
dnl Copyright (C) 2007-2012 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,7 +7,6 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_NEXT_HEADERS([stdio.h])
dnl No need to create extra modules for these functions. Everyone who uses
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index ab43728..9c69f2e 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -102,6 +102,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 8d4e7e1..acfae41 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 22
+# sys_socket_h.m4 serial 23
dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
[
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_C_INLINE])
dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
dnl old-style declarations (with return type 'int' instead of 'ssize_t')
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index f45dee1..8af3353 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 27 -*- Autoconf -*-
+# sys_stat_h.m4 serial 28 -*- Autoconf -*-
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,9 +11,6 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
- dnl For the mkdir substitute.
- AC_REQUIRE([AC_C_INLINE])
-
dnl Check for broken stat macros.
AC_REQUIRE([AC_HEADER_STAT])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 7e7651b..f68fbff 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 65
+# unistd_h.m4 serial 66
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,6 @@ AC_DEFUN([gl_UNISTD_H],
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([unistd.h])
if test $ac_cv_header_unistd_h = yes; then
diff --git a/gl/strerror-override.c b/gl/strerror-override.c
index 9f55cfa..f7cac65 100644
--- a/gl/strerror-override.c
+++ b/gl/strerror-override.c
@@ -291,6 +291,11 @@ strerror_override (int errnum)
return "State not recoverable";
#endif
+#if GNULIB_defined_EILSEQ
+ case EILSEQ:
+ return "Invalid or incomplete multibyte or wide character";
+#endif
+
default:
return NULL;
}
diff --git a/gl/strerror-override.h b/gl/strerror-override.h
index fe1fb2c..6468681 100644
--- a/gl/strerror-override.h
+++ b/gl/strerror-override.h
@@ -46,7 +46,8 @@
|| GNULIB_defined_EDQUOT \
|| GNULIB_defined_ECANCELED \
|| GNULIB_defined_EOWNERDEAD \
- || GNULIB_defined_ENOTRECOVERABLE
+ || GNULIB_defined_ENOTRECOVERABLE \
+ || GNULIB_defined_EILSEQ
extern const char *strerror_override (int errnum);
# else
# define strerror_override(ignored) NULL
diff --git a/gl/unistd.c b/gl/unistd.c
new file mode 100644
index 0000000..6c6a8e2
--- /dev/null
+++ b/gl/unistd.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
+#include "unistd.h"
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index e904e51..6171f77 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -127,6 +127,11 @@
# include <getopt.h>
#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UNISTD_INLINE
+# define _GL_UNISTD_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -404,7 +409,7 @@ extern char **environ;
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
-static inline char ***
+_GL_UNISTD_INLINE char ***
rpl_environ (void)
{
return &environ;
@@ -862,7 +867,7 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-static inline int
+_GL_UNISTD_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
@@ -1530,6 +1535,7 @@ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const
void *buf, size_t count));
_GL_CXXALIASWARN (write);
#endif
+_GL_INLINE_HEADER_END
#endif /* address@hidden@_UNISTD_H */
#endif /* address@hidden@_UNISTD_H */
diff --git a/gltests/Makefile.am b/gltests/Makefile.am
index 75bfa9d..b4c5568 100644
--- a/gltests/Makefile.am
+++ b/gltests/Makefile.am
@@ -92,7 +92,7 @@ EXTRA_DIST += test-alloca-opt.c
## begin gnulib module binary-io
-libtests_a_SOURCES += binary-io.h
+libtests_a_SOURCES += binary-io.h binary-io.c
## end gnulib module binary-io
@@ -682,6 +682,7 @@ EXTRA_DIST += test-stdint.c
## begin gnulib module stdio
BUILT_SOURCES += stdio.h
+libtests_a_SOURCES += stdio.c
# We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler.
@@ -894,6 +895,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
diff --git a/gltests/binary-io.c b/gltests/binary-io.c
new file mode 100644
index 0000000..8bbdb44
--- /dev/null
+++ b/gltests/binary-io.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define BINARY_IO_INLINE _GL_EXTERN_INLINE
+#include "binary-io.h"
diff --git a/gltests/binary-io.h b/gltests/binary-io.h
index a33e32a..0f376e3 100644
--- a/gltests/binary-io.h
+++ b/gltests/binary-io.h
@@ -25,6 +25,11 @@
so we include it here first. */
#include <stdio.h>
+_GL_INLINE_HEADER_BEGIN
+#ifndef BINARY_IO_INLINE
+# define BINARY_IO_INLINE _GL_INLINE
+#endif
+
/* set_binary_mode (fd, mode)
sets the binary/text I/O mode of file descriptor fd to the given mode
(must be O_BINARY or O_TEXT) and returns the previous mode. */
@@ -39,9 +44,9 @@
# endif
#else
/* On reasonable systems, binary I/O is the only choice. */
- /* Use an inline function rather than a macro, to avoid gcc warnings
+ /* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
-static inline int
+BINARY_IO_INLINE int
set_binary_mode (int fd, int mode)
{
(void) fd;
@@ -62,4 +67,6 @@ set_binary_mode (int fd, int mode)
# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _BINARY_H */
diff --git a/gltests/fcntl.in.h b/gltests/fcntl.in.h
index 76e12f7..604c31b 100644
--- a/gltests/fcntl.in.h
+++ b/gltests/fcntl.in.h
@@ -216,6 +216,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_EXEC O_RDONLY /* This is often close enough in older systems. */
#endif
+#ifndef O_IGNORE_CTTY
+# define O_IGNORE_CTTY 0
+#endif
+
#ifndef O_NDELAY
# define O_NDELAY 0
#endif
@@ -249,10 +253,18 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_NOFOLLOW 0
#endif
+#ifndef O_NOLINK
+# define O_NOLINK 0
+#endif
+
#ifndef O_NOLINKS
# define O_NOLINKS 0
#endif
+#ifndef O_NOTRANS
+# define O_NOTRANS 0
+#endif
+
#ifndef O_RSYNC
# define O_RSYNC 0
#endif
@@ -269,7 +281,7 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_TTY_INIT 0
#endif
-#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
+#if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
# undef O_ACCMODE
# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
#endif
diff --git a/gltests/fstat.c b/gltests/fstat.c
index 6d5f5c2..0418cc6 100644
--- a/gltests/fstat.c
+++ b/gltests/fstat.c
@@ -31,7 +31,7 @@
#endif
#undef __need_system_sys_stat_h
-static inline int
+static int
orig_fstat (int fd, struct stat *buf)
{
return fstat (fd, buf);
@@ -51,7 +51,7 @@ orig_fstat (int fd, struct stat *buf)
#endif
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
fstat_nothrow (int fd, struct stat *buf)
{
int result;
diff --git a/gltests/lstat.c b/gltests/lstat.c
index db119a1..97fe6bb 100644
--- a/gltests/lstat.c
+++ b/gltests/lstat.c
@@ -35,7 +35,7 @@ typedef int dummy;
# include <sys/stat.h>
# undef __need_system_sys_stat_h
-static inline int
+static int
orig_lstat (const char *filename, struct stat *buf)
{
return lstat (filename, buf);
diff --git a/gltests/malloca.h b/gltests/malloca.h
index 0cedf5f..f06e9e7 100644
--- a/gltests/malloca.h
+++ b/gltests/malloca.h
@@ -42,7 +42,7 @@ extern "C" {
and a page size can be as small as 4096 bytes. So we cannot safely
allocate anything larger than 4096 bytes. Also care for the possibility
of a few compiler-allocated temporary stack slots.
- This must be a macro, not an inline function. */
+ This must be a macro, not a function. */
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
#else
# define safe_alloca(N) ((void) (N), NULL)
diff --git a/gltests/open.c b/gltests/open.c
index 27801b9..bdfc8db 100644
--- a/gltests/open.c
+++ b/gltests/open.c
@@ -27,7 +27,7 @@
#include <sys/types.h>
#undef __need_system_fcntl_h
-static inline int
+static int
orig_open (const char *filename, int flags, mode_t mode)
{
return open (filename, flags, mode);
diff --git a/gltests/stat.c b/gltests/stat.c
index 7599540..c0bcb88 100644
--- a/gltests/stat.c
+++ b/gltests/stat.c
@@ -42,7 +42,7 @@
# endif
#endif
-static inline int
+static int
orig_stat (const char *filename, struct stat *buf)
{
return stat (filename, buf);
diff --git a/gltests/stdbool.in.h b/gltests/stdbool.in.h
index ed1f9aa..1f8caee 100644
--- a/gltests/stdbool.in.h
+++ b/gltests/stdbool.in.h
@@ -66,24 +66,19 @@
# undef true
#endif
-/* For the sake of symbolic names in gdb, we define true and false as
- enum constants, not only as macros.
- It is tempting to write
- typedef enum { false = 0, true = 1 } _Bool;
- so that gdb prints values of type 'bool' symbolically. But if we do
- this, values of type '_Bool' may promote to 'int' or 'unsigned int'
- (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
- (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
- enum; this ensures that '_Bool' promotes to 'int'. */
-#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+#ifdef __cplusplus
+# define _Bool bool
+# define bool bool
+#else
+# if defined __BEOS__ && !defined __HAIKU__
/* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */
-# if address@hidden@
+# if address@hidden@
typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
+# endif
+# else
+# if !defined __GNUC__
/* If @HAVE__BOOL@:
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
the built-in _Bool type is used. See
@@ -103,19 +98,35 @@ typedef bool _Bool;
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
The only benefit of the enum, debuggability, is not important
with these compilers. So use 'signed char' and no enum. */
-# define _Bool signed char
-# else
+# define _Bool signed char
+# else
/* With this compiler, trust the _Bool type if the compiler has it. */
-# if address@hidden@
+# if address@hidden@
+ /* For the sake of symbolic names in gdb, define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But then
+ values of type '_Bool' might promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
# endif
# endif
+# define bool _Bool
#endif
-#define bool _Bool
/* The other macros must be usable in preprocessor directives. */
-#define false 0
-#define true 1
+#ifdef __cplusplus
+# define false false
+# define true true
+#else
+# define false 0
+# define true 1
+#endif
+
#define __bool_true_false_are_defined 1
#endif /* _GL_STDBOOL_H */
diff --git a/gltests/stdio.c b/gltests/stdio.c
new file mode 100644
index 0000000..e6ed829
--- /dev/null
+++ b/gltests/stdio.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
+#include "stdio.h"
diff --git a/gltests/stdio.in.h b/gltests/stdio.in.h
index b1b543d..f3b52d2 100644
--- a/gltests/stdio.in.h
+++ b/gltests/stdio.in.h
@@ -46,6 +46,11 @@
#ifndef address@hidden@_STDIO_H
#define address@hidden@_STDIO_H
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_STDIO_INLINE
+# define _GL_STDIO_INLINE _GL_INLINE
+#endif
+
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
@@ -581,7 +586,7 @@ _GL_CXXALIAS_SYS (fwrite, size_t,
This affects only function declaration attributes, so it's not
needed for C++. */
# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-static inline size_t _GL_ARG_NONNULL ((1, 4))
+_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
{
size_t r = fwrite (ptr, s, n, stream);
@@ -1333,6 +1338,7 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX
compliant - "
"POSIX compliance");
#endif
+_GL_INLINE_HEADER_END
#endif /* address@hidden@_STDIO_H */
#endif /* address@hidden@_STDIO_H */
diff --git a/gltests/stdlib.in.h b/gltests/stdlib.in.h
index 1d67ec6..6555840 100644
--- a/gltests/stdlib.in.h
+++ b/gltests/stdlib.in.h
@@ -457,10 +457,19 @@ _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not
portable - "
#if @GNULIB_PTSNAME@
/* Return the pathname of the pseudo-terminal slave associated with
the master FD is open on, or NULL on errors. */
-# if address@hidden@
+# if @REPLACE_PTSNAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ptsname
+# define ptsname rpl_ptsname
+# endif
+_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
+_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
+# else
+# if address@hidden@
_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
-# endif
+# endif
_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
+# endif
_GL_CXXALIASWARN (ptsname);
#elif defined GNULIB_POSIXCHECK
# undef ptsname
diff --git a/gltests/sys_stat.in.h b/gltests/sys_stat.in.h
index 2efc1e9..ac05ddb 100644
--- a/gltests/sys_stat.in.h
+++ b/gltests/sys_stat.in.h
@@ -497,7 +497,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t
mode));
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir
-static inline int
+static int
rpl_mkdir (char const *name, mode_t mode)
{
return _mkdir (name);
diff --git a/java/LICENSE-2.0.txt b/java/LICENSE-2.0.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/java/LICENSE-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/java/Makefile.am b/java/Makefile.am
index 5f9739e..68aa32a 100644
--- a/java/Makefile.am
+++ b/java/Makefile.am
@@ -18,6 +18,8 @@
SUBDIRS = gnu . misc
+EXTRA_DIST = LICENSE-2.0.txt
+
INSTALL_TARGETS =
if JAVA
diff --git a/lib/gl/m4/eealloc.m4 b/lib/gl/m4/eealloc.m4
index 75f17e2..9e5df45 100644
--- a/lib/gl/m4/eealloc.m4
+++ b/lib/gl/m4/eealloc.m4
@@ -1,4 +1,4 @@
-# eealloc.m4 serial 2
+# eealloc.m4 serial 3
dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,6 @@ AC_DEFUN([gl_EEALLOC],
[
AC_REQUIRE([gl_EEMALLOC])
AC_REQUIRE([gl_EEREALLOC])
- AC_REQUIRE([AC_C_INLINE])
])
AC_DEFUN([gl_EEMALLOC],
diff --git a/lib/gl/m4/extern-inline.m4 b/lib/gl/m4/extern-inline.m4
new file mode 100644
index 0000000..2492260
--- /dev/null
+++ b/lib/gl/m4/extern-inline.m4
@@ -0,0 +1,56 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+ AH_VERBATIM([extern_inline],
+[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
+ _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
+ _GL_INLINE_HEADER_BEGIN contains useful stuff to put
+ in an include file, before uses of _GL_INLINE.
+ It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
+ when FOO is an inline function in the header; see
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
+ _GL_INLINE_HEADER_END contains useful stuff to put
+ in the same include file, after uses of _GL_INLINE. */
+#if (__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : 199901L <= __STDC_VERSION__)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# if __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+#else
+# define _GL_INLINE static
+# define _GL_EXTERN_INLINE static
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4
index 050b67c..597d770 100644
--- a/lib/gl/m4/gnulib-cache.m4
+++ b/lib/gl/m4/gnulib-cache.m4
@@ -53,5 +53,5 @@ gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([lgl])
gl_PO_DOMAIN([])
-gl_WITNESS_C_DOMAIN([])
+gl_WITNESS_C_MACRO([])
gl_VC_FILES([false])
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index a28e198..ab66a71 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -49,6 +49,7 @@ AC_DEFUN([lgl_EARLY],
# Code from module environ-tests:
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ # Code from module extern-inline:
# Code from module gettext-h:
# Code from module gperf:
# Code from module havelib:
@@ -138,45 +139,45 @@ AC_DEFUN([lgl_INIT],
m4_pushdef([lgl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='lib/gl'
-AC_SUBST([LIBINTL])
-AC_SUBST([LTLIBINTL])
-AM_ICONV
-m4_ifdef([gl_ICONV_MODULE_INDICATOR],
- [gl_ICONV_MODULE_INDICATOR([iconv])])
-gl_ICONV_H
-gl_FUNC_ICONV_OPEN
-if test $REPLACE_ICONV_OPEN = 1; then
- AC_LIBOBJ([iconv_open])
-fi
-if test $REPLACE_ICONV = 1; then
- AC_LIBOBJ([iconv])
- AC_LIBOBJ([iconv_close])
-fi
-gl_INLINE
-gl_LD_OUTPUT_DEF
-gl_LD_VERSION_SCRIPT
-gl_VISIBILITY
-gl_MULTIARCH
-AM_STDBOOL_H
-gl_STDDEF_H
-gl_STDINT_H
-if test $gl_cond_libtool = false; then
- gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
- gl_libdeps="$gl_libdeps $LIBICONV"
-fi
-gl_HEADER_STRING_H
-gl_FUNC_STRVERSCMP
-if test $HAVE_STRVERSCMP = 0; then
- AC_LIBOBJ([strverscmp])
- gl_PREREQ_STRVERSCMP
-fi
-gl_STRING_MODULE_INDICATOR([strverscmp])
-gl_LIBUNISTRING_LIBHEADER([0.9.2], [unistr.h])
-gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
-gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mbtoucr])
-gl_MODULE_INDICATOR([unistr/u8-uctomb])
-gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-uctomb])
-gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AM_ICONV
+ m4_ifdef([gl_ICONV_MODULE_INDICATOR],
+ [gl_ICONV_MODULE_INDICATOR([iconv])])
+ gl_ICONV_H
+ gl_FUNC_ICONV_OPEN
+ if test $REPLACE_ICONV_OPEN = 1; then
+ AC_LIBOBJ([iconv_open])
+ fi
+ if test $REPLACE_ICONV = 1; then
+ AC_LIBOBJ([iconv])
+ AC_LIBOBJ([iconv_close])
+ fi
+ gl_INLINE
+ gl_LD_OUTPUT_DEF
+ gl_LD_VERSION_SCRIPT
+ gl_VISIBILITY
+ gl_MULTIARCH
+ AM_STDBOOL_H
+ gl_STDDEF_H
+ gl_STDINT_H
+ if test $gl_cond_libtool = false; then
+ gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+ gl_libdeps="$gl_libdeps $LIBICONV"
+ fi
+ gl_HEADER_STRING_H
+ gl_FUNC_STRVERSCMP
+ if test $HAVE_STRVERSCMP = 0; then
+ AC_LIBOBJ([strverscmp])
+ gl_PREREQ_STRVERSCMP
+ fi
+ gl_STRING_MODULE_INDICATOR([strverscmp])
+ gl_LIBUNISTRING_LIBHEADER([0.9.2], [unistr.h])
+ gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
+ gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mbtoucr])
+ gl_MODULE_INDICATOR([unistr/u8-uctomb])
+ gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-uctomb])
+ gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h])
# End of code from modules
m4_ifval(lgl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([lgl_LIBSOURCES_DIR])[ ||
@@ -223,61 +224,62 @@ changequote([, ])dnl
AC_SUBST([lgltests_WITNESS])
gl_module_indicator_condition=$lgltests_WITNESS
m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
-gl_FUNC_ALLOCA
-gt_LOCALE_FR
-gt_LOCALE_TR_UTF8
-gl_ENVIRON
-gl_UNISTD_MODULE_INDICATOR([environ])
-gl_INTTYPES_H
-gl_INTTYPES_INCOMPLETE
-gl_LOCALE_H
-AC_CHECK_FUNCS_ONCE([newlocale])
-gl_LOCALENAME
-AC_CHECK_FUNCS_ONCE([newlocale])
-gl_LOCK
-gl_FUNC_MALLOC_POSIX
-if test $REPLACE_MALLOC = 1; then
- AC_LIBOBJ([malloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([malloc-posix])
-gl_MALLOCA
-gl_FUNC_PUTENV
-if test $REPLACE_PUTENV = 1; then
- AC_LIBOBJ([putenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([putenv])
-gl_FUNC_SETENV
-if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
- AC_LIBOBJ([setenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([setenv])
-gl_FUNC_SETLOCALE
-if test $REPLACE_SETLOCALE = 1; then
- AC_LIBOBJ([setlocale])
- gl_PREREQ_SETLOCALE
-fi
-gl_LOCALE_MODULE_INDICATOR([setlocale])
-gt_LOCALE_FR
-gt_LOCALE_FR_UTF8
-gt_LOCALE_JA
-gt_LOCALE_ZH_CN
-gt_TYPE_SSIZE_T
-gt_TYPE_WCHAR_T
-gt_TYPE_WINT_T
-gl_STDLIB_H
-gl_SYS_TYPES_H
-AC_PROG_MKDIR_P
-gl_THREAD
-gl_THREADLIB
-gl_UNISTD_H
-gl_FUNC_UNSETENV
-if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
- AC_LIBOBJ([unsetenv])
- gl_PREREQ_UNSETENV
-fi
-gl_STDLIB_MODULE_INDICATOR([unsetenv])
-gl_WCHAR_H
-gl_YIELD
+ gl_FUNC_ALLOCA
+ gt_LOCALE_FR
+ gt_LOCALE_TR_UTF8
+ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ AC_REQUIRE([gl_EXTERN_INLINE])
+ gl_INTTYPES_H
+ gl_INTTYPES_INCOMPLETE
+ gl_LOCALE_H
+ AC_CHECK_FUNCS_ONCE([newlocale])
+ gl_LOCALENAME
+ AC_CHECK_FUNCS_ONCE([newlocale])
+ gl_LOCK
+ gl_FUNC_MALLOC_POSIX
+ if test $REPLACE_MALLOC = 1; then
+ AC_LIBOBJ([malloc])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+ gl_MALLOCA
+ gl_FUNC_PUTENV
+ if test $REPLACE_PUTENV = 1; then
+ AC_LIBOBJ([putenv])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([putenv])
+ gl_FUNC_SETENV
+ if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+ AC_LIBOBJ([setenv])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([setenv])
+ gl_FUNC_SETLOCALE
+ if test $REPLACE_SETLOCALE = 1; then
+ AC_LIBOBJ([setlocale])
+ gl_PREREQ_SETLOCALE
+ fi
+ gl_LOCALE_MODULE_INDICATOR([setlocale])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_TYPE_SSIZE_T
+ gt_TYPE_WCHAR_T
+ gt_TYPE_WINT_T
+ gl_STDLIB_H
+ gl_SYS_TYPES_H
+ AC_PROG_MKDIR_P
+ gl_THREAD
+ gl_THREADLIB
+ gl_UNISTD_H
+ gl_FUNC_UNSETENV
+ if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ fi
+ gl_STDLIB_MODULE_INDICATOR([unsetenv])
+ gl_WCHAR_H
+ gl_YIELD
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(lgltests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([lgltests_LIBSOURCES_DIR])[ ||
@@ -409,6 +411,7 @@ AC_DEFUN([lgl_FILE_LIST], [
m4/eealloc.m4
m4/environ.m4
m4/extensions.m4
+ m4/extern-inline.m4
m4/gnulib-common.m4
m4/iconv.m4
m4/iconv_h.m4
@@ -516,6 +519,7 @@ AC_DEFUN([lgl_FILE_LIST], [
tests=lib/setlocale.c
tests=lib/stdlib.in.h
tests=lib/sys_types.in.h
+ tests=lib/unistd.c
tests=lib/unistd.in.h
tests=lib/unsetenv.c
tests=lib/verify.h
diff --git a/lib/gl/m4/lib-ld.m4 b/lib/gl/m4/lib-ld.m4
index 4e1374d..e1feab5 100644
--- a/lib/gl/m4/lib-ld.m4
+++ b/lib/gl/m4/lib-ld.m4
@@ -1,33 +1,39 @@
-# lib-ld.m4 serial 5 (gettext-0.18.2)
+# lib-ld.m4 serial 6
dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
+ acl_cv_prog_gnu_ld=yes
+ ;;
*)
- acl_cv_prog_gnu_ld=no ;;
+ acl_cv_prog_gnu_ld=no
+ ;;
esac])
with_gnu_ld=$acl_cv_prog_gnu_ld
])
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld [default=no]])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
@@ -40,10 +46,11 @@ if test "${PATH_SEPARATOR+set}" != set; then
|| PATH_SEPARATOR=';'
}
fi
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
+ AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -53,11 +60,11 @@ if test "$GCC" = yes; then
esac
case $ac_prog in
# Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+ while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
@@ -78,23 +85,26 @@ else
fi
AC_CACHE_VAL([acl_cv_path_LD],
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
acl_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
+ test "$with_gnu_ld" != no && break
+ ;;
*)
- test "$with_gnu_ld" != yes && break ;;
+ test "$with_gnu_ld" != yes && break
+ ;;
esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$acl_save_ifs"
else
acl_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
diff --git a/lib/gl/m4/lock.m4 b/lib/gl/m4/lock.m4
index 19c6d45..83da6cc 100644
--- a/lib/gl/m4/lock.m4
+++ b/lib/gl/m4/lock.m4
@@ -1,4 +1,4 @@
-# lock.m4 serial 12 (gettext-0.18.2)
+# lock.m4 serial 13 (gettext-0.18.2)
dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,5 @@ return !x;
gl_PREREQ_LOCK
])
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
- AC_REQUIRE([AC_C_INLINE])
-])
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/lib/gl/m4/stdlib_h.m4 b/lib/gl/m4/stdlib_h.m4
index ab43728..9c69f2e 100644
--- a/lib/gl/m4/stdlib_h.m4
+++ b/lib/gl/m4/stdlib_h.m4
@@ -102,6 +102,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
diff --git a/lib/gl/m4/thread.m4 b/lib/gl/m4/thread.m4
index cd66c3e..3c94d11 100644
--- a/lib/gl/m4/thread.m4
+++ b/lib/gl/m4/thread.m4
@@ -1,4 +1,4 @@
-# thread.m4 serial 2
+# thread.m4 serial 3
dnl Copyright (C) 2008-2012 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,7 +7,6 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_THREAD],
[
AC_REQUIRE([gl_THREADLIB])
- AC_REQUIRE([AC_C_INLINE])
if test $gl_threads_api = posix; then
gl_save_LIBS="$LIBS"
diff --git a/lib/gl/m4/unistd_h.m4 b/lib/gl/m4/unistd_h.m4
index 7e7651b..f68fbff 100644
--- a/lib/gl/m4/unistd_h.m4
+++ b/lib/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 65
+# unistd_h.m4 serial 66
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,6 @@ AC_DEFUN([gl_UNISTD_H],
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([unistd.h])
if test $ac_cv_header_unistd_h = yes; then
diff --git a/lib/gl/stdbool.in.h b/lib/gl/stdbool.in.h
index a329c70..183efe2 100644
--- a/lib/gl/stdbool.in.h
+++ b/lib/gl/stdbool.in.h
@@ -66,24 +66,19 @@
# undef true
#endif
-/* For the sake of symbolic names in gdb, we define true and false as
- enum constants, not only as macros.
- It is tempting to write
- typedef enum { false = 0, true = 1 } _Bool;
- so that gdb prints values of type 'bool' symbolically. But if we do
- this, values of type '_Bool' may promote to 'int' or 'unsigned int'
- (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
- (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
- enum; this ensures that '_Bool' promotes to 'int'. */
-#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+#ifdef __cplusplus
+# define _Bool bool
+# define bool bool
+#else
+# if defined __BEOS__ && !defined __HAIKU__
/* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */
-# if address@hidden@
+# if address@hidden@
typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
+# endif
+# else
+# if !defined __GNUC__
/* If @HAVE__BOOL@:
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
the built-in _Bool type is used. See
@@ -103,19 +98,35 @@ typedef bool _Bool;
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
The only benefit of the enum, debuggability, is not important
with these compilers. So use 'signed char' and no enum. */
-# define _Bool signed char
-# else
+# define _Bool signed char
+# else
/* With this compiler, trust the _Bool type if the compiler has it. */
-# if address@hidden@
+# if address@hidden@
+ /* For the sake of symbolic names in gdb, define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But then
+ values of type '_Bool' might promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
# endif
# endif
+# define bool _Bool
#endif
-#define bool _Bool
/* The other macros must be usable in preprocessor directives. */
-#define false 0
-#define true 1
+#ifdef __cplusplus
+# define false false
+# define true true
+#else
+# define false 0
+# define true 1
+#endif
+
#define __bool_true_false_are_defined 1
#endif /* _GL_STDBOOL_H */
diff --git a/lib/gltests/Makefile.am b/lib/gltests/Makefile.am
index 642d8f2..58a5b92 100644
--- a/lib/gltests/Makefile.am
+++ b/lib/gltests/Makefile.am
@@ -553,6 +553,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
@@ -668,6 +669,7 @@ EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
## begin gnulib module unistd
BUILT_SOURCES += unistd.h
+libtests_a_SOURCES += unistd.c
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
diff --git a/lib/gltests/glthread/lock.c b/lib/gltests/glthread/lock.c
index 9a391ea..bc0df29 100644
--- a/lib/gltests/glthread/lock.c
+++ b/lib/gltests/glthread/lock.c
@@ -682,7 +682,7 @@ glthread_lock_destroy_func (gl_lock_t *lock)
/* In this file, the waitqueues are implemented as circular arrays. */
#define gl_waitqueue_t gl_carray_waitqueue_t
-static inline void
+static void
gl_waitqueue_init (gl_waitqueue_t *wq)
{
wq->array = NULL;
@@ -743,7 +743,7 @@ gl_waitqueue_add (gl_waitqueue_t *wq)
}
/* Notifies the first thread from a wait queue and dequeues it. */
-static inline void
+static void
gl_waitqueue_notify_first (gl_waitqueue_t *wq)
{
SetEvent (wq->array[wq->offset + 0]);
@@ -754,7 +754,7 @@ gl_waitqueue_notify_first (gl_waitqueue_t *wq)
}
/* Notifies all threads from a wait queue and dequeues them all. */
-static inline void
+static void
gl_waitqueue_notify_all (gl_waitqueue_t *wq)
{
unsigned int i;
diff --git a/lib/gltests/glthread/thread.c b/lib/gltests/glthread/thread.c
index d55b4e2..e799d60 100644
--- a/lib/gltests/glthread/thread.c
+++ b/lib/gltests/glthread/thread.c
@@ -21,6 +21,7 @@
#include <config.h>
/* Specification. */
+# define _GLTHREAD_THREAD_INLINE _GL_EXTERN_INLINE
#include "glthread/thread.h"
#include <stdlib.h>
@@ -85,7 +86,7 @@ struct gl_thread_struct
};
/* Return a real HANDLE object for the current thread. */
-static inline HANDLE
+static HANDLE
get_current_thread_handle (void)
{
HANDLE this_handle;
diff --git a/lib/gltests/glthread/thread.h b/lib/gltests/glthread/thread.h
index 6653aa2..9b500f3 100644
--- a/lib/gltests/glthread/thread.h
+++ b/lib/gltests/glthread/thread.h
@@ -74,6 +74,11 @@
#include <errno.h>
#include <stdlib.h>
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GLTHREAD_THREAD_INLINE
+# define _GLTHREAD_THREAD_INLINE _GL_INLINE
+#endif
+
/* ========================================================================= */
#if USE_POSIX_THREADS
@@ -360,7 +365,7 @@ typedef int gl_thread_t;
extern "C" {
#endif
-static inline gl_thread_t
+_GLTHREAD_THREAD_INLINE gl_thread_t
gl_thread_create (void *(*func) (void *arg), void *arg)
{
gl_thread_t thread;
@@ -397,4 +402,6 @@ gl_thread_create (void *(*func) (void *arg), void *arg)
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _GLTHREAD_THREAD_H */
diff --git a/lib/gltests/localename.c b/lib/gltests/localename.c
index e921e76..4803eaf 100644
--- a/lib/gltests/localename.c
+++ b/lib/gltests/localename.c
@@ -2616,133 +2616,34 @@ gl_locale_name_thread_unsafe (int category, const char
*categoryname)
nl_langinfo (_NL_LOCALE_NAME (category)). */
name = thread_locale->__names[category];
return name;
-# endif
-# if defined __APPLE__ && defined __MACH__ /* Mac OS X */
- /* The locale name is found deep in an undocumented data structure.
- Since it's stored in a buffer of size 32 and newlocale() rejects
- locale names of length > 31, we can assume that it is NUL terminated
- in this buffer. But we need to make a copy of the locale name, of
- indefinite extent. */
- struct _xlocale_part1_v0 /* used in Mac OS X 10.5 */
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- __darwin_mbstate_t __mbs[10];
- int64_t __magic;
- };
- struct _xlocale_part1_v1 /* used in Mac OS X >= 10.6.0 */
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- __darwin_mbstate_t __mbs[10];
- /*pthread_lock_t*/ int __lock;
- int64_t __magic;
- };
- struct _xlocale_part2
- {
- int64_t __magic;
- unsigned char __collate_load_error;
- unsigned char __collate_substitute_nontrivial;
- unsigned char _messages_using_locale;
- unsigned char _monetary_using_locale;
- unsigned char _numeric_using_locale;
- unsigned char _time_using_locale;
- unsigned char __mlocale_changed;
- unsigned char __nlocale_changed;
- unsigned char __numeric_fp_cvt;
- struct __xlocale_st_collate *__lc_collate;
- struct __xlocale_st_runelocale *__lc_ctype;
- struct __xlocale_st_messages *__lc_messages;
- struct __xlocale_st_monetary *__lc_monetary;
- struct __xlocale_st_numeric *__lc_numeric;
- struct _xlocale *__lc_numeric_loc;
- struct __xlocale_st_time *__lc_time;
- /* more */
- };
- struct __xlocale_st_collate
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char __encoding[32];
- /* more */
- };
- struct __xlocale_st_runelocale
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char __ctype_encoding[32];
- /* more */
- };
- struct __xlocale_st_messages
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_messages_locale_buf;
- /* more */
- };
- struct __xlocale_st_monetary
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_monetary_locale_buf;
- /* more */
- };
- struct __xlocale_st_numeric {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_numeric_locale_buf;
- /* more */
- };
- struct __xlocale_st_time {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_time_locale_buf;
- /* more */
- };
- struct _xlocale_part2 *tlp;
- if (((struct _xlocale_part1_v0 *) thread_locale)->__magic
- == 0x786C6F63616C6530LL)
- /* Mac OS X 10.5 */
- tlp =
- (struct _xlocale_part2 *)
- &((struct _xlocale_part1_v0 *) thread_locale)->__magic;
- else if (((struct _xlocale_part1_v1 *) thread_locale)->__magic
- == 0x786C6F63616C6530LL)
- /* Mac OS X >= 10.6.0 */
- tlp =
- (struct _xlocale_part2 *)
- &((struct _xlocale_part1_v1 *) thread_locale)->__magic;
- else
- /* Unsupported version of Mac OS X: The internals of 'struct
_xlocale'
- have changed again. */
- return "";
+# elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+ /* FreeBSD, Mac OS X */
+ int mask;
+
switch (category)
{
case LC_CTYPE:
- return tlp->__lc_ctype->__ctype_encoding;
+ mask = LC_CTYPE_MASK;
+ break;
case LC_NUMERIC:
- return tlp->_numeric_using_locale
- ? tlp->__lc_numeric->_numeric_locale_buf
- : "C";
+ mask = LC_NUMERIC_MASK;
+ break;
case LC_TIME:
- return tlp->_time_using_locale
- ? tlp->__lc_time->_time_locale_buf
- : "C";
+ mask = LC_TIME_MASK;
+ break;
case LC_COLLATE:
- return !tlp->__collate_load_error
- ? tlp->__lc_collate->__encoding
- : "C";
+ mask = LC_COLLATE_MASK;
+ break;
case LC_MONETARY:
- return tlp->_monetary_using_locale
- ? tlp->__lc_monetary->_monetary_locale_buf
- : "C";
+ mask = LC_MONETARY_MASK;
+ break;
case LC_MESSAGES:
- return tlp->_messages_using_locale
- ? tlp->__lc_messages->_messages_locale_buf
- : "C";
+ mask = LC_MESSAGES_MASK;
+ break;
default: /* We shouldn't get here. */
return "";
}
+ return querylocale (mask, thread_locale);
# endif
}
}
diff --git a/lib/gltests/malloca.h b/lib/gltests/malloca.h
index 0cedf5f..f06e9e7 100644
--- a/lib/gltests/malloca.h
+++ b/lib/gltests/malloca.h
@@ -42,7 +42,7 @@ extern "C" {
and a page size can be as small as 4096 bytes. So we cannot safely
allocate anything larger than 4096 bytes. Also care for the possibility
of a few compiler-allocated temporary stack slots.
- This must be a macro, not an inline function. */
+ This must be a macro, not a function. */
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
#else
# define safe_alloca(N) ((void) (N), NULL)
diff --git a/lib/gltests/stdlib.in.h b/lib/gltests/stdlib.in.h
index 1d67ec6..6555840 100644
--- a/lib/gltests/stdlib.in.h
+++ b/lib/gltests/stdlib.in.h
@@ -457,10 +457,19 @@ _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not
portable - "
#if @GNULIB_PTSNAME@
/* Return the pathname of the pseudo-terminal slave associated with
the master FD is open on, or NULL on errors. */
-# if address@hidden@
+# if @REPLACE_PTSNAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ptsname
+# define ptsname rpl_ptsname
+# endif
+_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
+_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
+# else
+# if address@hidden@
_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
-# endif
+# endif
_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
+# endif
_GL_CXXALIASWARN (ptsname);
#elif defined GNULIB_POSIXCHECK
# undef ptsname
diff --git a/lib/gltests/unistd.c b/lib/gltests/unistd.c
new file mode 100644
index 0000000..6c6a8e2
--- /dev/null
+++ b/lib/gltests/unistd.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
+#include "unistd.h"
diff --git a/lib/gltests/unistd.in.h b/lib/gltests/unistd.in.h
index e904e51..6171f77 100644
--- a/lib/gltests/unistd.in.h
+++ b/lib/gltests/unistd.in.h
@@ -127,6 +127,11 @@
# include <getopt.h>
#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UNISTD_INLINE
+# define _GL_UNISTD_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -404,7 +409,7 @@ extern char **environ;
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
-static inline char ***
+_GL_UNISTD_INLINE char ***
rpl_environ (void)
{
return &environ;
@@ -862,7 +867,7 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-static inline int
+_GL_UNISTD_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
@@ -1530,6 +1535,7 @@ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const
void *buf, size_t count));
_GL_CXXALIASWARN (write);
#endif
+_GL_INLINE_HEADER_END
#endif /* address@hidden@_UNISTD_H */
#endif /* address@hidden@_UNISTD_H */
diff --git a/lib/nfkc.c b/lib/nfkc.c
index a52d74b..113ce3c 100644
--- a/lib/nfkc.c
+++ b/lib/nfkc.c
@@ -872,7 +872,7 @@ _g_utf8_normalize_wc (const gchar * str, gssize max_len,
GNormalizeMode mode)
{
g_unicode_canonical_ordering (wc_buffer + last_start,
n_wc - last_start);
- last_start = n_wc;
+ // dead assignment: last_start = n_wc;
}
wc_buffer[n_wc] = 0;
diff --git a/lib/tld.c b/lib/tld.c
index 17a1ed9..166916f 100644
--- a/lib/tld.c
+++ b/lib/tld.c
@@ -135,8 +135,9 @@ tld_get_4 (const uint32_t * in, size_t inlen, char **out)
(*ipos >= 0x61 && *ipos <= 0x7A)))
ipos--, olen++;
- if (olen > 0 && DOTP (*ipos)) /* Found something that appears a TLD.
*/
+ if (olen > 0 && ipos >= in && DOTP (*ipos))
{
+ /* Found something that appears a TLD. */
char *out_s = malloc (sizeof (char) * (olen + 1));
char *opos = out_s;
diff --git a/maint.mk b/maint.mk
index a2b0b8d..93c2508 100644
--- a/maint.mk
+++ b/maint.mk
@@ -28,6 +28,28 @@ ifneq ($(build_aux),)
set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)")
endif
+# Helper variables.
+_empty =
+_sp = $(_empty) $(_empty)
+
+# _equal,S1,S2
+# ------------
+# If S1 == S2, return S1, otherwise the empty string.
+_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+
+# member-check,VARIABLE,VALID-VALUES
+# ----------------------------------
+# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and
+# return it. Die otherwise.
+member-check = \
+ $(strip \
+ $(if $($(1)), \
+ $(if $(findstring $(_sp),$($(1))), \
+ $(error invalid $(1): '$($(1))', expected $(2)), \
+ $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)), \
+ $(error invalid $(1): '$($(1))', expected $(2)))), \
+ $(error $(1) undefined)))
+
# Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
gzip_rsyncable := \
@@ -52,9 +74,9 @@ _dot_escaped_srcdir = $(subst .,\.,$(srcdir))
# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
# when $(srcdir) is not ".".
ifeq ($(srcdir),.)
-_prepend_srcdir_prefix =
+ _prepend_srcdir_prefix =
else
-_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+ _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
endif
# In order to be able to consistently filter "."-relative names,
@@ -78,32 +100,41 @@ VERSION_REGEXP = $(subst .,\.,$(VERSION))
PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
ifeq ($(VC),$(GIT))
-this-vc-tag = v$(VERSION)
-this-vc-tag-regexp = v$(VERSION_REGEXP)
+ this-vc-tag = v$(VERSION)
+ this-vc-tag-regexp = v$(VERSION_REGEXP)
else
-tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
-tag-this-version = $(subst .,_,$(VERSION))
-this-vc-tag = $(tag-package)-$(tag-this-version)
-this-vc-tag-regexp = $(this-vc-tag)
+ tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+ tag-this-version = $(subst .,_,$(VERSION))
+ this-vc-tag = $(tag-package)-$(tag-this-version)
+ this-vc-tag-regexp = $(this-vc-tag)
endif
my_distdir = $(PACKAGE)-$(VERSION)
# Old releases are stored here.
release_archive_dir ?= ../release
+# If RELEASE_TYPE is undefined, but RELEASE is, use its second word.
+# But overwrite VERSION.
+ifdef RELEASE
+ VERSION := $(word 1, $(RELEASE))
+ RELEASE_TYPE ?= $(word 2, $(RELEASE))
+endif
+
+# Validate and return $(RELEASE_TYPE), or die.
+RELEASE_TYPES = alpha beta stable
+release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES))
+
# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
# Use alpha.gnu.org for alpha and beta releases.
# Use ftp.gnu.org for stable releases.
gnu_ftp_host-alpha = alpha.gnu.org
gnu_ftp_host-beta = alpha.gnu.org
gnu_ftp_host-stable = ftp.gnu.org
-gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
-ifeq ($(gnu_rel_host),ftp.gnu.org)
-url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
-else
-url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
-endif
+url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \
+ http://ftpmirror.gnu.org/$(PACKAGE), \
+ ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
# Override this in cfg.mk if you are using a different format in your
# NEWS file.
@@ -124,7 +155,7 @@ export LC_ALL = C
## Sanity checks. ##
## --------------- ##
-_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
+_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
# Collect the names of rules starting with 'sc_'.
syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p'
\
@@ -132,9 +163,9 @@ syntax-check-rules := $(sort $(shell sed -n
's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
.PHONY: $(syntax-check-rules)
ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
-local-checks-available += $(syntax-check-rules)
+ local-checks-available += $(syntax-check-rules)
else
-local-checks-available += no-vc-detected
+ local-checks-available += no-vc-detected
no-vc-detected:
@echo "No version control files detected; skipping syntax check"
endif
@@ -330,8 +361,8 @@ sc_prohibit_atoi_atof:
sp_ = strcmp *\(.+\)
sc_prohibit_strcmp:
@prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \
- exclude=':# *define STRN?EQ\(' \
- halt='$(ME): replace strcmp calls above with STREQ/STRNEQ' \
+ exclude='# *define STRN?EQ\(' \
+ halt='replace strcmp calls above with STREQ/STRNEQ' \
$(_sc_search_regexp)
# Really. You don't want to use this function.
@@ -354,7 +385,7 @@ sc_prohibit_strncpy:
# perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
sc_prohibit_magic_number_exit:
@prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]' \
- exclude='error ?\((0,|[^,]*)' \
+ exclude='exit \(77\)|error ?\(((0|77),|[^,]*)' \
halt='use EXIT_* values rather than magic number' \
$(_sc_search_regexp)
@@ -570,8 +601,6 @@ sc_prohibit_c_ctype_without_use:
@h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
$(_sc_header_without_use)
-_empty =
-_sp = $(_empty) $(_empty)
# The following list was generated by running:
# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
@@ -724,6 +753,7 @@ sc_require_test_exit_idiom:
sc_trailing_blank:
@prohibit='[ ]$$' \
halt='found trailing blank(s)' \
+ exclude='^Binary file .* matches$$' \
$(_sc_search_regexp)
# Match lines like the following, but where there is only one space
@@ -744,7 +774,7 @@ _gl_translatable_diag_func_re ?= error
sc_unmarked_diagnostics:
@prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
exclude='(_|ngettext ?)\(' \
- halt='$(ME): found unmarked diagnostic(s)' \
+ halt='found unmarked diagnostic(s)' \
$(_sc_search_regexp)
# Avoid useless parentheses like those in this example:
@@ -780,7 +810,7 @@ sc_prohibit_always_true_header_tests:
sc_prohibit_defined_have_decl_tests:
@prohibit='#[ ]*if(n?def|.*\<defined)\>[ (]+HAVE_DECL_' \
- halt='$(ME): HAVE_DECL macros are always defined' \
+ halt='HAVE_DECL macros are always defined' \
$(_sc_search_regexp)
# ==================================================================
@@ -1020,7 +1050,7 @@ sc_redundant_const:
sc_const_long_option:
@prohibit='^ *static.*struct option ' \
exclude='const struct option|struct option const' \
- halt='$(ME): add "const" to the above declarations' \
+ halt='add "const" to the above declarations' \
$(_sc_search_regexp)
NEWS_hash = \
@@ -1091,9 +1121,11 @@ fix_po_file_diag = \
'you have changed the set of files with translatable diagnostics;\n\
apply the above patch\n'
-# Verify that all source files using _() are listed in po/POTFILES.in.
+# Verify that all source files using _() (more specifically, files that
+# match $(_gl_translatable_string_re)) are listed in po/POTFILES.in.
po_file ?= $(srcdir)/po/POTFILES.in
generated_files ?= $(srcdir)/lib/*.[ch]
+_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
sc_po_check:
@if test -f $(po_file); then \
grep -E -v '^(#|$$)' $(po_file) \
@@ -1113,7 +1145,7 @@ sc_po_check:
esac; \
files="$$files $$file"; \
done; \
- grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
+ grep -E -l '$(_gl_translatable_string_re)' $$files \
| sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > address@hidden;
\
diff -u -L $(po_file) -L $(po_file) address@hidden address@hidden
\
|| { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
@@ -1123,7 +1155,7 @@ sc_po_check:
# Sometimes it is useful to change the PATH environment variable
# in Makefiles. When doing so, it's better not to use the Unix-centric
# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead'
+msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead'
sc_makefile_path_separator_check:
@prohibit='PATH[=].*:' \
in_vc_files='akefile|\.mk$$' \
@@ -1134,7 +1166,7 @@ sc_makefile_path_separator_check:
# i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
# and is read-only.
writable-files:
- if test -d $(release_archive_dir); then \
+ $(AM_V_GEN)if test -d $(release_archive_dir); then \
for file in $(DIST_ARCHIVES); do \
for p in ./ $(release_archive_dir)/; do \
test -e $$p$$file || continue; \
@@ -1216,7 +1248,7 @@ sc_Wundef_boolean:
# not be constant, or might overflow a stack. In general, use PATH_MAX as
# a limit, not an array or alloca size.
sc_prohibit_path_max_allocation:
- @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX' \
+ @prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX' \
halt='Avoid stack allocations of size PATH_MAX' \
$(_sc_search_regexp)
@@ -1265,23 +1297,28 @@ gpg_key_ID ?=
\
translation_project_ ?= address@hidden
# Make info-gnu the default only for a stable release.
-ifeq ($(RELEASE_TYPE),stable)
- announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
- announcement_mail_headers_ ?=
\
- To: address@hidden \
- Cc: $(announcement_Cc_) \
- Mail-Followup-To: $(PACKAGE_BUGREPORT)
-else
- announcement_Cc_ ?= $(translation_project_)
- announcement_mail_headers_ ?=
\
- To: $(PACKAGE_BUGREPORT) \
- Cc: $(announcement_Cc_)
-endif
-
+announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_stable = \
+ To: address@hidden \
+ Cc: $(announcement_Cc_) \
+ Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement_Cc_alpha = $(translation_project_)
+announcement_mail_headers_alpha = \
+ To: $(PACKAGE_BUGREPORT) \
+ Cc: $(announcement_Cc_)
+
+announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
+announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
+
+announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
announcement: NEWS ChangeLog $(rel-files)
- $(AM_V_GEN)$(srcdir)/$(_build-aux)/announce-gen \
+# Not $(AM_V_GEN) since the output of this command serves as
+# announcement message: it would start with " GEN announcement".
+ $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
- --release-type=$(RELEASE_TYPE) \
+ --release-type=$(release-type) \
--package=$(PACKAGE) \
--prev=$(PREV_VERSION) \
--curr=$(VERSION) \
@@ -1308,16 +1345,22 @@ ftp-gnu = ftp://ftp.gnu.org/gnu
www-gnu = http://www.gnu.org
upload_dest_dir_ ?= $(PACKAGE)
+upload_command = \
+ $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \
+ --to $(gnu_rel_host):$(upload_dest_dir_) \
+ $(rel-files)
emit_upload_commands:
@echo =====================================
@echo =====================================
- @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\"
- @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\"
- @echo " $(rel-files)"
+ @echo '$(upload_command)'
@echo '# send the ~/announce-$(my_distdir) e-mail'
@echo =====================================
@echo =====================================
+.PHONY: upload
+upload:
+ $(AM_V_GEN)$(upload_command)
+
define emit-commit-log
printf '%s\n' 'maint: post-release administrivia' '' \
'* NEWS: Add header line for next release.'
\
@@ -1347,8 +1390,9 @@ submodule-checks ?= no-submodule-changes
public-submodule-commit
public-submodule-commit:
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
cd $(srcdir) && \
- git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \
- = '$$(git merge-base origin $$sha1)' \
+ git submodule --quiet foreach \
+ test '"$$(git rev-parse "$$sha1")"' \
+ = '"$$(git merge-base origin "$$sha1")"' \
|| { echo '$(ME): found non-public submodule commit' >&2; \
exit 1; }; \
else \
@@ -1363,7 +1407,7 @@ public-submodule-commit:
gl_public_submodule_commit ?= public-submodule-commit
check: $(gl_public_submodule_commit)
-.PHONY: alpha beta stable
+.PHONY: alpha beta stable release
ALL_RECURSIVE_TARGETS += alpha beta stable
alpha beta stable: $(local-check) writable-files $(submodule-checks)
$(AM_V_GEN)test $@ = stable \
@@ -1377,15 +1421,16 @@ alpha beta stable: $(local-check) writable-files
$(submodule-checks)
$(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
$(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+release:
+ $(AM_V_GEN)$(MAKE) $(release-type)
+
# 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:
- $(AM_V_GEN)case $$RELEASE_TYPE in alpha|beta|stable) ;; \
- *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
- $(AM_V_at)$(MAKE) --no-print-directory -s announcement \
+ $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \
> ~/announce-$(my_distdir)
$(AM_V_at)if test -d $(release_archive_dir); then \
ln $(rel-files) $(release_archive_dir); \
@@ -1575,6 +1620,7 @@ _gl_TS_obj_files ?= *.$(OBJEXT)
# Files in which to search for the one-line style extern declarations.
# $(_gl_TS_dir)-relative.
_gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
.PHONY: _gl_tight_scope
_gl_tight_scope: $(bin_PROGRAMS)
@@ -1597,7 +1643,8 @@ _gl_tight_scope: $(bin_PROGRAMS)
&& { echo the above functions should have static scope >&2; \
exit 1; } || : ; \
( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars); \
- perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \
+ perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' \
+ $$hdr $(_gl_TS_other_headers) \
) | sort -u > $$t; \
nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p' \
| sort -u | grep -Ev -f $$t
\
diff --git a/po/hr.po.in b/po/hr.po.in
index ee29998..36fb693 100644
--- a/po/hr.po.in
+++ b/po/hr.po.in
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: libidn 1.25\n"
"Report-Msgid-Bugs-To: address@hidden"
"POT-Creation-Date: 2012-05-23 10:37+0200\n"
-"PO-Revision-Date: 2012-07-05 23:17+0200\n"
+"PO-Revision-Date: 2012-09-27 23:16+0200\n"
"Last-Translator: Tomislav Krznar <address@hidden>\n"
"Language-Team: Croatian <address@hidden>\n"
"Language: hr\n"
@@ -28,7 +28,6 @@ msgid "String preparation failed"
msgstr "Priprema niza nije uspjela"
#: lib/strerror-idna.c:90
-#, fuzzy
msgid "Punycode failed"
msgstr "Punycode nije uspio"
@@ -50,7 +49,7 @@ msgstr "Ulaz ne poÄinje s ACE prefiksom (âxn--â)"
#: lib/strerror-idna.c:110
msgid "String not idempotent under ToASCII"
-msgstr ""
+msgstr "Niz nije idempotentan prema ToASCII"
#: lib/strerror-idna.c:114
msgid "Input already contain ACE prefix (`xn--')"
@@ -75,7 +74,7 @@ msgstr "Nepoznata greška"
#: lib/strerror-pr29.c:70
msgid "String not idempotent under Unicode NFKC normalization"
-msgstr ""
+msgstr "Niz nije idempotentan prema Unicode NFKC normalizaciji"
#: lib/strerror-punycode.c:70
msgid "Invalid input"
@@ -91,11 +90,11 @@ msgstr "PrekoraÄeno ograniÄenje veliÄine niza"
#: lib/strerror-stringprep.c:90
msgid "Forbidden unassigned code points in input"
-msgstr ""
+msgstr "Zabranjene nedodijeljene kodne toÄke na ulazu"
#: lib/strerror-stringprep.c:94
msgid "Prohibited code points in input"
-msgstr ""
+msgstr "Zabranjene kodne toÄke na ulazu"
#: lib/strerror-stringprep.c:98
msgid "Conflicting bidirectional properties in input"
@@ -107,7 +106,7 @@ msgstr "IzobliÄen dvosmjerni niz"
#: lib/strerror-stringprep.c:106
msgid "Prohibited bidirectional code points in input"
-msgstr ""
+msgstr "Zabranjene dvosmjerne kodne toÄke na ulazu"
#: lib/strerror-stringprep.c:114
msgid "Error in stringprep profile definition"
@@ -115,7 +114,7 @@ msgstr "Greška u stringprep definiciji profila"
#: lib/strerror-stringprep.c:118
msgid "Flag conflict with profile"
-msgstr ""
+msgstr "Konflikt zastavice s profilom"
#: lib/strerror-stringprep.c:122
msgid "Unknown profile"
@@ -127,7 +126,7 @@ msgstr "Unicode normalizacija nije uspjela (interna
greška)"
#: lib/strerror-tld.c:72
msgid "Code points prohibited by top-level domain"
-msgstr ""
+msgstr "Kodne toÄke zabranjene vrÅ¡nom domenom"
#: lib/strerror-tld.c:76
msgid "Missing input"
@@ -152,6 +151,8 @@ msgid ""
"Internationalized Domain Name (IDN) convert STRINGS, or standard input.\n"
"\n"
msgstr ""
+"Pretvaranje NIZOVA ili standardnog ulaza u internacionalizirano ime domene
(IDN).\n"
+"\n"
#: src/idn.c:76
msgid ""
@@ -166,6 +167,16 @@ msgid ""
"\n"
"Mandatory arguments to long options are mandatory for short options too.\n"
msgstr ""
+"SuÄelje naredbenog retka za biblioteku internacionaliziranih imena domena.\n"
+"\n"
+"Svi znakovni nizovi bi trebali biti kodirani u skupu znakova odreÄenom\n"
+"vaÅ¡im lokalom. Koristite â--debugâ kako biste ga otkrili. Možete ga\n"
+"promijeniti postavljanjem varijable okoline CHARSET.\n"
+"\n"
+"Za obradu niza koji poÄinje s â-â, npr. â-fooâ, koristite â--â
za\n"
+"oznaÄavanje kraja popisa parametara, npr. âidn --quiet -a -- -fooâ.\n"
+"\n"
+"Obavezni argumenti dugaÄkih opcija takoÄer su obavezni i za kratke
opcije.\n"
#: src/idn.c:88
msgid ""
@@ -183,18 +194,27 @@ msgid ""
" -a, --idna-to-ascii Convert to ACE according to IDNA (default mode)\n"
" -u, --idna-to-unicode Convert from ACE according to IDNA\n"
msgstr ""
+" -s, --stringprep Pripremi niz prema nameprep profilu\n"
+" -d, --punycode-decode Dekodiraj Punycode\n"
+" -e, --punycode-encode Kodiraj Punycode\n"
+" -a, --idna-to-ascii Pretvori u ACE u skladu s IDNA (zadani naÄin)\n"
+" -u, --idna-to-unicode Pretvori iz ACE u skladu s IDNA\n"
#: src/idn.c:99
msgid ""
" --allow-unassigned Toggle IDNA AllowUnassigned flag (default off)\n"
" --usestd3asciirules Toggle IDNA UseSTD3ASCIIRules flag (default off)\n"
msgstr ""
+" --allow-unassigned Promijeni IDNA AllowUnassigned zastavicu (poÄetno
iskljuÄeno)\n"
+" --usestd3asciirules Promijeni IDNA UseSTD3ASCIIRules zastavicu
(poÄetno iskljuÄeno)\n"
#: src/idn.c:103
msgid ""
" --no-tld Don't check string for TLD specific rules\n"
" Only for --idna-to-ascii and --idna-to-unicode\n"
msgstr ""
+" --no-tld Ne provjeravaj TLD specifiÄna pravila u nizu\n"
+" Samo za --idna-to-ascii i --idna-to-unicode\n"
#: src/idn.c:107
msgid " -n, --nfkc Normalize string according to Unicode v3.2
NFKC\n"
@@ -207,12 +227,18 @@ msgid ""
" `iSCSI', `Nodeprep', `Resourceprep', \n"
" `trace', `SASLprep'\n"
msgstr ""
+" -p, --profile=NIZ Koristi navedeni stringprep profil\n"
+" Ispravni stringprep profili: âNameprepâ,\n"
+" âiSCSIâ, âNodeprepâ,
âResourceprepâ,\n"
+" âtraceâ, âSASLprepâ\n"
#: src/idn.c:116
msgid ""
" --debug Print debugging information\n"
" --quiet Silent operation\n"
msgstr ""
+" --debug Ispiši informacije za debugiranje\n"
+" --quiet Rad bez ispisa\n"
#: src/idn.c:172
#, c-format
diff --git a/tests/tst_tld.c b/tests/tst_tld.c
index 919d560..d70ab14 100644
--- a/tests/tst_tld.c
+++ b/tests/tst_tld.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <stringprep.h>
+#include <idn-free.h>
#include <tld.h>
#include "utils.h"
@@ -61,11 +62,27 @@ static const struct tld tld[] = {
3}
};
+static const Tld_table _tld_fr_override =
+ {
+ "fr",
+ "2.0",
+ 0,
+ NULL
+ };
+
+/* Main array */
+const Tld_table * my_tld_tables[] =
+ {
+ &_tld_fr_override,
+ NULL
+ };
+
void
doit (void)
{
size_t i;
const Tld_table *tldtable;
+ char *out;
size_t errpos;
int rc;
@@ -81,6 +98,111 @@ doit (void)
if (tldtable != NULL)
fail ("FAIL: tld_default_table (NULL, NULL) != NULL\n");
+ tldtable = tld_default_table (NULL, NULL);
+ if (tldtable != NULL)
+ fail ("FAIL: tld_default_table (NULL, NULL) != NULL\n");
+
+ tldtable = tld_default_table ("fr", NULL);
+ if (tldtable == NULL)
+ fail ("FAIL: tld_default_table (\"fr\", NULL) == NULL\n");
+ else if (tldtable->version == NULL)
+ fail ("FAIL: tld_default_table (\"fr\", NULL)->version == NULL\n");
+ else if (tldtable->name && strcmp (tldtable->version, "1.0") != 0)
+ fail ("FAIL: tld_default_table (\"fr\", NULL)->version = \"%s\""
+ " != \"1.0\"\n", tldtable->version);
+
+ tldtable = tld_default_table ("fr", my_tld_tables);
+ if (tldtable == NULL)
+ fail ("FAIL: tld_default_table (\"fr\", NULL) == NULL\n");
+ else if (tldtable->version == NULL)
+ fail ("FAIL: tld_default_table (\"fr\", NULL)->version == NULL\n");
+ else if (tldtable->name && strcmp (tldtable->version, "2.0") != 0)
+ fail ("FAIL: tld_default_table (\"fr\", NULL)->version = \"%s\""
+ " != \"2.0\"\n", tldtable->version);
+
+ rc = tld_get_4 (NULL, 42, &out);
+ if (rc != TLD_NODATA)
+ fail ("FAIL: tld_get_4 (NULL, 42, &out) != TLD_NODATA: %d\n", rc);
+
+ rc = tld_get_4 (tld[0].in, 0, &out);
+ if (rc != TLD_NODATA)
+ fail ("FAIL: tld_get_4 (NULL, 42, &out) != TLD_NODATA: %d\n", rc);
+
+ rc = tld_check_4t (tld[0].in, tld[0].inlen, NULL, NULL);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_check_4t (tld=NULL) != TLD_SUCCESS: %d\n", rc);
+
+ rc = tld_check_4z (NULL, NULL, NULL);
+ if (rc != TLD_NODATA)
+ fail ("FAIL: tld_check_4z (NULL) != TLD_NODATA: %d\n", rc);
+
+ rc = tld_check_4z (tld[0].in, NULL, NULL);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_check_4z (in) != TLD_SUCCESS: %d\n", rc);
+
+ rc = tld_check_8z (NULL, NULL, NULL);
+ if (rc != TLD_NODATA)
+ fail ("FAIL: tld_check_8z (NULL) != TLD_NODATA: %d\n", rc);
+
+ rc = tld_check_lz (NULL, NULL, NULL);
+ if (rc != TLD_NODATA)
+ fail ("FAIL: tld_check_lz (NULL) != TLD_NODATA: %d\n", rc);
+
+ rc = tld_check_lz ("foo", NULL, NULL);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_check_lz (\"foo\") != TLD_SUCCESS: %d\n", rc);
+
+ {
+ uint32_t in[] = { 0x73, 0x6a, 0x64, 0x2e, 0x73, 0x65, 0x00 };
+ const char *p;
+
+ rc = tld_get_4 (in, 6, &out);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_get_4 (in, 6, &out) != TLD_OK: %d\n", rc);
+ if (strcmp ("se", out) != 0)
+ fail ("FAIL: tld_get_4 (in, 6, &out): %s\n", out);
+ idn_free (out);
+
+ rc = tld_get_4z (in, &out);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_get_4z (in, &out) != TLD_OK: %d\n", rc);
+ if (strcmp ("se", out) != 0)
+ fail ("FAIL: tld_get_4z (in, &out): %s\n", out);
+ idn_free (out);
+
+ p = "sjd.se";
+ rc = tld_get_z (p, &out);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_get_z (\"%s\", &out) != TLD_OK: %d\n", p, rc);
+ if (strcmp ("se", out) != 0)
+ fail ("FAIL: tld_get_z (\"%s\", &out): %s\n", p, out);
+ idn_free (out);
+
+ p = "foo.bar.baz.sjd.se";
+ rc = tld_get_z (p, &out);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_get_z (\"%s\", &out) != TLD_OK: %d\n", p, rc);
+ if (strcmp ("se", out) != 0)
+ fail ("FAIL: tld_get_z (\"%s\", &out): %s\n", p, out);
+ idn_free (out);
+
+ p = ".sjd.se";
+ rc = tld_get_z (p, &out);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_get_z (\"%s\", &out) != TLD_OK: %d\n", p, rc);
+ if (strcmp ("se", out) != 0)
+ fail ("FAIL: tld_get_z (\"%s\", &out): %s\n", p, out);
+ idn_free (out);
+
+ p = ".se";
+ rc = tld_get_z (p, &out);
+ if (rc != TLD_SUCCESS)
+ fail ("FAIL: tld_get_z (\"%s\", &out) != TLD_OK: %d\n", p, rc);
+ if (strcmp ("se", out) != 0)
+ fail ("FAIL: tld_get_z (\"%s\", &out): %s\n", p, out);
+ idn_free (out);
+ }
+
for (i = 0; i < sizeof (tld) / sizeof (tld[0]); i++)
{
if (debug)
hooks/post-receive
--
GNU libidn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU libidn branch, master, updated. libidn-1-25-29-gec6c14a,
Simon Josefsson <=