Names

Identifiers (function names, macros, types) defined by the various standards in the headers are reserved. Also reserved are:
  • Identifiers that begin with an underscore and either an uppercase letter or another underscore.
  • Identifiers that end with “_t”.
Do not use these reserved identifiers for any purpose other than those defined in the documentation.

All identifiers other than the ISO C identifiers comprise the user's name space. You are free to use any of these names. However, a number of names in the z/OS® XL C/C++ Runtime Library encroach on the user's name space. This is a result of our desire to provide names that are meaningful and easy to remember, or to support industry-defined names, for example: fetchep() or pthread_cancel(). The header files cause these names to be renamed into reserved names and these in turn are mapped onto the external entry point names that usually are operating-system specific.

If you want to use names in the z/OS XL C/C++ Runtime Library which are in the user's name space as defined, just include the appropriate header. If you cannot include the appropriate header because it would bring in other names that collide with your own private names, but you still want to use some of the functions defined there, you can refer to these functions by their reserved internal names. These reserved names are unique, not longer than 8 characters, and usually start with a double underscore.

The IBM z/OS XL C/C++ compiler automatically maps all underscores and lowercase letters in external identifiers in source code to ‘@’ characters and uppercase characters in the object deck. Thus, to refer to the fetchep() function without including the stdlib.h header, you can use its reserved internal name __ftchep(), which is then automatically mapped to the external entry point @@FTCHEP. For C++ functions, you must ensure C linkage by declaring the functions as extern “C”.

Functions that are mapped this way have the external entry point listed in the function description in this part under the heading, “External Entry Point”.

See also the following topics in z/OS XL C/C++ Language Reference for more information about external names:
  • “#pragma csect”
  • “#pragma map”
  • “External Name Mapping”
See also the following topics in z/OS XL C/C++ User's Guide:
  • “Prelinking a C Application”
  • The LONGNAME compiler option

See also “Naming Conventions” in “Using Environment Variables”, in z/OS XL C/C++ Programming Guide for details about external names.