libstdc++: Fix std module to work with --disable-wchar_t [PR126111]

We should not try to export names which are not declared if GCC is
configured with --disable-wchar_t.

We should also not define the wide stream aliases in <syncstream> and
<spanstream>.

libstdc++-v3/ChangeLog:

	PR libstdc++/126111
	* include/std/format (__format::__write_escape_seq): Remove
	unnecessary alias declaration.
	* include/std/spanstream (wspanbuf, wispanstream, wospanstream)
	(wspanstream): Only declare for _GLIBCXX_USE_WCHAR_T.
	* include/std/syncstream (wsyncbuf wosyncstream): Likewise.
	* src/c++23/std.cc.in: Add preprocessor checks for
	_GLIBCXX_USE_WCHAR_T to names which depend on it.

Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
(cherry picked from commit fb0c03ee7afca608cba0419629184b8f442085e2)
4 files changed