ILE C/C++ Programmer's Guide


LOCALETYPE Compiler Option

The LOCALETYPE option on the CRTCMOD/CRTCPPMOD or CRTBNDC/CRTBNDCPP command allows a program to specify the type of locale object to be used when it is being compiled. The keyword options for the LOCALETYPE option are *CLD and *LOCALE, with the default being *LOCALE. The keyword *CLD enables the *CLD locale support, whereas the keyword *LOCALE enables the support for locales of type *LOCALE.

The command format for enabling the run-time environment that supports locales of type *LOCALE is:


CRTCMOD MODULE(MYLIB/MYMOD) SRCFILE(MYLIB/QCSRC) LOCALETYPE(*LOCALE)
CRTBNDC PGM(MYLIB/MYPGM) SRCFILE(MYLIB/QCSRC) LOCALETYPE(*LOCALE)

When the *LOCALE keyword is specified for the LOCALETYPE option, the ILE C/C++ compiler defines the macro __POSIX_LOCALE__. When __POSIX_LOCALE__ is defined, the locale-sensitive C run-time functions are remapped to functions that are sensitive to locales that are defined in *LOCALE objects. In addition, certain ILE C/C++ run-time functions can only be used with locales of type *LOCALE and do not work with *CLD locales. These functions are available only in V3R7 and later releases of the ILE C/C++ runtime. The list of locale-sensitive functions later in this chapter indicates which functions are sensitive only to locales of type *LOCALE.

Note:
The default has changed. Prior to V5R1, *CLD was the default value for ILE C. As of V5R1, the default has been changed to *LOCALE.


[ Top of Page | Previous Page | Next Page | Table of Contents ]