Fwd: [PATCH] Enable libstdc++ numeric conversions on Cygwin
Jonathan Wakely
jwakely@redhat.com
Fri Sep 18 15:49:00 GMT 2015
On 18/09/15 11:17 -0400, Jennifer Yao wrote:
>A number of functions in libstdc++ are guarded by the _GLIBCXX_USE_C99
>preprocessor macro, which is only defined on systems that pass all of
>the checks for a large set of C99 functions. Consequently, on systems
>which lack any of the required C99 facilities (e.g. Cygwin, which
>lacks some C99 complex math functions), the numeric conversion
>functions (std::stoi(), std::stol(), std::to_string(), etc.) are not
>definedâa rather silly outcome, as none of the numeric conversion
>functions are implemented using C99 math functions.
>
>This patch enables numeric conversion functions on the aforementioned
>systems by splitting the checks for C99 support and defining several
>new macros (_GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and
>_GLIBCXX_USE_C99_WCHAR), which replace the use of _GLIBCXX_USE_C99 in
>#if conditionals where appropriate.
Awesome! This has been on my TODO list for ages, but I've not made
much progress. I *definitely* want to see this change happen, but
there are some legal prerequisites that need to be met before that can
happen, see
https://gcc.gnu.org/onlinedocs/libstdc++/manual/appendix_contributing.html#contrib.list
Do you already have a copyright assignment for GCC?
If not, would you be willing to complete one?
THanks for doing this work, it will help several other platforms, not
only Cygwin.
N.B. I don't see a patch attached to your mail, but that's not a
problem for now as I don't want to look at it until I know the status
of your copyright assignment (if we don't end up using your patch and
I do it myself then I don't want to plagiarise your work!)
More information about the Libstdc++
mailing list