Names
- Identifiers that begin with an underscore and either an uppercase letter or another underscore.
- Identifiers that end with “
_t”.
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® 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 C/C++ runtime library that 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.
When long external names are not supported, the 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”.
Related information
- See #pragma csect and #pragma map in z/OS XL C/C++ Language Reference for more information about external names.
- See Prelinking and linking z/OS XL C/C++ programs in z/OS XL C/C++ User's Guide.
- See Naming conventions in z/OS XL C/C++ Programming Guide for details about external names.