The aim of this patch is to provide ASCII/EBCDIC support for libc++ on z/OS and start a discussion about the approach. The approach taken involves using different inline namespaces for the ASCII/EBCDIC versions of the functions, and having implementations based on whether __NATIVE_ASCII_F is defined. More details are in the design document.
It should be noted that this patch does not include the script to build libc++ on z/OS in both 32 and 64-bit mode (and combining the A/E in a shared library). This will be in a separate patch.
Nonetheless, this patch cannot yet land because of a dependency on an underlying compiler feature (pragma map), which is in the works of being upstreamed.
We have a better way of doing this that is being worked on now.
In a nutshell code like:
will be replaced with:
and getMessage will expand out to an array of the strings index.
This will eliminate all of the #if's. I also see a potential benefit that this could be the ground work for enabling internationalization of the runtime messages.