This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstdc++/4764: std::wstring missing on Solaris



>Number:         4764
>Category:       libstdc++
>Synopsis:       std::wstring missing on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 01 10:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Martin v. Loewis
>Release:        3.0.2 20011014 (prerelease)
>Organization:
Humboldt-University Berlin
>Environment:
System: SunOS paros 5.8 Generic_108528-08 sun4u sparc SUNW,Sun-Blade-1000
Architecture: sun4

host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ../configure --enable-shared --enable-threads --with-cpu=v8 --with-gnu-ld --with-gnu-as --enable-version-specific-runtime-libs
>Description:
	On Solaris 8, std::wstring is not available, because libstdc++/aclocal.m4
        checks for too many functions

	The following functions are not available on Solaris. They are
        required to enable wide strings in libstdc++, but they aren't used
        by the implementation:

        vwscanf vfwscanf vswscanf wcstof

        Notice that support for these functions is only mandated by ISO C99,
        not by ISO C++.
>How-To-Repeat:
	Try compiling

        #include <string>
        int main(){
          std::wstring s;
        }

        This gives

        a.cc:3: `wstring' undeclared in namespace `std'

>Fix:
        Separately check for these functions in aclocal.m4. If available,
        export them in include/c_std/bits/std_cwchar.h.

        In addition, Solaris 8 introducs a #define for wcsftime to
        __wcsftime_xpg5, and of wcstok to __wcstok_xpg5, unless
        _XOPEN_VERSION is 4 or #pragma redefine_extname is supported; so
        re-exporting those functions should happen carefully.

        Finally, std_cwctype.h re-exports iswblank, even though aclocal.m4
        didn't test for it, nor is it supported C99.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]