1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-09-01 02:34:55 +00:00

vasnwprintf-gnu: New module.

* m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_IS_POSIX): New macro.
(gl_FUNC_VASNWPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vasnwprintf-gnu.m4: New file, based on m4/vasnprintf-gnu.m4.
* modules/vasnwprintf-gnu: New file, based on modules/vasnprintf-gnu.
This commit is contained in:
Bruno Haible
2023-03-24 12:15:42 +01:00
parent f63b3b100f
commit e2cb98413b
4 changed files with 82 additions and 14 deletions
+9
View File
@@ -1,3 +1,12 @@
2023-03-24 Bruno Haible <bruno@clisp.org>
vasnwprintf-gnu: New module.
* m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_IS_POSIX): New macro.
(gl_FUNC_VASNWPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vasnwprintf-gnu.m4: New file, based on m4/vasnprintf-gnu.m4.
* modules/vasnwprintf-gnu: New file, based on modules/vasnprintf-gnu.
2023-03-24 Bruno Haible <bruno@clisp.org>
obstack-printf-gnu: Add tests.
+26
View File
@@ -0,0 +1,26 @@
# vasnwprintf-gnu.m4 serial 1
dnl Copyright (C) 2023 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_FUNC_VASNWPRINTF_GNU],
[
AC_REQUIRE([gl_FUNC_VASNWPRINTF_IS_POSIX])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_UPPERCASE_B])
gl_cv_func_vasnwprintf_gnu=no
if test $gl_cv_func_vasnwprintf_posix = yes; then
case "$gl_cv_func_printf_directive_uppercase_b" in
*yes)
# vasnwprintf exists and is already POSIX compliant and GNU compatible.
gl_cv_func_vasnwprintf_gnu=yes
;;
esac
fi
if test $gl_cv_func_vasnwprintf_gnu = no; then
dnl Note: This invokes gl_PREREQ_VASNPRINTF_DIRECTIVE_LC although not needed
dnl here. Doesn't matter.
gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS
gl_FUNC_VASNWPRINTF
fi
])
+15 -14
View File
@@ -1,4 +1,4 @@
# vasnwprintf-posix.m4 serial 2
# vasnwprintf-posix.m4 serial 3
dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,17 +6,18 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_VASNWPRINTF_POSIX],
[
gl_FUNC_VASNWPRINTF
gl_PREREQ_VASNPRINTF_LONG_DOUBLE
gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
gl_PREREQ_VASNPRINTF_DIRECTIVE_A
gl_PREREQ_VASNPRINTF_DIRECTIVE_B
gl_PREREQ_VASNPRINTF_DIRECTIVE_F
gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
gl_PREREQ_VASNPRINTF_FLAG_GROUPING
gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
gl_PREREQ_VASNPRINTF_FLAG_ZERO
gl_PREREQ_VASNPRINTF_PRECISION
gl_PREREQ_VASNPRINTF_ENOMEM
AC_REQUIRE([gl_FUNC_VASNWPRINTF_IS_POSIX])
if test $gl_cv_func_vasnwprintf_posix = no; then
dnl Note: This invokes gl_PREREQ_VASNPRINTF_DIRECTIVE_LC although not needed
dnl here. Doesn't matter.
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
gl_FUNC_VASNWPRINTF
fi
])
dnl Test whether vasnwprintf exists and is POSIX compliant.
dnl Result is gl_cv_func_vasnwprintf_posix.
AC_DEFUN([gl_FUNC_VASNWPRINTF_IS_POSIX],
[
gl_cv_func_vasnwprintf_posix=no
])
+32
View File
@@ -0,0 +1,32 @@
Description:
POSIX and GNU compatible vswprintf with automatic memory allocation and bounded
output size.
Comment:
This module should not be used as a dependency from a test module,
otherwise when this module occurs as a tests-related module, it will
have side effects on the compilation of the 'vasnwprintf' module, if
that module occurs among the main modules in lib/.
Files:
m4/vasnwprintf-gnu.m4
Depends-on:
vasnwprintf-posix
configure.ac:
gl_FUNC_VASNWPRINTF_GNU
Makefile.am:
Include:
"vasnwprintf.h"
Link:
$(MBRTOWC_LIB)
License:
LGPLv2+
Maintainer:
all