[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU libidn branch, master, updated. libidn-1-21-9-g7649dc2
From: |
Simon Josefsson |
Subject: |
[SCM] GNU libidn branch, master, updated. libidn-1-21-9-g7649dc2 |
Date: |
Tue, 03 May 2011 07:34:44 +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=7649dc2bb9598e2909692d648de85282fb0c1ddb
The branch, master has been updated
via 7649dc2bb9598e2909692d648de85282fb0c1ddb (commit)
via 4ac381cad6b3eec6198c58ac78047907d5768056 (commit)
from b7d9eb019700f8e311bcc97f325344c437bb665d (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 7649dc2bb9598e2909692d648de85282fb0c1ddb
Author: Simon Josefsson <address@hidden>
Date: Tue May 3 09:33:37 2011 +0200
libidn: Fix memory leak when idna_to_ascii_4i fails.
Reported by and tiny patch from Olga Limburg <address@hidden>.
commit 4ac381cad6b3eec6198c58ac78047907d5768056
Author: Simon Josefsson <address@hidden>
Date: Tue May 3 09:13:16 2011 +0200
Update gnulib files.
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 6 +
NEWS | 3 +
THANKS | 1 +
build-aux/vc-list-files | 14 ++--
cfg.mk | 2 +-
gl/m4/dup2.m4 | 17 +++-
gl/m4/gnulib-comp.m4 | 178 ++++++++++++++--------------------
gl/m4/manywarnings.m4 | 180 ++++++++++++++++++++++-------------
gl/m4/stdio_h.m4 | 4 +-
gltests/stdlib.in.h | 3 +-
lib/gl/m4/gnulib-comp.m4 | 131 +++++++++++---------------
lib/gltests/stdlib.in.h | 3 +-
lib/idna.c | 5 +-
lib/stringprep.h | 2 +-
maint.mk | 16 ++-
tests/Makefile.am | 3 +-
tests/{tst_toutf8.c => tst_idna4.c} | 44 ++++-----
17 files changed, 312 insertions(+), 300 deletions(-)
copy tests/{tst_toutf8.c => tst_idna4.c} (50%)
diff --git a/.gitignore b/.gitignore
index 09fbd60..f67a268 100644
--- a/.gitignore
+++ b/.gitignore
@@ -82,7 +82,9 @@ doc/reference/html-build.stamp
doc/reference/html.stamp
doc/reference/html/
doc/reference/libidn-decl-list.txt
+doc/reference/libidn-decl-list.txt.bak
doc/reference/libidn-decl.txt
+doc/reference/libidn-decl.txt.bak
doc/reference/libidn-overrides.txt
doc/reference/libidn-sections.txt
doc/reference/libidn-undeclared.txt
@@ -385,6 +387,7 @@ libidn-*.tar.gz.sig
libidn.pc
libtool
m4/codeset.m4
+m4/fcntl-o.m4
m4/gettext.m4
m4/glibc2.m4
m4/glibc21.m4
@@ -413,6 +416,7 @@ m4/printf-posix.m4
m4/progtest.m4
m4/size_max.m4
m4/stdint_h.m4
+m4/threadlib.m4
m4/uintmax_t.m4
m4/visibility.m4
m4/wchar_t.m4
@@ -460,6 +464,8 @@ tests/tst_idna2
tests/tst_idna2.o
tests/tst_idna3
tests/tst_idna3.o
+tests/tst_idna4
+tests/tst_idna4.o
tests/tst_nfkc
tests/tst_nfkc.o
tests/tst_pr29
diff --git a/NEWS b/NEWS
index 982755b..75b1916 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ See the end for copying conditions.
** libidn: Add -liconv as static library requirement in libidn.pc, for MinGW.
Reported by Volker Grabsch <address@hidden>.
+** libidn: Fix memory leak when idna_to_ascii_4i fails.
+Reported by and tiny patch from Olga Limburg <address@hidden>.
+
** build: Really distribute win32/libidn4win.mk.
** API and ABI is backwards compatible with the previous version.
diff --git a/THANKS b/THANKS
index bd38273..635dce5 100644
--- a/THANKS
+++ b/THANKS
@@ -96,6 +96,7 @@ Roman Mamedov <address@hidden>
Waqas Hussain <address@hidden>
Guido Trentalancia <address@hidden>
Volker Grabsch <address@hidden>
+Olga Limburg <address@hidden>
----------------------------------------------------------------------
Copying and distribution of this file, with or without modification,
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 9bb6fe6..2fced25 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -2,7 +2,7 @@
# List version-controlled file names.
# Print a version string.
-scriptversion=2010-04-23.22; # UTC
+scriptversion=2011-04-29.20; # UTC
# Copyright (C) 2006-2011 Free Software Foundation, Inc.
@@ -94,12 +94,12 @@ elif test -d CVS; then
eval cvsu --find --types=AFGM '"$dir"' $postprocess
else
eval awk -F/ \''{ \
- if (!$1 && $3 !~ /^-/) { \
- f=FILENAME; \
- if (f ~ /CVS\/Entries$/) \
- f = substr(f, 1, length(f)-11); \
- print f $2; \
- }}'\'' \
+ if (!$1 && $3 !~ /^-/) { \
+ f=FILENAME; \
+ if (f ~ /CVS\/Entries$/) \
+ f = substr(f, 1, length(f)-11); \
+ print f $2; \
+ }}'\'' \
`find "$dir" -name Entries -print` /dev/null' $postprocess
fi
elif test -d .svn; then
diff --git a/cfg.mk b/cfg.mk
index 44ac0a0..f0d9c2e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -29,7 +29,7 @@ local-checks-to-skip = sc_prohibit_strcmp
sc_prohibit_have_config_h \
sc_prohibit_HAVE_MBRTOWC sc_program_name sc_trailing_blank \
sc_GPL_version sc_immutable_NEWS
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
-
^(gtk-doc.make|m4/pkg.m4|doc/specifications|contrib/doxygen/Doxyfile|doc/fdl-1.3.texi|csharp/libidn.*suo|(lib/)?(gl|gltests|build-aux)/)
+
^(maint.mk|gtk-doc.make|m4/pkg.m4|doc/specifications|contrib/doxygen/Doxyfile|doc/fdl-1.3.texi|csharp/libidn.*suo|(lib/)?(gl|gltests|build-aux)/)
update-copyright-env = UPDATE_COPYRIGHT_HOLDER="Simon Josefsson"
# Explicit syntax-check exceptions.
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index def263b..62e31a8 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -8,11 +8,17 @@ AC_DEFUN([gl_FUNC_DUP2],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_CHECK_FUNCS_ONCE([dup2 fcntl])
- if test $ac_cv_func_dup2 = no; then
- HAVE_DUP2=0
- AC_LIBOBJ([dup2])
- else
+ m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [
+ AC_CHECK_FUNCS_ONCE([dup2])
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+ AC_LIBOBJ([dup2])
+ fi
+ ], [
+ AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.])
+ ])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $HAVE_DUP2 = 1; then
AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
[AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <unistd.h>
@@ -63,6 +69,7 @@ AC_DEFUN([gl_FUNC_DUP2],
AC_DEFUN([gl_REPLACE_DUP2],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([dup2])
if test $ac_cv_func_dup2 = yes; then
REPLACE_DUP2=1
fi
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index af2cd0d..88181c1 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -130,76 +130,42 @@ AC_DEFUN([gl_INIT],
m4_pushdef([gl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='gl'
- # Code from module arg-nonnull:
- # Code from module autobuild:
- # Code from module c++defs:
- # Code from module csharpcomp-script:
- AC_REQUIRE([gt_CSHARPCOMP])
- AC_CONFIG_FILES([csharpcomp.sh:build-aux/csharpcomp.sh.in])
- # Code from module errno:
- gl_HEADER_ERRNO_H
- # Code from module error:
- gl_ERROR
- m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
- AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
- # Code from module extensions:
- # Code from module fdl-1.3:
- # Code from module gendocs:
- # Code from module getopt-gnu:
- gl_FUNC_GETOPT_GNU
- gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
- # Code from module getopt-posix:
- gl_FUNC_GETOPT_POSIX
- # Code from module gettext-h:
- AC_SUBST([LIBINTL])
- AC_SUBST([LTLIBINTL])
- # Code from module gnumakefile:
- # 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])])
- # Code from module gnupload:
- # Code from module gpl-3.0:
- # Code from module include_next:
- # Code from module intprops:
- # Code from module lgpl-2.1:
- # Code from module maintainer-makefile:
- AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
- [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
- # Code from module manywarnings:
- # Code from module pmccabe2html:
- AC_PATH_PROG([PMCCABE], [pmccabe], [false])
- # Code from module progname:
- AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
- AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
- # Code from module stdarg:
- gl_STDARG_H
- # Code from module stddef:
- gl_STDDEF_H
- # Code from module strerror:
- gl_FUNC_STRERROR
- gl_STRING_MODULE_INDICATOR([strerror])
- # Code from module string:
- gl_HEADER_STRING_H
- # Code from module unistd:
- gl_UNISTD_H
- # Code from module update-copyright:
- # Code from module useless-if-before-free:
- # Code from module valgrind-tests:
- gl_VALGRIND_TESTS
- # Code from module vc-list-files:
- # Code from module version-etc:
- gl_VERSION_ETC
- # Code from module warn-on-use:
- # Code from module warnings:
- AC_SUBST([WARN_CFLAGS])
+AC_REQUIRE([gt_CSHARPCOMP])
+AC_CONFIG_FILES([csharpcomp.sh:build-aux/csharpcomp.sh.in])
+gl_HEADER_ERRNO_H
+gl_ERROR
+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
+gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
+gl_FUNC_GETOPT_POSIX
+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]))])])
+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>])
+gl_STDARG_H
+gl_STDDEF_H
+gl_FUNC_STRERROR
+gl_STRING_MODULE_INDICATOR([strerror])
+gl_HEADER_STRING_H
+gl_UNISTD_H
+gl_VALGRIND_TESTS
+gl_VERSION_ETC
+AC_SUBST([WARN_CFLAGS])
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -246,42 +212,42 @@ 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
- gl_FUNC_DUP2
- gl_UNISTD_MODULE_INDICATOR([dup2])
- gl_ENVIRON
- gl_UNISTD_MODULE_INDICATOR([environ])
- gl_FCNTL_H
- AC_REQUIRE([AC_C_INLINE])
- gl_FUNC_LSTAT
- gl_SYS_STAT_MODULE_INDICATOR([lstat])
- gl_FUNC_MALLOC_POSIX
- gl_STDLIB_MODULE_INDICATOR([malloc-posix])
- gl_MALLOCA
- gl_FUNC_OPEN
- gl_FCNTL_MODULE_INDICATOR([open])
- gl_PATHMAX
- gl_FUNC_PUTENV
- gl_STDLIB_MODULE_INDICATOR([putenv])
- gl_FUNC_SETENV
- gl_STDLIB_MODULE_INDICATOR([setenv])
- gl_FUNC_STAT
- gl_SYS_STAT_MODULE_INDICATOR([stat])
- AM_STDBOOL_H
- gl_STDIO_H
- gl_STDLIB_H
- gl_FUNC_SYMLINK
- gl_UNISTD_MODULE_INDICATOR([symlink])
- gl_HEADER_SYS_STAT_H
- AC_PROG_MKDIR_P
- gl_HEADER_TIME_H
- gl_FUNC_UNSETENV
- gl_STDLIB_MODULE_INDICATOR([unsetenv])
- abs_aux_dir=`cd "$ac_aux_dir"; pwd`
- AC_SUBST([abs_aux_dir])
- gl_VALGRIND_TESTS
- abs_aux_dir=`cd "$ac_aux_dir"; pwd`
- AC_SUBST([abs_aux_dir])
+gl_FUNC_ALLOCA
+gl_FUNC_DUP2
+gl_UNISTD_MODULE_INDICATOR([dup2])
+gl_ENVIRON
+gl_UNISTD_MODULE_INDICATOR([environ])
+gl_FCNTL_H
+AC_REQUIRE([AC_C_INLINE])
+gl_FUNC_LSTAT
+gl_SYS_STAT_MODULE_INDICATOR([lstat])
+gl_FUNC_MALLOC_POSIX
+gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+gl_MALLOCA
+gl_FUNC_OPEN
+gl_FCNTL_MODULE_INDICATOR([open])
+gl_PATHMAX
+gl_FUNC_PUTENV
+gl_STDLIB_MODULE_INDICATOR([putenv])
+gl_FUNC_SETENV
+gl_STDLIB_MODULE_INDICATOR([setenv])
+gl_FUNC_STAT
+gl_SYS_STAT_MODULE_INDICATOR([stat])
+AM_STDBOOL_H
+gl_STDIO_H
+gl_STDLIB_H
+gl_FUNC_SYMLINK
+gl_UNISTD_MODULE_INDICATOR([symlink])
+gl_HEADER_SYS_STAT_H
+AC_PROG_MKDIR_P
+gl_HEADER_TIME_H
+gl_FUNC_UNSETENV
+gl_STDLIB_MODULE_INDICATOR([unsetenv])
+abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+AC_SUBST([abs_aux_dir])
+gl_VALGRIND_TESTS
+abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+AC_SUBST([abs_aux_dir])
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(gltests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index e928821..67db064 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -35,74 +35,124 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
# using gl_WARN_ADD if you want to make sure your gcc understands it.
AC_DEFUN([gl_MANYWARN_ALL_GCC],
[
- 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 \
- -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
+ 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, }
+ AC_REQUIRE([AC_PROG_CC])
+ if test -n "$GCC"; then
+
+ dnl First, check -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], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_nomfi_supported=yes],
+ [gl_cv_cc_nomfi_supported=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_nomfi_supported])
+
+ if test "$gl_cv_cc_nomfi_supported" = yes; then
+ dnl Now check whether -Wno-missing-field-initializers is needed
+ dnl for the { 0, } construct.
+ AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed])
+ AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[void f (void)
+ {
+ typedef struct { int a; int b; } s_t;
+ s_t s1 = { 0, };
+ }
+ ]],
+ [[]])],
+ [gl_cv_cc_nomfi_needed=no],
+ [gl_cv_cc_nomfi_needed=yes])
+ CFLAGS="$gl_save_CFLAGS"
+ ])
+ AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
+ fi
+ fi
+
+ 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 \
+ -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 \
- -Wcoverage-mismatch \
- -Wmultichar \
- -Wunused-macros \
- ; do
+ # The following are not documented in the manual but are included in
+ # output from gcc --help=warnings.
+ for gl_manywarn_item in \
+ -Wattributes \
+ -Wcoverage-mismatch \
+ -Wmultichar \
+ -Wunused-macros \
+ ; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
+
+ # Disable the missing-field-initializers warning if needed
+ if test "$gl_cv_cc_nomfi_needed" = yes; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
+ fi
+
$1=$gl_manywarn_set
])
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 8b013c2..a8326f3 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 36
+# stdio_h.m4 serial 37
dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -14,8 +14,6 @@ AC_DEFUN([gl_STDIO_H],
dnl <stdio.h> likely needs them.
GNULIB_FSCANF=1
GNULIB_SCANF=1
- GNULIB_VFSCANF=1
- GNULIB_VSCANF=1
GNULIB_FGETC=1
GNULIB_GETC=1
GNULIB_GETCHAR=1
diff --git a/gltests/stdlib.in.h b/gltests/stdlib.in.h
index b9ada2c..7513553 100644
--- a/gltests/stdlib.in.h
+++ b/gltests/stdlib.in.h
@@ -81,8 +81,9 @@ struct random_data
# endif
#endif
-#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && !
defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined
__CYGWIN__)
+#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined
GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined
__WIN32__) && ! defined __CYGWIN__)
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
+/* On MacOS X 10.5, only <unistd.h> declares mkstemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index 313c2bf..58a4ff7 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -106,50 +106,27 @@ AC_DEFUN([lgl_INIT],
m4_pushdef([lgl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='lib/gl'
- # Code from module arg-nonnull:
- # Code from module c++defs:
- # Code from module c-ctype:
- # Code from module c-strcase:
- # Code from module extensions:
- # Code from module gettext-h:
- AC_SUBST([LIBINTL])
- AC_SUBST([LTLIBINTL])
- # Code from module gperf:
- # Code from module havelib:
- # Code from module iconv:
- AM_ICONV
- m4_ifdef([gl_ICONV_MODULE_INDICATOR],
- [gl_ICONV_MODULE_INDICATOR([iconv])])
- # Code from module iconv-h:
- gl_ICONV_H
- # Code from module iconv_open:
- gl_FUNC_ICONV_OPEN
- # Code from module include_next:
- # Code from module lib-msvc-compat:
- gl_LD_OUTPUT_DEF
- # Code from module lib-symbol-versions:
- gl_LD_VERSION_SCRIPT
- # Code from module lib-symbol-visibility:
- gl_VISIBILITY
- # Code from module multiarch:
- gl_MULTIARCH
- # Code from module stdbool:
- AM_STDBOOL_H
- # Code from module stddef:
- gl_STDDEF_H
- # Code from module stdint:
- gl_STDINT_H
- # Code from module striconv:
- if test $gl_cond_libtool = false; then
- gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
- gl_libdeps="$gl_libdeps $LIBICONV"
- fi
- # Code from module string:
- gl_HEADER_STRING_H
- # Code from module strverscmp:
- gl_FUNC_STRVERSCMP
- gl_STRING_MODULE_INDICATOR([strverscmp])
- # Code from module warn-on-use:
+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
+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
+gl_STRING_MODULE_INDICATOR([strverscmp])
# End of code from modules
m4_ifval(lgl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([lgl_LIBSOURCES_DIR])[ ||
@@ -196,39 +173,39 @@ 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_LOCALE_H
- AC_CHECK_FUNCS_ONCE([newlocale])
- gl_LOCALENAME
- AC_CHECK_FUNCS_ONCE([newlocale])
- gl_LOCK
- gl_FUNC_MALLOC_POSIX
- gl_STDLIB_MODULE_INDICATOR([malloc-posix])
- gl_MALLOCA
- gl_FUNC_PUTENV
- gl_STDLIB_MODULE_INDICATOR([putenv])
- gl_FUNC_SETENV
- gl_STDLIB_MODULE_INDICATOR([setenv])
- gl_FUNC_SETLOCALE
- gl_LOCALE_MODULE_INDICATOR([setlocale])
- gt_LOCALE_FR
- gt_LOCALE_FR_UTF8
- gt_LOCALE_JA
- gt_LOCALE_ZH_CN
- gt_TYPE_WCHAR_T
- gt_TYPE_WINT_T
- gl_STDLIB_H
- gl_THREAD
- gl_THREADLIB
- gl_UNISTD_H
- gl_FUNC_UNSETENV
- 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])
+gl_LOCALE_H
+AC_CHECK_FUNCS_ONCE([newlocale])
+gl_LOCALENAME
+AC_CHECK_FUNCS_ONCE([newlocale])
+gl_LOCK
+gl_FUNC_MALLOC_POSIX
+gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+gl_MALLOCA
+gl_FUNC_PUTENV
+gl_STDLIB_MODULE_INDICATOR([putenv])
+gl_FUNC_SETENV
+gl_STDLIB_MODULE_INDICATOR([setenv])
+gl_FUNC_SETLOCALE
+gl_LOCALE_MODULE_INDICATOR([setlocale])
+gt_LOCALE_FR
+gt_LOCALE_FR_UTF8
+gt_LOCALE_JA
+gt_LOCALE_ZH_CN
+gt_TYPE_WCHAR_T
+gt_TYPE_WINT_T
+gl_STDLIB_H
+gl_THREAD
+gl_THREADLIB
+gl_UNISTD_H
+gl_FUNC_UNSETENV
+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])[ ||
diff --git a/lib/gltests/stdlib.in.h b/lib/gltests/stdlib.in.h
index b9ada2c..7513553 100644
--- a/lib/gltests/stdlib.in.h
+++ b/lib/gltests/stdlib.in.h
@@ -81,8 +81,9 @@ struct random_data
# endif
#endif
-#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && !
defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined
__CYGWIN__)
+#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined
GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined
__WIN32__) && ! defined __CYGWIN__)
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
+/* On MacOS X 10.5, only <unistd.h> declares mkstemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
diff --git a/lib/idna.c b/lib/idna.c
index e666439..906faa5 100644
--- a/lib/idna.c
+++ b/lib/idna.c
@@ -508,7 +508,10 @@ idna_to_ascii_4z (const uint32_t * input, char **output,
int flags)
{
rc = idna_to_ascii_4i (start, (size_t) (end - start), buf, flags);
if (rc != IDNA_SUCCESS)
- return rc;
+ {
+ free (out);
+ return rc;
+ }
}
if (out)
diff --git a/lib/stringprep.h b/lib/stringprep.h
index 6e51961..e2542a7 100644
--- a/lib/stringprep.h
+++ b/lib/stringprep.h
@@ -44,7 +44,7 @@ extern "C"
{
# endif
-# define STRINGPREP_VERSION "1.21"
+# define STRINGPREP_VERSION "1.22"
/* Error codes. */
typedef enum
diff --git a/maint.mk b/maint.mk
index 07a7773..8727b3f 100644
--- a/maint.mk
+++ b/maint.mk
@@ -33,7 +33,6 @@ GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
GIT = git
VC = $(GIT)
-VC-tag = git tag -s -m '$(VERSION)' 'v$(VERSION)' -u '$(gpg_key_ID)'
VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
@@ -942,16 +941,23 @@ update-NEWS-hash: NEWS
# Ensure that we use only the standard $(VAR) notation,
# not @...@ in Makefile.am, now that we can rely on automake
# to emit a definition for each substituted variable.
-# We use perl rather than "grep -nE ..." to exempt a single
-# use of an @address@hidden variable name in src/Makefile.am.
+# However, there is still one case in which @VAR@ use is not just
+# legitimate, but actually required: when augmenting an automake-defined
+# variable with a prefix. For example, gettext uses this:
+# MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
+# otherwise, makeinfo would put German or French (current locale)
+# navigation hints in the otherwise-English documentation.
+#
# Allow the package to add exceptions via a hook in cfg.mk;
# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by
# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
_makefile_at_at_check_exceptions ?=
sc_makefile_at_at_check:
- @perl -ne '/address@hidden@/'$(_makefile_at_at_check_exceptions)
\
+ @perl -ne '/address@hidden@/' \
+ -e ' && !/([A-Z_0-9]+)address@hidden@$$/' \
+ -e ''$(_makefile_at_at_check_exceptions) \
-e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
- $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \
+ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
news-check: NEWS
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 29c1efe..5bdaf04 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,7 +26,8 @@ check_LIBRARIES = libutils.a
libutils_a_SOURCES = utils.h utils.c
ctests = tst_stringprep tst_punycode tst_idna tst_idna2 tst_idna3 \
- tst_nfkc tst_pr29 tst_strerror tst_toutf8 tst_symbols
+ tst_idna4 tst_nfkc tst_pr29 tst_strerror tst_toutf8 \
+ tst_symbols
if TLD
ctests += tst_tld
endif
diff --git a/tests/tst_toutf8.c b/tests/tst_idna4.c
similarity index 50%
copy from tests/tst_toutf8.c
copy to tests/tst_idna4.c
index 99289a7..8ec69fb 100644
--- a/tests/tst_toutf8.c
+++ b/tests/tst_idna4.c
@@ -1,6 +1,5 @@
-/* tst_toutf8.c --- Self tests for UTF-8 conversion functions.
- * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- * 2011 Simon Josefsson
+/* tst_idna4.c --- Self tests for memory leak regression.
+ * Copyright (C) 2011 Simon Josefsson
*
* This file is part of GNU Libidn.
*
@@ -28,33 +27,26 @@
#include <stdarg.h>
#include <string.h>
-#include <stringprep.h>
+#include <idna.h>
+#include <idn-free.h>
#include "utils.h"
void
doit (void)
{
- char *p;
- const char *q;
-
- q = stringprep_locale_charset ();
- if (q == NULL)
- fail ("FAIL: stringprep_locale_charset == NULL\n");
- if (debug)
- printf ("PASS: stringprep_locale_charset == %s\n", q);
-
- p = stringprep_locale_to_utf8 ("foo");
- if (!p || memcmp (p, "foo", 4) != 0)
- fail ("FAIL: stringprep_locale_to_utf8(\"foo\") == %s\n", p);
- if (debug)
- printf ("PASS: stringprep_locale_to_utf8(\"foo\") == %s\n", p);
- free (p);
-
- p = stringprep_utf8_to_locale ("foo");
- if (!p || memcmp (p, "foo", 4) != 0)
- fail ("FAIL: stringprep_utf8_to_locale(\"foo\") == %s\n", p);
- if (debug)
- printf ("PASS: stringprep_utf8_to_locale(\"foo\") == %s\n", p);
- free (p);
+ int rc;
+ char *out = NULL;
+
+ rc = idna_to_ascii_8z("search...", &out, 0);
+ if (rc != IDNA_INVALID_LENGTH)
+ fail ("unexpected rc %d\n", rc);
+
+ rc = idna_to_ascii_8z("google.com................point", &out, 0);
+ if (rc != IDNA_INVALID_LENGTH)
+ fail ("unexpected rc %d\n", rc);
+
+ rc = idna_to_ascii_8z("Loading...°°°°°°°°°°°°°°]", &out, 0);
+ if (rc != IDNA_INVALID_LENGTH)
+ fail ("unexpected rc %d\n", rc);
}
hooks/post-receive
--
GNU libidn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU libidn branch, master, updated. libidn-1-21-9-g7649dc2,
Simon Josefsson <=