+2026-05-06 Bruno Haible <bruno@clisp.org>
+
+ stdckdint-h, stdcountof-h, uchar-h: Simplify for when C++ is not used.
+ Reported by Pádraig Brady in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2026-05/msg00032.html>.
+ * m4/stdckdint_h.m4 (gl_STDCKDINT_H): When $CXX is empty, don't run C++
+ specific tests.
+ * m4/stdcountof_h.m4 (gl_STDCOUNTOF_H): Likewise.
+ * m4/uchar_h.m4 (gl_UCHAR_H): Likewise.
+
2026-05-06 Paul Eggert <eggert@cs.ucla.edu>
regex-tests: minor memory cleanup
# stdckdint_h.m4
-# serial 1
+# serial 2
dnl Copyright 2025-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
HAVE_C_STDCKDINT_H=0
HAVE_WORKING_C_STDCKDINT_H=0
fi
- if test "$CXX" != no; then
+ if test -n "$CXX" && test "$CXX" != no; then
AC_CACHE_CHECK([whether stdckdint.h can be included in C++],
[gl_cv_header_cxx_stdckdint_h],
[dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
AC_SUBST([HAVE_CXX_STDCKDINT_H])
AC_SUBST([HAVE_WORKING_CXX_STDCKDINT_H])
- if test "$CXX" != no; then
+ if test -n "$CXX" && test "$CXX" != no; then
dnl We might need the header for C or C++.
if test $HAVE_C_STDCKDINT_H = 1 \
&& test $HAVE_WORKING_C_STDCKDINT_H = 1 \
# stdcountof_h.m4
-# serial 2
+# serial 3
dnl Copyright 2025-2026 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 it uses _Countof, which is not a compiler built-in in C++ mode.
m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
CXX_HAVE_STDCOUNTOF_H=1
- if test "$CXX" != no; then
+ if test -n "$CXX" && test "$CXX" != no; then
AC_CACHE_CHECK([whether the C++ compiler has <stdcountof.h>],
[gl_cv_cxx_have_stdcountof_h],
[dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
# uchar_h.m4
-# serial 32
+# serial 33
dnl Copyright (C) 2019-2026 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 header."
m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
CXX_HAVE_UCHAR_H=0
- if test "$CXX" != no; then
+ if test -n "$CXX" && test "$CXX" != no; then
AC_CACHE_CHECK([whether the C++ compiler has <uchar.h>],
[gl_cv_cxx_have_uchar_h],
[dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
CXX_HAS_UCHAR_TYPES=0
if test $HAVE_UCHAR_H = 0; then
- if test "$CXX" != no; then
+ if test -n "$CXX" && test "$CXX" != no; then
AC_CACHE_CHECK([whether the C++ compiler predefines the <uchar.h> types],
[gl_cv_cxx_has_uchar_types],
[dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
AC_SUBST([CXX_HAS_UCHAR_TYPES])
CXX_HAS_CHAR8_TYPE=0
if test $HAVE_UCHAR_H = 0; then
- if test "$CXX" != no; then
+ if test -n "$CXX" && test "$CXX" != no; then
AC_CACHE_CHECK([whether the C++ compiler predefines the char8_t type],
[gl_cv_cxx_has_char8_type],
[dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to