Tighten the snprintf() test to check behaviour on zero-size buffers.

2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers.  (#106091)
This commit is contained in:
Matthias Clasen 2003-08-07 20:48:10 +00:00 committed by Matthias Clasen
parent d695d28b1b
commit 4d2921959e
7 changed files with 28 additions and 29 deletions

View File

@ -1,5 +1,7 @@
2003-08-07 Matthias Clasen <maclas@gmx.de>
* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers. (#106091)
* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
Replace the NOISY define by a cmdline arg --noisy. (#115757)

View File

@ -1,5 +1,7 @@
2003-08-07 Matthias Clasen <maclas@gmx.de>
* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers. (#106091)
* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
Replace the NOISY define by a cmdline arg --noisy. (#115757)

View File

@ -1,5 +1,7 @@
2003-08-07 Matthias Clasen <maclas@gmx.de>
* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers. (#106091)
* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
Replace the NOISY define by a cmdline arg --noisy. (#115757)

View File

@ -1,5 +1,7 @@
2003-08-07 Matthias Clasen <maclas@gmx.de>
* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers. (#106091)
* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
Replace the NOISY define by a cmdline arg --noisy. (#115757)

View File

@ -1,5 +1,7 @@
2003-08-07 Matthias Clasen <maclas@gmx.de>
* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers. (#106091)
* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
Replace the NOISY define by a cmdline arg --noisy. (#115757)

View File

@ -1,5 +1,7 @@
2003-08-07 Matthias Clasen <maclas@gmx.de>
* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers. (#106091)
* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
Replace the NOISY define by a cmdline arg --noisy. (#115757)

View File

@ -63,6 +63,16 @@ doit()
r = snprintf(buffer, 5, "1234567");
if (r != 7)
exit(1);
r = snprintf(buffer, 0, "1234567");
if (r != 7)
exit(1);
r = snprintf(NULL, 0, "1234567");
if (r != 7)
exit(1);
@ -116,40 +126,17 @@ if test $ac_cv_func_printf_unix98 = yes; then
fi
])# AC_FUNC_PRINTF_UNIX98
# Checks the location of the XML Catalog
# Usage:
# JH_PATH_XML_CATALOG
# Defines XMLCATALOG and XML_CATALOG_FILE substitutions
AC_DEFUN([JH_PATH_XML_CATALOG],
[
# check for the presence of the XML catalog
AC_ARG_WITH([xml-catalog],
AC_HELP_STRING([--with-xml-catalog=CATALOG],
[path to xml catalog to use]),,
[with_xml_catalog=/etc/xml/catalog])
XML_CATALOG_FILE="$with_xml_catalog"
AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)])
if test -f "$XML_CATALOG_FILE"; then
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
AC_MSG_ERROR([XML catalog not found])
fi
AC_SUBST([XML_CATALOG_FILE])
# check for the xmlcatalog program
AC_PATH_PROG(XMLCATALOG, xmlcatalog, no)
if test "x$XMLCATALOG" = xno; then
AC_MSG_ERROR([could not find xmlcatalog program])
fi
])
# Checks if a particular URI appears in the XML catalog
# Usage:
# JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
AC_DEFUN([JH_CHECK_XML_CATALOG],
[
AC_REQUIRE([JH_PATH_XML_CATALOG])dnl
AC_ARG_WITH([xml-catalog],
AC_HELP_STRING([--with-xml-catalog=CATALOG],
[path to xml catalog to use]),,
[with_xml_catalog=/etc/xml/catalog])
XML_CATALOG_FILE="$with_xml_catalog"
AC_PATH_PROG(XMLCATALOG, xmlcatalog, /bin/false)
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
if AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
AC_MSG_RESULT([found])