Chapter Contents |
Previous |
Next |
Developing Applications for Use with UNIX System Services OS/390 |
The
posix
compiler option modifies compiler behavior in order to establish
certain defaults required by the POSIX.1 standard. A program compiled without
the
posix
option may not behave completely according to the standard even
if the program's code is completely conforming.
Some of the effects of the
posix
option are:
_SASC_POSIX_SOURCE
is automatically
defined.
refdef
option is assumed.
environ
and
tzname
are made automatically
__rent
unless explicitly declared
__norent
.
When a load module containing a
main
function is link-edited,
the resulting load module is considered to be POSIX compiled if any constituent
object module was compiled with the
posix
option. (For this reason, if
you are writing routines that may be used in both POSIX and non-POSIX programs,
you should not compile them with the
posix
option, because this would force
any load modules that use them to be considered POSIX.)
If the main load module of a program is defined as POSIX
compiled, certain library defaults are changed in order to bring them into
conformance with the POSIX standard. For instance, in a program that is not
POSIX compiled, the function call
fopen("sysin", "r")
opens the file associated with
the DDname SYSIN. In a POSIX compiled program, this call opens the USS HFS
file
"sysin"
in the current directory.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.