From: Bruno Haible Date: Fri, 27 Dec 2024 22:43:27 +0000 (+0100) Subject: Rename module wchar to wchar-h. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=fae949888862284b9f0c848b934cdbaff024cfb8;p=gnulib.git Rename module wchar to wchar-h. * modules/wchar-h: Renamed from modules/wchar. * modules/wchar-h-tests: Renamed from modules/wchar-tests. * modules/wchar-h-c++-tests: Renamed from modules/wchar-c++-tests. * tests/test-wchar-h.c: Renamed from tests/test-wchar.c. * tests/test-wchar-h-c++.cc: Renamed from tests/test-wchar-c++.cc. * tests/test-wchar-h-c++2.cc: Renamed from tests/test-wchar-c++2.cc. * tests/test-wchar-h-c++3.cc: Renamed from tests/test-wchar-c++3.cc. * doc/posix-headers/wchar.texi: Update. * modules/* (Depends-on): Update. * modules/wchar: New file. --- diff --git a/ChangeLog b/ChangeLog index e5d5025328..7b3502c6e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2024-12-27 Bruno Haible + + Rename module wchar to wchar-h. + * modules/wchar-h: Renamed from modules/wchar. + * modules/wchar-h-tests: Renamed from modules/wchar-tests. + * modules/wchar-h-c++-tests: Renamed from modules/wchar-c++-tests. + * tests/test-wchar-h.c: Renamed from tests/test-wchar.c. + * tests/test-wchar-h-c++.cc: Renamed from tests/test-wchar-c++.cc. + * tests/test-wchar-h-c++2.cc: Renamed from tests/test-wchar-c++2.cc. + * tests/test-wchar-h-c++3.cc: Renamed from tests/test-wchar-c++3.cc. + * doc/posix-headers/wchar.texi: Update. + * modules/* (Depends-on): Update. + * modules/wchar: New file. + 2024-12-27 Bruno Haible Rename module utmp to utmp-h. diff --git a/doc/posix-headers/wchar.texi b/doc/posix-headers/wchar.texi index c2c2006eb0..ee4a7c45c0 100644 --- a/doc/posix-headers/wchar.texi +++ b/doc/posix-headers/wchar.texi @@ -3,8 +3,8 @@ POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/wchar.h.html} -Gnulib module: wchar -@mindex wchar +Gnulib module: wchar-h +@mindex wchar-h Portability problems fixed by Gnulib: @itemize diff --git a/modules/btowc b/modules/btowc index cbcbddb792..22c8734ca2 100644 --- a/modules/btowc +++ b/modules/btowc @@ -10,7 +10,7 @@ m4/locale-fr.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h mbszero [test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1] mbrtowc [test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1] mbtowc [test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1] diff --git a/modules/c32isalnum b/modules/c32isalnum index f79abc276c..04ed803cb2 100644 --- a/modules/c32isalnum +++ b/modules/c32isalnum @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isalpha b/modules/c32isalpha index 4eab9a07e5..6964786445 100644 --- a/modules/c32isalpha +++ b/modules/c32isalpha @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isblank b/modules/c32isblank index ca7463ca62..dfaf3deb43 100644 --- a/modules/c32isblank +++ b/modules/c32isblank @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h iswblank localcharset [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32iscntrl b/modules/c32iscntrl index 84924150dd..46c9ce692f 100644 --- a/modules/c32iscntrl +++ b/modules/c32iscntrl @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isdigit b/modules/c32isdigit index 4da5e9b11e..29ffcb8905 100644 --- a/modules/c32isdigit +++ b/modules/c32isdigit @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h iswdigit localcharset [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isgraph b/modules/c32isgraph index 6de4e60a7a..d99a6603b5 100644 --- a/modules/c32isgraph +++ b/modules/c32isgraph @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32islower b/modules/c32islower index f78c0a91ec..01c61a8b91 100644 --- a/modules/c32islower +++ b/modules/c32islower @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isprint b/modules/c32isprint index 9fe3c71731..aefc14d67d 100644 --- a/modules/c32isprint +++ b/modules/c32isprint @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32ispunct b/modules/c32ispunct index 46eb66b4bb..08d2fbb4f7 100644 --- a/modules/c32ispunct +++ b/modules/c32ispunct @@ -16,7 +16,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h iswpunct localcharset [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isspace b/modules/c32isspace index d2372d8d12..cdb23a31fe 100644 --- a/modules/c32isspace +++ b/modules/c32isspace @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isupper b/modules/c32isupper index 840c2b58fe..801cd2d6a6 100644 --- a/modules/c32isupper +++ b/modules/c32isupper @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32isxdigit b/modules/c32isxdigit index 1a95a30c46..3591b1c076 100644 --- a/modules/c32isxdigit +++ b/modules/c32isxdigit @@ -16,7 +16,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h iswxdigit localcharset [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32rtomb b/modules/c32rtomb index 1d7170164b..8a4e0a0f94 100644 --- a/modules/c32rtomb +++ b/modules/c32rtomb @@ -13,7 +13,7 @@ m4/codeset.m4 Depends-on: uchar-h attribute [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1] -wchar [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1] +wchar-h [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1] wcrtomb [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1] localcharset [{ test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1; } && test $SMALL_WCHAR_T = 1] streq [{ test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1; } && test $SMALL_WCHAR_T = 1] diff --git a/modules/c32snrtombs b/modules/c32snrtombs index b3d2f698c4..83984548cc 100644 --- a/modules/c32snrtombs +++ b/modules/c32snrtombs @@ -8,7 +8,7 @@ lib/c32srtombs-state.c Depends-on: uchar-h -wchar +wchar-h assert-h c32rtomb wcsnrtombs [test $SMALL_WCHAR_T = 0] diff --git a/modules/c32srtombs b/modules/c32srtombs index b81cc88263..1ce6225448 100644 --- a/modules/c32srtombs +++ b/modules/c32srtombs @@ -8,7 +8,7 @@ lib/c32srtombs-state.c Depends-on: uchar-h -wchar +wchar-h assert-h c32rtomb wcsrtombs [test $SMALL_WCHAR_T = 0] diff --git a/modules/c32stombs b/modules/c32stombs index 1e1b24cb91..267698ab5e 100644 --- a/modules/c32stombs +++ b/modules/c32stombs @@ -6,7 +6,7 @@ lib/c32stombs.c Depends-on: uchar-h -wchar +wchar-h mbszero c32srtombs diff --git a/modules/c32swidth b/modules/c32swidth index 628c2981f4..7c61ef4493 100644 --- a/modules/c32swidth +++ b/modules/c32swidth @@ -11,7 +11,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wcswidth c32width diff --git a/modules/c32tolower b/modules/c32tolower index a6b5fef200..139c7e2eee 100644 --- a/modules/c32tolower +++ b/modules/c32tolower @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32toupper b/modules/c32toupper index 103554d60f..10f023742a 100644 --- a/modules/c32toupper +++ b/modules/c32toupper @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wctype-h localcharset [test $REPLACE_MBSTATE_T = 1] streq [test $REPLACE_MBSTATE_T = 1] diff --git a/modules/c32width b/modules/c32width index b91bb7502f..089f04af3e 100644 --- a/modules/c32width +++ b/modules/c32width @@ -15,7 +15,7 @@ m4/codeset.m4 Depends-on: uchar-h -wchar +wchar-h wcwidth uniwidth/width diff --git a/modules/dfa b/modules/dfa index d966e6b142..d81901153d 100644 --- a/modules/dfa +++ b/modules/dfa @@ -37,7 +37,7 @@ uchar-h # to enable it. #uchar-h-c23 verify -wchar +wchar-h xalloc xalloc-die diff --git a/modules/fnmatch b/modules/fnmatch index 601038e084..eaa8fd4353 100644 --- a/modules/fnmatch +++ b/modules/fnmatch @@ -27,7 +27,7 @@ mbsinit [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1] btowc [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] iswctype [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] mbsrtowcs [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] -wchar [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] +wchar-h [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] wctype-h [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] wctype [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] wmemchr [{ test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; } && test $SMALL_WCHAR_T = 0] diff --git a/modules/free-posix b/modules/free-posix index 11b67ca73b..15d3467572 100644 --- a/modules/free-posix +++ b/modules/free-posix @@ -8,7 +8,7 @@ m4/free.m4 Depends-on: stdlib-h string-h -wchar +wchar-h configure.ac: gl_FUNC_FREE diff --git a/modules/mbfile b/modules/mbfile index 0b62d5439e..2fe3baa597 100644 --- a/modules/mbfile +++ b/modules/mbfile @@ -13,7 +13,7 @@ mbchar mbrtowc mbsinit mbszero -wchar +wchar-h stdbool-h configure.ac: diff --git a/modules/mbmemcasecoll b/modules/mbmemcasecoll index b13c6f5b1a..21842acc70 100644 --- a/modules/mbmemcasecoll +++ b/modules/mbmemcasecoll @@ -8,7 +8,7 @@ lib/mbmemcasecoll.c Depends-on: stdbool-h -wchar +wchar-h uchar-h malloca mbszero diff --git a/modules/mbrlen b/modules/mbrlen index 974de786e8..a23b83ad7b 100644 --- a/modules/mbrlen +++ b/modules/mbrlen @@ -11,7 +11,7 @@ m4/locale-zh.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h extensions mbrtowc [test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1] diff --git a/modules/mbrtowc b/modules/mbrtowc index b982911c44..7a989178f2 100644 --- a/modules/mbrtowc +++ b/modules/mbrtowc @@ -20,7 +20,7 @@ m4/threadlib.m4 m4/visibility.m4 Depends-on: -wchar +wchar-h extensions attribute [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] stdint-h [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] diff --git a/modules/mbsinit b/modules/mbsinit index 650aa174f2..16c6ae0c0d 100644 --- a/modules/mbsinit +++ b/modules/mbsinit @@ -8,7 +8,7 @@ m4/mbstate_t.m4 m4/mbrtowc.m4 Depends-on: -wchar +wchar-h extensions assert-h [test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1] mbrtowc [test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1] diff --git a/modules/mbsnrtoc32s b/modules/mbsnrtoc32s index afd01fa9ca..f6383b96e7 100644 --- a/modules/mbsnrtoc32s +++ b/modules/mbsnrtoc32s @@ -8,7 +8,7 @@ lib/mbsrtoc32s-state.c Depends-on: uchar-h -wchar +wchar-h assert-h mbrtoc32 minmax diff --git a/modules/mbsnrtowcs b/modules/mbsnrtowcs index c7b8532440..33c72e9a54 100644 --- a/modules/mbsnrtowcs +++ b/modules/mbsnrtowcs @@ -13,7 +13,7 @@ m4/locale-fr.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h extensions mbrtowc [test $HAVE_MBSNRTOWCS = 0 || test $REPLACE_MBSNRTOWCS = 1] minmax [test $HAVE_MBSNRTOWCS = 0 || test $REPLACE_MBSNRTOWCS = 1] diff --git a/modules/mbsrtoc32s b/modules/mbsrtoc32s index 39fcd49b5c..dce767cd2e 100644 --- a/modules/mbsrtoc32s +++ b/modules/mbsrtoc32s @@ -8,7 +8,7 @@ lib/mbsrtoc32s-state.c Depends-on: uchar-h -wchar +wchar-h assert-h mbrtoc32 strnlen1 diff --git a/modules/mbsrtowcs b/modules/mbsrtowcs index 9fc971dc19..4ab3641915 100644 --- a/modules/mbsrtowcs +++ b/modules/mbsrtowcs @@ -15,7 +15,7 @@ m4/locale-zh.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h extensions mbrtowc [test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1] strnlen1 [test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1] diff --git a/modules/mbstoc32s b/modules/mbstoc32s index 0c405139f8..80232096b5 100644 --- a/modules/mbstoc32s +++ b/modules/mbstoc32s @@ -6,7 +6,7 @@ lib/mbstoc32s.c Depends-on: uchar-h -wchar +wchar-h mbszero mbsrtoc32s diff --git a/modules/mbswidth b/modules/mbswidth index 58e092d10d..5bfdf9740c 100644 --- a/modules/mbswidth +++ b/modules/mbswidth @@ -9,7 +9,7 @@ m4/mbrtowc.m4 m4/mbswidth.m4 Depends-on: -wchar +wchar-h uchar-h mbrtoc32 mbsinit diff --git a/modules/mbszero b/modules/mbszero index 743e539aab..932a20ceb0 100644 --- a/modules/mbszero +++ b/modules/mbszero @@ -11,7 +11,7 @@ m4/codeset.m4 m4/musl.m4 Depends-on: -wchar +wchar-h configure.ac: AC_REQUIRE([AC_TYPE_MBSTATE_T]) diff --git a/modules/mbtowc b/modules/mbtowc index 8644fc310f..6862b1fc11 100644 --- a/modules/mbtowc +++ b/modules/mbtowc @@ -8,7 +8,7 @@ m4/mbtowc.m4 Depends-on: stdlib-h -wchar [test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1] +wchar-h [test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1] mbszero [test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1] mbrtowc [test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1] diff --git a/modules/posixcheck b/modules/posixcheck index 9c5788738a..1ea334ab8b 100644 --- a/modules/posixcheck +++ b/modules/posixcheck @@ -50,7 +50,7 @@ uchar-h unistd-h utime-h utmp-h -wchar +wchar-h wctype-h configure.ac: diff --git a/modules/regex b/modules/regex index 3b75a9513b..4263a6b0cc 100644 --- a/modules/regex +++ b/modules/regex @@ -40,7 +40,7 @@ stdbool-h [test $ac_use_included_regex = yes] stdckdint-h [test $ac_use_included_regex = yes] stdint-h [test $ac_use_included_regex = yes] verify [test $ac_use_included_regex = yes] -wchar [test $ac_use_included_regex = yes] +wchar-h [test $ac_use_included_regex = yes] wcrtomb [test $ac_use_included_regex = yes] wctype-h [test $ac_use_included_regex = yes] wctype [test $ac_use_included_regex = yes] diff --git a/modules/stdint-h-tests b/modules/stdint-h-tests index 81a035a48f..2546c158e2 100644 --- a/modules/stdint-h-tests +++ b/modules/stdint-h-tests @@ -6,7 +6,7 @@ Depends-on: extensions verify intprops -wchar +wchar-h stdint-h-c++-tests configure.ac: diff --git a/modules/uchar-h b/modules/uchar-h index cd31ab993d..70998d5d75 100644 --- a/modules/uchar-h +++ b/modules/uchar-h @@ -15,7 +15,7 @@ snippet/warn-on-use extern-inline assert-h stdint-h -wchar +wchar-h wctype-h configure.ac: diff --git a/modules/uchar-h-c23 b/modules/uchar-h-c23 index 3a12219922..dec9eaec03 100644 --- a/modules/uchar-h-c23 +++ b/modules/uchar-h-c23 @@ -7,7 +7,7 @@ lib/lc-charset-unicode.c Depends-on: uchar-h -wchar +wchar-h iconv localcharset streq diff --git a/modules/unistdio/u-printf-args b/modules/unistdio/u-printf-args index efed3d7a2f..188c6fd963 100644 --- a/modules/unistdio/u-printf-args +++ b/modules/unistdio/u-printf-args @@ -15,7 +15,7 @@ Depends-on: stdint-h limits-h unitypes-h -wchar +wchar-h configure.ac: gl_PREREQ_PRINTF_ARGS diff --git a/modules/vasnprintf b/modules/vasnprintf index 98ac72ada0..96fb208891 100644 --- a/modules/vasnprintf +++ b/modules/vasnprintf @@ -31,7 +31,7 @@ xsize errno-h memchr assert-h -wchar +wchar-h mbszero configure.ac: diff --git a/modules/vasnwprintf b/modules/vasnwprintf index 0bf89666c2..3d8015f378 100644 --- a/modules/vasnwprintf +++ b/modules/vasnwprintf @@ -35,7 +35,7 @@ xsize errno-h memchr assert-h -wchar +wchar-h mbszero mbrtowc wmemcpy diff --git a/modules/wchar b/modules/wchar index 8b733238f1..b653bc719e 100644 --- a/modules/wchar +++ b/modules/wchar @@ -2,165 +2,20 @@ Description: A that works around platform issues. Note also the wchar-single module. +Status: +deprecated + +Notice: +This module is deprecated. Use the module 'wchar-h' instead. + Files: -lib/wchar.in.h -m4/wchar_h.m4 -m4/wint_t.m4 Depends-on: -gen-header -include_next -snippet/arg-nonnull -snippet/c++defs -snippet/warn-on-use -extern-inline -inttypes-h-incomplete -stddef-h -stdlib-h +wchar-h configure.ac: -gl_WCHAR_H -gl_WCHAR_H_REQUIRE_DEFAULTS -AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += wchar.h - -# We need the following in order to create when the system -# version does not work standalone. -wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%' - $(gl_V_at)$(SED_HEADER_STDOUT) \ - -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ - -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ - -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ - -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ - -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ - -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ - -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ - -e 's/@''GNULIB_MBSZERO''@/$(GNULIB_MBSZERO)/g' \ - -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ - -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ - -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ - -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ - -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ - -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ - -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ - -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ - -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ - -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ - -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ - -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ - -e 's/@''GNULIB_WMEMPCPY''@/$(GNULIB_WMEMPCPY)/g' \ - -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ - -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ - -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ - -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ - -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ - -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ - -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ - -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ - -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ - -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ - -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ - -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ - -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ - -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ - -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ - -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ - -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ - -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ - -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ - -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ - -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ - -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ - -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ - -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ - -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ - -e 's/@''GNULIB_WGETCWD''@/$(GNULIB_WGETCWD)/g' \ - -e 's/@''GNULIB_MDA_WCSDUP''@/$(GNULIB_MDA_WCSDUP)/g' \ - -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \ - < $(srcdir)/wchar.in.h > $@-t1 - $(AM_V_at)sed \ - -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ - -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ - -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ - -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ - -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ - -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ - -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ - -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ - -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ - -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ - -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ - -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ - -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ - -e 's|@''HAVE_WMEMPCPY''@|$(HAVE_WMEMPCPY)|g' \ - -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ - -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ - -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ - -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ - -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ - -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ - -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ - -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ - -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ - -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ - -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ - -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ - -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ - -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ - -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ - -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ - -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ - -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ - -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ - -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ - -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ - -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ - -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ - -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ - -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - < $@-t1 > $@-t2 - $(AM_V_at)sed \ - -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ - -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ - -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ - -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \ - -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ - -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ - -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ - -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ - -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ - -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ - -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ - -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ - -e 's|@''REPLACE_WCSCMP''@|$(REPLACE_WCSCMP)|g' \ - -e 's|@''REPLACE_WCSNCAT''@|$(REPLACE_WCSNCAT)|g' \ - -e 's|@''REPLACE_WCSNCMP''@|$(REPLACE_WCSNCMP)|g' \ - -e 's|@''REPLACE_WCSSTR''@|$(REPLACE_WCSSTR)|g' \ - -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \ - -e 's|@''REPLACE_WMEMCMP''@|$(REPLACE_WMEMCMP)|g' \ - -e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $@-t2 > $@-t3 - $(AM_V_at)rm -f $@-t1 $@-t2 - $(AM_V_at)mv $@-t3 $@ -MOSTLYCLEANFILES += wchar.h wchar.h-t1 wchar.h-t2 wchar.h-t3 Include: @@ -169,4 +24,3 @@ License: LGPLv2+ Maintainer: -all diff --git a/modules/wchar-c++-tests b/modules/wchar-c++-tests deleted file mode 100644 index f355de00be..0000000000 --- a/modules/wchar-c++-tests +++ /dev/null @@ -1,21 +0,0 @@ -Files: -tests/test-wchar-c++.cc -tests/test-wchar-c++2.cc -tests/test-wchar-c++3.cc -tests/signature.h - -Status: -c++-test - -Depends-on: -ansi-c++-opt - -configure.ac: - -Makefile.am: -if ANSICXX -TESTS += test-wchar-c++ -check_PROGRAMS += test-wchar-c++ -test_wchar_c___SOURCES = test-wchar-c++.cc test-wchar-c++2.cc test-wchar-c++3.cc -test_wchar_c___LDADD = $(LDADD) $(LIBUNISTRING) $(LIBINTL) $(NANOSLEEP_LIB) $(EUIDACCESS_LIBGEN) $(LIBTHREAD) -endif diff --git a/modules/wchar-h b/modules/wchar-h new file mode 100644 index 0000000000..8b733238f1 --- /dev/null +++ b/modules/wchar-h @@ -0,0 +1,172 @@ +Description: +A that works around platform issues. +Note also the wchar-single module. + +Files: +lib/wchar.in.h +m4/wchar_h.m4 +m4/wint_t.m4 + +Depends-on: +gen-header +include_next +snippet/arg-nonnull +snippet/c++defs +snippet/warn-on-use +extern-inline +inttypes-h-incomplete +stddef-h +stdlib-h + +configure.ac: +gl_WCHAR_H +gl_WCHAR_H_REQUIRE_DEFAULTS +AC_PROG_MKDIR_P + +Makefile.am: +BUILT_SOURCES += wchar.h + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) +@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%' + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ + -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ + -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ + -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ + -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ + -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ + -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ + -e 's/@''GNULIB_MBSZERO''@/$(GNULIB_MBSZERO)/g' \ + -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ + -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ + -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ + -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ + -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ + -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ + -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ + -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ + -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ + -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ + -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ + -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ + -e 's/@''GNULIB_WMEMPCPY''@/$(GNULIB_WMEMPCPY)/g' \ + -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ + -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ + -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ + -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ + -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ + -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ + -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ + -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ + -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ + -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ + -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ + -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ + -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ + -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ + -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ + -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ + -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ + -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ + -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ + -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ + -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ + -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ + -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ + -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ + -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ + -e 's/@''GNULIB_WGETCWD''@/$(GNULIB_WGETCWD)/g' \ + -e 's/@''GNULIB_MDA_WCSDUP''@/$(GNULIB_MDA_WCSDUP)/g' \ + -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \ + < $(srcdir)/wchar.in.h > $@-t1 + $(AM_V_at)sed \ + -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ + -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ + -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ + -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ + -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ + -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ + -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ + -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ + -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ + -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ + -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ + -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ + -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ + -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ + -e 's|@''HAVE_WMEMPCPY''@|$(HAVE_WMEMPCPY)|g' \ + -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ + -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ + -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ + -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ + -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ + -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ + -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ + -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ + -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ + -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ + -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ + -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ + -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ + -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ + -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ + -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ + -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ + -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ + -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ + -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ + -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ + -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ + -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ + -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ + -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ + -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ + -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \ + -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ + < $@-t1 > $@-t2 + $(AM_V_at)sed \ + -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ + -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ + -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ + -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \ + -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ + -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ + -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ + -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ + -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ + -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ + -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ + -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ + -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ + -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ + -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ + -e 's|@''REPLACE_WCSCMP''@|$(REPLACE_WCSCMP)|g' \ + -e 's|@''REPLACE_WCSNCAT''@|$(REPLACE_WCSNCAT)|g' \ + -e 's|@''REPLACE_WCSNCMP''@|$(REPLACE_WCSNCMP)|g' \ + -e 's|@''REPLACE_WCSSTR''@|$(REPLACE_WCSSTR)|g' \ + -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \ + -e 's|@''REPLACE_WMEMCMP''@|$(REPLACE_WMEMCMP)|g' \ + -e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $@-t2 > $@-t3 + $(AM_V_at)rm -f $@-t1 $@-t2 + $(AM_V_at)mv $@-t3 $@ +MOSTLYCLEANFILES += wchar.h wchar.h-t1 wchar.h-t2 wchar.h-t3 + +Include: + + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/wchar-h-c++-tests b/modules/wchar-h-c++-tests new file mode 100644 index 0000000000..1509b02110 --- /dev/null +++ b/modules/wchar-h-c++-tests @@ -0,0 +1,21 @@ +Files: +tests/test-wchar-h-c++.cc +tests/test-wchar-h-c++2.cc +tests/test-wchar-h-c++3.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-wchar-h-c++ +check_PROGRAMS += test-wchar-h-c++ +test_wchar_h_c___SOURCES = test-wchar-h-c++.cc test-wchar-h-c++2.cc test-wchar-h-c++3.cc +test_wchar_h_c___LDADD = $(LDADD) $(LIBUNISTRING) $(LIBINTL) $(NANOSLEEP_LIB) $(EUIDACCESS_LIBGEN) $(LIBTHREAD) +endif diff --git a/modules/wchar-h-tests b/modules/wchar-h-tests new file mode 100644 index 0000000000..370f57493a --- /dev/null +++ b/modules/wchar-h-tests @@ -0,0 +1,12 @@ +Files: +tests/test-wchar-h.c + +Depends-on: +assert-h +wchar-h-c++-tests + +configure.ac: + +Makefile.am: +TESTS += test-wchar-h +check_PROGRAMS += test-wchar-h diff --git a/modules/wchar-single b/modules/wchar-single index 08f6a85021..6545c83bde 100644 --- a/modules/wchar-single +++ b/modules/wchar-single @@ -5,7 +5,7 @@ the locale charset will not change between calls. Files: Depends-on: -wchar +wchar-h configure.ac: AC_DEFINE([GNULIB_WCHAR_SINGLE_LOCALE], [1], diff --git a/modules/wchar-tests b/modules/wchar-tests deleted file mode 100644 index 3e6b6cf3f7..0000000000 --- a/modules/wchar-tests +++ /dev/null @@ -1,12 +0,0 @@ -Files: -tests/test-wchar.c - -Depends-on: -assert-h -wchar-c++-tests - -configure.ac: - -Makefile.am: -TESTS += test-wchar -check_PROGRAMS += test-wchar diff --git a/modules/wcpcpy b/modules/wcpcpy index 65bd6e94c2..790f73bd10 100644 --- a/modules/wcpcpy +++ b/modules/wcpcpy @@ -14,7 +14,7 @@ m4/wcpcpy.m4 Depends-on: extensions -wchar +wchar-h configure.ac: gl_FUNC_WCPCPY diff --git a/modules/wcpncpy b/modules/wcpncpy index 04e90071ea..be4d7d38f8 100644 --- a/modules/wcpncpy +++ b/modules/wcpncpy @@ -8,7 +8,7 @@ m4/wcpncpy.m4 Depends-on: extensions -wchar +wchar-h configure.ac: gl_FUNC_WCPNCPY diff --git a/modules/wcrtomb b/modules/wcrtomb index de87c7ec92..dc0a61adb6 100644 --- a/modules/wcrtomb +++ b/modules/wcrtomb @@ -13,7 +13,7 @@ m4/locale-zh.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h extensions mbsinit [test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1] diff --git a/modules/wcscasecmp b/modules/wcscasecmp index 2799816ad0..2bd52e88a9 100644 --- a/modules/wcscasecmp +++ b/modules/wcscasecmp @@ -7,7 +7,7 @@ lib/wcscasecmp-impl.h m4/wcscasecmp.m4 Depends-on: -wchar +wchar-h wctype-h [test $HAVE_WCSCASECMP = 0] configure.ac: diff --git a/modules/wcscat b/modules/wcscat index 80c74e2273..3b6ea42799 100644 --- a/modules/wcscat +++ b/modules/wcscat @@ -13,7 +13,7 @@ lib/wcscat-impl.h m4/wcscat.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSCAT diff --git a/modules/wcschr b/modules/wcschr index 9595b16fec..7acac7e0de 100644 --- a/modules/wcschr +++ b/modules/wcschr @@ -13,7 +13,7 @@ lib/wcschr-impl.h m4/wcschr.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSCHR diff --git a/modules/wcscmp b/modules/wcscmp index 6df70f0543..5f1b07da7f 100644 --- a/modules/wcscmp +++ b/modules/wcscmp @@ -7,7 +7,7 @@ lib/wcscmp-impl.h m4/wcscmp.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSCMP diff --git a/modules/wcscoll b/modules/wcscoll index 5a6ffa3267..4c5186fe8e 100644 --- a/modules/wcscoll +++ b/modules/wcscoll @@ -14,7 +14,7 @@ m4/wcscoll.m4 Depends-on: free-posix -wchar +wchar-h configure.ac: gl_FUNC_WCSCOLL diff --git a/modules/wcscpy b/modules/wcscpy index e37462fcd7..f5c2959940 100644 --- a/modules/wcscpy +++ b/modules/wcscpy @@ -13,7 +13,7 @@ lib/wcscpy-impl.h m4/wcscpy.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSCPY diff --git a/modules/wcscspn b/modules/wcscspn index 844b5f9cf3..04bf12455e 100644 --- a/modules/wcscspn +++ b/modules/wcscspn @@ -13,7 +13,7 @@ lib/wcscspn-impl.h m4/wcscspn.m4 Depends-on: -wchar +wchar-h wcslen [test $HAVE_WCSCSPN = 0] wcschr [test $HAVE_WCSCSPN = 0] diff --git a/modules/wcsdup b/modules/wcsdup index 59a53c370c..54226ec235 100644 --- a/modules/wcsdup +++ b/modules/wcsdup @@ -7,7 +7,7 @@ lib/wcsdup-impl.h m4/wcsdup.m4 Depends-on: -wchar +wchar-h wcslen [test $HAVE_WCSDUP = 0] wmemcpy [test $HAVE_WCSDUP = 0] diff --git a/modules/wcsftime b/modules/wcsftime index 5da3efb03e..8dcc068fb3 100644 --- a/modules/wcsftime +++ b/modules/wcsftime @@ -6,7 +6,7 @@ lib/wcsftime.c m4/wcsftime.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSFTIME diff --git a/modules/wcslen b/modules/wcslen index fea4ba4ed7..7f5d131536 100644 --- a/modules/wcslen +++ b/modules/wcslen @@ -13,7 +13,7 @@ lib/wcslen-impl.h m4/wcslen.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSLEN diff --git a/modules/wcsncasecmp b/modules/wcsncasecmp index a3453b654e..dc1341d962 100644 --- a/modules/wcsncasecmp +++ b/modules/wcsncasecmp @@ -7,7 +7,7 @@ lib/wcsncasecmp-impl.h m4/wcsncasecmp.m4 Depends-on: -wchar +wchar-h wctype-h [test $HAVE_WCSNCASECMP = 0] configure.ac: diff --git a/modules/wcsncat b/modules/wcsncat index 86708e543e..5f42aa572f 100644 --- a/modules/wcsncat +++ b/modules/wcsncat @@ -7,7 +7,7 @@ lib/wcsncat-impl.h m4/wcsncat.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSNCAT diff --git a/modules/wcsncmp b/modules/wcsncmp index e67861d359..400c9d62cc 100644 --- a/modules/wcsncmp +++ b/modules/wcsncmp @@ -7,7 +7,7 @@ lib/wcsncmp-impl.h m4/wcsncmp.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSNCMP diff --git a/modules/wcsncpy b/modules/wcsncpy index e8a165e6df..491f1ce246 100644 --- a/modules/wcsncpy +++ b/modules/wcsncpy @@ -13,7 +13,7 @@ lib/wcsncpy-impl.h m4/wcsncpy.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSNCPY diff --git a/modules/wcsnlen b/modules/wcsnlen index dba67d644d..bc3fe3be37 100644 --- a/modules/wcsnlen +++ b/modules/wcsnlen @@ -7,7 +7,7 @@ lib/wcsnlen-impl.h m4/wcsnlen.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSNLEN diff --git a/modules/wcsnrtombs b/modules/wcsnrtombs index f29aa37c0e..a47f256912 100644 --- a/modules/wcsnrtombs +++ b/modules/wcsnrtombs @@ -15,7 +15,7 @@ m4/locale-zh.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h extensions wcrtomb [test $HAVE_WCSNRTOMBS = 0 || test $REPLACE_WCSNRTOMBS = 1] diff --git a/modules/wcspbrk b/modules/wcspbrk index e42958803e..91ca015b03 100644 --- a/modules/wcspbrk +++ b/modules/wcspbrk @@ -13,7 +13,7 @@ lib/wcspbrk-impl.h m4/wcspbrk.m4 Depends-on: -wchar +wchar-h wcschr [test $HAVE_WCSPBRK = 0] configure.ac: diff --git a/modules/wcsrchr b/modules/wcsrchr index 681af3f1a5..c95ff24fce 100644 --- a/modules/wcsrchr +++ b/modules/wcsrchr @@ -13,7 +13,7 @@ lib/wcsrchr-impl.h m4/wcsrchr.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WCSRCHR diff --git a/modules/wcsrtombs b/modules/wcsrtombs index b478f86b6a..c16dea9eb0 100644 --- a/modules/wcsrtombs +++ b/modules/wcsrtombs @@ -15,7 +15,7 @@ m4/locale-zh.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h extensions wcrtomb [test $HAVE_WCSRTOMBS = 0 || test $REPLACE_WCSRTOMBS = 1] diff --git a/modules/wcsspn b/modules/wcsspn index 684c2676c3..75f0bcd767 100644 --- a/modules/wcsspn +++ b/modules/wcsspn @@ -13,7 +13,7 @@ lib/wcsspn-impl.h m4/wcsspn.m4 Depends-on: -wchar +wchar-h wcschr [test $HAVE_WCSSPN = 0] configure.ac: diff --git a/modules/wcsstr-simple b/modules/wcsstr-simple index c33e1e42d1..3c1dc2a36d 100644 --- a/modules/wcsstr-simple +++ b/modules/wcsstr-simple @@ -7,7 +7,7 @@ lib/wcsstr-impl.h m4/wcsstr.m4 Depends-on: -wchar +wchar-h wcschr [test $HAVE_WCSSTR = 0] configure.ac: diff --git a/modules/wcstok b/modules/wcstok index 19593faccb..b59e55ad37 100644 --- a/modules/wcstok +++ b/modules/wcstok @@ -7,7 +7,7 @@ lib/wcstok-impl.h m4/wcstok.m4 Depends-on: -wchar +wchar-h wcsspn [test $HAVE_WCSTOK = 0 || test $REPLACE_WCSTOK = 1] wcspbrk [test $HAVE_WCSTOK = 0 || test $REPLACE_WCSTOK = 1] diff --git a/modules/wcswidth b/modules/wcswidth index e4773f83c5..13891eb608 100644 --- a/modules/wcswidth +++ b/modules/wcswidth @@ -8,7 +8,7 @@ lib/wcswidth-impl.h m4/wcswidth.m4 Depends-on: -wchar +wchar-h wcwidth [test $HAVE_WCSWIDTH = 0 || test $REPLACE_WCSWIDTH = 1] configure.ac: diff --git a/modules/wcsxfrm b/modules/wcsxfrm index ff8c8f04ca..e4081aea2d 100644 --- a/modules/wcsxfrm +++ b/modules/wcsxfrm @@ -9,7 +9,7 @@ m4/wcsxfrm.m4 Depends-on: free-posix -wchar +wchar-h configure.ac: gl_FUNC_WCSXFRM diff --git a/modules/wctob b/modules/wctob index 20abcb5c4b..ef50bf5b5c 100644 --- a/modules/wctob +++ b/modules/wctob @@ -9,7 +9,7 @@ m4/locale-fr.m4 m4/codeset.m4 Depends-on: -wchar +wchar-h wctomb [test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1] configure.ac: diff --git a/modules/wctomb b/modules/wctomb index c21de3bcc4..60b4866952 100644 --- a/modules/wctomb +++ b/modules/wctomb @@ -8,7 +8,7 @@ m4/wctomb.m4 Depends-on: stdlib-h -wchar [test $REPLACE_WCTOMB = 1] +wchar-h [test $REPLACE_WCTOMB = 1] mbszero [test $REPLACE_WCTOMB = 1] wcrtomb [test $REPLACE_WCTOMB = 1] diff --git a/modules/wcwidth b/modules/wcwidth index 8131765e92..d1cae49918 100644 --- a/modules/wcwidth +++ b/modules/wcwidth @@ -7,7 +7,7 @@ m4/wcwidth.m4 m4/wint_t.m4 Depends-on: -wchar +wchar-h extensions wctype-h [test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1] localcharset [test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1] diff --git a/modules/wgetcwd-lgpl b/modules/wgetcwd-lgpl index ed33406737..4bcf00ffcd 100644 --- a/modules/wgetcwd-lgpl +++ b/modules/wgetcwd-lgpl @@ -6,7 +6,7 @@ Files: lib/wgetcwd-lgpl.c Depends-on: -wchar +wchar-h free-posix configure.ac: diff --git a/modules/wmemchr b/modules/wmemchr index 2e1e1337db..7ddc48bdb3 100644 --- a/modules/wmemchr +++ b/modules/wmemchr @@ -7,7 +7,7 @@ lib/wmemchr-impl.h m4/wmemchr.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WMEMCHR diff --git a/modules/wmemcmp b/modules/wmemcmp index e2b99035ee..02a9f8a3f6 100644 --- a/modules/wmemcmp +++ b/modules/wmemcmp @@ -7,7 +7,7 @@ lib/wmemcmp-impl.h m4/wmemcmp.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WMEMCMP diff --git a/modules/wmemcpy b/modules/wmemcpy index 161762304e..2e775d482b 100644 --- a/modules/wmemcpy +++ b/modules/wmemcpy @@ -7,7 +7,7 @@ lib/wmemcpy-impl.h m4/wmemcpy.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WMEMCPY diff --git a/modules/wmemmove b/modules/wmemmove index 3520526774..d63ed07d76 100644 --- a/modules/wmemmove +++ b/modules/wmemmove @@ -7,7 +7,7 @@ lib/wmemmove-impl.h m4/wmemmove.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WMEMMOVE diff --git a/modules/wmempcpy b/modules/wmempcpy index 3f8e2c5112..4d6d55acad 100644 --- a/modules/wmempcpy +++ b/modules/wmempcpy @@ -6,7 +6,7 @@ lib/wmempcpy.c m4/wmempcpy.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WMEMPCPY diff --git a/modules/wmemset b/modules/wmemset index 602352b870..a1a241adb7 100644 --- a/modules/wmemset +++ b/modules/wmemset @@ -7,7 +7,7 @@ lib/wmemset-impl.h m4/wmemset.m4 Depends-on: -wchar +wchar-h configure.ac: gl_FUNC_WMEMSET diff --git a/tests/test-wchar-c++.cc b/tests/test-wchar-c++.cc deleted file mode 100644 index 89d4751fe8..0000000000 --- a/tests/test-wchar-c++.cc +++ /dev/null @@ -1,228 +0,0 @@ -/* Test of substitute in C++ mode. - Copyright (C) 2010-2024 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2010. */ - -#define GNULIB_NAMESPACE gnulib -#include - -#include - -#include "signature.h" - - -#if GNULIB_TEST_BTOWC -SIGNATURE_CHECK (GNULIB_NAMESPACE::btowc, wint_t, (int)); -#endif - -#if GNULIB_TEST_WCTOB -SIGNATURE_CHECK (GNULIB_NAMESPACE::wctob, int, (wint_t)); -#endif - -#if GNULIB_TEST_MBSINIT -SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsinit, int, (const mbstate_t *)); -#endif - -#if GNULIB_TEST_MBRTOWC -SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrtowc, size_t, - (wchar_t *, const char *, size_t, mbstate_t *)); -#endif - -#if GNULIB_TEST_MBRLEN -SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrlen, size_t, - (const char *, size_t, mbstate_t *)); -#endif - -#if GNULIB_TEST_MBSRTOWCS -SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsrtowcs, size_t, - (wchar_t *, const char **, size_t, mbstate_t *)); -#endif - -#if GNULIB_TEST_MBSNRTOWCS -SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsnrtowcs, size_t, - (wchar_t *, const char **, size_t, size_t, mbstate_t *)); -#endif - -#if GNULIB_TEST_WCRTOMB -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcrtomb, size_t, - (char *, wchar_t, mbstate_t *)); -#endif - -#if GNULIB_TEST_WCSRTOMBS -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsrtombs, size_t, - (char *, const wchar_t **, size_t, mbstate_t *)); -#endif - -#if GNULIB_TEST_WCSNRTOMBS -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsnrtombs, size_t, - (char *, const wchar_t **, size_t, size_t, mbstate_t *)); -#endif - -#if GNULIB_TEST_WCWIDTH -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcwidth, int, (wchar_t)); -#endif - -#if GNULIB_TEST_WMEMCHR -SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemchr, wchar_t *, - (const wchar_t *, wchar_t, size_t)); -#endif - -#if GNULIB_TEST_WMEMCMP -SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcmp, int, - (const wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WMEMCPY -SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcpy, wchar_t *, - (wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WMEMMOVE -SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemmove, wchar_t *, - (wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WMEMPCPY -SIGNATURE_CHECK (GNULIB_NAMESPACE::wmempcpy, wchar_t *, - (wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WMEMSET -SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemset, wchar_t *, - (wchar_t *, wchar_t, size_t)); -#endif - -#if GNULIB_TEST_WCSLEN -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcslen, size_t, (const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSNLEN -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsnlen, size_t, (const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCSCPY -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscpy, wchar_t *, - (wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCPCPY -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcpcpy, wchar_t *, - (wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSNCPY -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncpy, wchar_t *, - (wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCPNCPY -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcpncpy, wchar_t *, - (wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCSCAT -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscat, wchar_t *, - (wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSNCAT -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncat, wchar_t *, - (wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCSCMP -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscmp, int, - (const wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSNCMP -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncmp, int, - (const wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCSCASECMP -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscasecmp, int, - (const wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSNCASECMP -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncasecmp, int, - (const wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCSCOLL -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscoll, int, - (const wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSXFRM -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsxfrm, size_t, - (wchar_t *, const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCSDUP -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsdup, wchar_t *, (const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSCHR -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcschr, wchar_t *, - (const wchar_t *, wchar_t)); -#endif - -#if GNULIB_TEST_WCSRCHR -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsrchr, wchar_t *, - (const wchar_t *, wchar_t)); -#endif - -#if GNULIB_TEST_WCSCSPN -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscspn, size_t, - (const wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSSPN -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsspn, size_t, - (const wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSPBRK -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcspbrk, wchar_t *, - (const wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSSTR -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsstr, wchar_t *, - (const wchar_t *, const wchar_t *)); -#endif - -#if GNULIB_TEST_WCSTOK -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcstok, wchar_t *, - (wchar_t *, const wchar_t *, wchar_t **)); -#endif - -#if GNULIB_TEST_WCSWIDTH -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcswidth, int, (const wchar_t *, size_t)); -#endif - -#if GNULIB_TEST_WCSFTIME -SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsftime, size_t, - (wchar_t *, size_t, const wchar_t *, const struct tm *)); -#endif - - -int -main () -{ -} diff --git a/tests/test-wchar-c++2.cc b/tests/test-wchar-c++2.cc deleted file mode 100644 index 3050602eaa..0000000000 --- a/tests/test-wchar-c++2.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* Test of substitute in C++ mode. - Copyright (C) 2019-2024 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#define GNULIB_NAMESPACE gnulib -#include - -#include diff --git a/tests/test-wchar-c++3.cc b/tests/test-wchar-c++3.cc deleted file mode 100644 index 16f5d0e84f..0000000000 --- a/tests/test-wchar-c++3.cc +++ /dev/null @@ -1,22 +0,0 @@ -/* Test of substitute in C++ mode. - Copyright (C) 2019-2024 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#define GNULIB_NAMESPACE gnulib -#include - -#include -#include -#include diff --git a/tests/test-wchar-h-c++.cc b/tests/test-wchar-h-c++.cc new file mode 100644 index 0000000000..89d4751fe8 --- /dev/null +++ b/tests/test-wchar-h-c++.cc @@ -0,0 +1,228 @@ +/* Test of substitute in C++ mode. + Copyright (C) 2010-2024 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2010. */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include + +#include "signature.h" + + +#if GNULIB_TEST_BTOWC +SIGNATURE_CHECK (GNULIB_NAMESPACE::btowc, wint_t, (int)); +#endif + +#if GNULIB_TEST_WCTOB +SIGNATURE_CHECK (GNULIB_NAMESPACE::wctob, int, (wint_t)); +#endif + +#if GNULIB_TEST_MBSINIT +SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsinit, int, (const mbstate_t *)); +#endif + +#if GNULIB_TEST_MBRTOWC +SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrtowc, size_t, + (wchar_t *, const char *, size_t, mbstate_t *)); +#endif + +#if GNULIB_TEST_MBRLEN +SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrlen, size_t, + (const char *, size_t, mbstate_t *)); +#endif + +#if GNULIB_TEST_MBSRTOWCS +SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsrtowcs, size_t, + (wchar_t *, const char **, size_t, mbstate_t *)); +#endif + +#if GNULIB_TEST_MBSNRTOWCS +SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsnrtowcs, size_t, + (wchar_t *, const char **, size_t, size_t, mbstate_t *)); +#endif + +#if GNULIB_TEST_WCRTOMB +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcrtomb, size_t, + (char *, wchar_t, mbstate_t *)); +#endif + +#if GNULIB_TEST_WCSRTOMBS +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsrtombs, size_t, + (char *, const wchar_t **, size_t, mbstate_t *)); +#endif + +#if GNULIB_TEST_WCSNRTOMBS +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsnrtombs, size_t, + (char *, const wchar_t **, size_t, size_t, mbstate_t *)); +#endif + +#if GNULIB_TEST_WCWIDTH +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcwidth, int, (wchar_t)); +#endif + +#if GNULIB_TEST_WMEMCHR +SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemchr, wchar_t *, + (const wchar_t *, wchar_t, size_t)); +#endif + +#if GNULIB_TEST_WMEMCMP +SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcmp, int, + (const wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WMEMCPY +SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcpy, wchar_t *, + (wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WMEMMOVE +SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemmove, wchar_t *, + (wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WMEMPCPY +SIGNATURE_CHECK (GNULIB_NAMESPACE::wmempcpy, wchar_t *, + (wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WMEMSET +SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemset, wchar_t *, + (wchar_t *, wchar_t, size_t)); +#endif + +#if GNULIB_TEST_WCSLEN +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcslen, size_t, (const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSNLEN +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsnlen, size_t, (const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCSCPY +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscpy, wchar_t *, + (wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCPCPY +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcpcpy, wchar_t *, + (wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSNCPY +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncpy, wchar_t *, + (wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCPNCPY +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcpncpy, wchar_t *, + (wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCSCAT +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscat, wchar_t *, + (wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSNCAT +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncat, wchar_t *, + (wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCSCMP +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscmp, int, + (const wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSNCMP +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncmp, int, + (const wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCSCASECMP +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscasecmp, int, + (const wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSNCASECMP +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncasecmp, int, + (const wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCSCOLL +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscoll, int, + (const wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSXFRM +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsxfrm, size_t, + (wchar_t *, const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCSDUP +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsdup, wchar_t *, (const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSCHR +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcschr, wchar_t *, + (const wchar_t *, wchar_t)); +#endif + +#if GNULIB_TEST_WCSRCHR +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsrchr, wchar_t *, + (const wchar_t *, wchar_t)); +#endif + +#if GNULIB_TEST_WCSCSPN +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscspn, size_t, + (const wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSSPN +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsspn, size_t, + (const wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSPBRK +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcspbrk, wchar_t *, + (const wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSSTR +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsstr, wchar_t *, + (const wchar_t *, const wchar_t *)); +#endif + +#if GNULIB_TEST_WCSTOK +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcstok, wchar_t *, + (wchar_t *, const wchar_t *, wchar_t **)); +#endif + +#if GNULIB_TEST_WCSWIDTH +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcswidth, int, (const wchar_t *, size_t)); +#endif + +#if GNULIB_TEST_WCSFTIME +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsftime, size_t, + (wchar_t *, size_t, const wchar_t *, const struct tm *)); +#endif + + +int +main () +{ +} diff --git a/tests/test-wchar-h-c++2.cc b/tests/test-wchar-h-c++2.cc new file mode 100644 index 0000000000..3050602eaa --- /dev/null +++ b/tests/test-wchar-h-c++2.cc @@ -0,0 +1,20 @@ +/* Test of substitute in C++ mode. + Copyright (C) 2019-2024 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include diff --git a/tests/test-wchar-h-c++3.cc b/tests/test-wchar-h-c++3.cc new file mode 100644 index 0000000000..16f5d0e84f --- /dev/null +++ b/tests/test-wchar-h-c++3.cc @@ -0,0 +1,22 @@ +/* Test of substitute in C++ mode. + Copyright (C) 2019-2024 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include +#include +#include diff --git a/tests/test-wchar-h.c b/tests/test-wchar-h.c new file mode 100644 index 0000000000..663a5a4ea6 --- /dev/null +++ b/tests/test-wchar-h.c @@ -0,0 +1,35 @@ +/* Test of substitute. + Copyright (C) 2007-2024 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +/* Check that the types wchar_t and wint_t are defined. */ +wchar_t a = 'c'; +wint_t b = 'x'; + +/* Check that NULL can be passed through varargs as a pointer type, + per POSIX 2008. */ +static_assert (sizeof NULL == sizeof (void *)); + +int +main (void) +{ + return 0; +} diff --git a/tests/test-wchar.c b/tests/test-wchar.c deleted file mode 100644 index 663a5a4ea6..0000000000 --- a/tests/test-wchar.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Test of substitute. - Copyright (C) 2007-2024 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -#include - -/* Check that the types wchar_t and wint_t are defined. */ -wchar_t a = 'c'; -wint_t b = 'x'; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -static_assert (sizeof NULL == sizeof (void *)); - -int -main (void) -{ - return 0; -}