C99 support of long long data type

As of z/OS® V1R7 XL C/C++ compiler, when you recompile an application that uses long long support, you might experience problems if the application does one of the following actions:
  • Uses a compiler designed to support C99
  • Does not ask for extended features
If an application currently uses the LANGLVL(LONGLONG) compiler option to get at the long long data type, and also uses certain non-standard long long macros, recompiling with z/OS V2R2 XL C/C++ may cause compiler error messages to be issued because these non-standard definitions are hidden unless both LANGLVL(LONGLONG) and LANGLVL(EXTENDED) are in effect.

If an application currently uses LANGLVL(EXTENDED), the non-standard definitions will continue to be exposed since extended features are requested. For those applications that want to use a compiler designed to support C99, but do not want extended features, change the source code to use the C99 standard long long macros, as shown in Table 1.

Table 1. C99 standard macros to replace non-standard long long macros that cause z/OS V2R2 errors
Non-standard long long macros C99 standard long long macros
LONGLONG_MIN LLONG_MIN
LONGLONG_MAX LLONG_MAX
ULONGLONG_MAX ULLONG_MAX
The definitions in Table 1 are commonly used with the following functions:
  • llabs()
  • the following long long numeric conversion functions
    • strtoll()
    • strtoull()
    • wcstoll()
    • wcstoull()