* m4/uchar.m4 (gl_UCHAR_H): Set SMALL_WCHAR_T.
* modules/uchar (Files): Add stdint.m4.
(Makefile.am): Substitute SMALL_WCHAR_T.
* lib/uchar.in.h (_GL_LARGE_CHAR32_T): Rely on SMALL_WCHAR_T.
+2020-01-04 Bruno Haible <bruno@clisp.org>
+
+ uchar: Decide about _GL_LARGE_CHAR32_T at configure time.
+ * m4/uchar.m4 (gl_UCHAR_H): Set SMALL_WCHAR_T.
+ * modules/uchar (Files): Add stdint.m4.
+ (Makefile.am): Substitute SMALL_WCHAR_T.
+ * lib/uchar.in.h (_GL_LARGE_CHAR32_T): Rely on SMALL_WCHAR_T.
+
2020-01-04 Bruno Haible <bruno@clisp.org>
Fix AC_CHECK_DECL so that it deactivates clang's built-in declarations.
#endif
/* Define if a 'char32_t' can hold more characters than a 'wchar_t'. */
-#if (defined _AIX && !defined __64BIT__) || defined _WIN32 || defined __CYGWIN__
+#if @SMALL_WCHAR_T@ /* 32-bit AIX, Cygwin, native Windows */
# define _GL_LARGE_CHAR32_T 1
#endif
-# uchar.m4 serial 4
+# uchar.m4 serial 5
dnl Copyright (C) 2019-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
fi
AC_SUBST([HAVE_UCHAR_H])
+ dnl Test whether a 'char32_t' can hold more characters than a 'wchar_t'.
+ gl_STDINT_BITSIZEOF([wchar_t], [gl_STDINT_INCLUDES])
+ if test $BITSIZEOF_WCHAR_T -lt 32; then
+ SMALL_WCHAR_T=1
+ else
+ SMALL_WCHAR_T=0
+ fi
+ dnl SMALL_WCHAR_T is expected to be 1 on 32-bit AIX, Cygwin, native Windows.
+ AC_SUBST([SMALL_WCHAR_T])
+
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use, and which is not
dnl guaranteed by C11.
Files:
lib/uchar.in.h
m4/uchar.m4
+m4/stdint.m4
Depends-on:
include_next
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UCHAR_H''@|$(NEXT_UCHAR_H)|g' \
+ -e 's|@''SMALL_WCHAR_T''@|$(SMALL_WCHAR_T)|g' \
-e 's/@''GNULIB_BTOC32''@/$(GNULIB_BTOC32)/g' \
-e 's/@''GNULIB_C32TOB''@/$(GNULIB_C32TOB)/g' \
-e 's/@''GNULIB_MBRTOC32''@/$(GNULIB_MBRTOC32)/g' \