NAME
ccoommppaatt - manipulate compatibility settings
SYNOPSIS
COMMANDMODE=legacy|unix2003##ddeeffiinnee PPOOSSIIXXCCSSOOUURRCCEE
##ddeeffiinnee AAPPPPLLEECCSSOOUURREE
##ddeeffiinnee NNOONNSSTTDDSSOOUURRCCEE
##ddeeffiinnee LLPP6644
DESCRIPTION
Setting the environment variable COMMANDMODE to the value legacy causes utility programs to behave as closely to Mac OS X 10.3's utility programs as possible. When in this mode all of 10.3's flags are accepted, and in some cases extra flags are accepted, but no flags that were used in 10.3 will have been removed or changed in meaning. Any behavioral changes inthis mode are documented in the LEGACY sections of the individual utili-
ties. Setting the environment variable COMMANDMODE to the value unix03 causes utility programs to obey the Version 3 of the Single UNIX Specification (``SUSv3'') standards even if doing so would alter the behavior of flags used in 10.3. COMMANDMODE's value is case insensitive and if it is unset or set to something other than legacy or unix03 it behaves as if it were set to unix03. Defining NONSTDSOURCE causes library and kernel calls to behave as closely to Mac OS X 10.3's library and kernel calls as possible. Any behavioral changes in this mode are documented in the LEGACY sections of the individual function calls. Defining any of POSIXCSOURCE, APPLECSOURE, or LP64 causes library and kernel calls to conform to Version 3 of the Single UNIX Specification (``SUSv3'') standards even if doing so would alter the behavior of functions used in 10.3. Defining POSIXCSOURCE also removes functions, types, and other interfaces that are not part of Version 3 of the Single UNIX Specification (``SUSv3'') from the normal C namespace, while APPLECSOURE does not. Failing to define any of those symbols currently acts as if you have defined NONSTDSOURCE but it is expected that in a future OS X release the default behavior will change to be as if APPLECSOURE were defined. STANDARDS With COMMANDMODE set to unix2003 utility functions conform to Version 3 of the Single UNIX Specification (``SUSv3'') With POSIXCSOURCE, APPLECSOURE, or LP64 system and library calls conform to Version 3 of the Single UNIX Specification (``SUSv3'')BUGS
Different parts of a program can be compiled with different compatibility
settings. The resultant program will normally work as expected, for example a regex created by the Version 3 of the Single UNIX Specification (``SUSv3'') rreeggccoommpp(3) can be passed to the legacy rreeggffrreeee(3) with no unexpected results. Some cases are less clear cut, for example what doesthe programmer intend when they use the -ssuussvv33() rreeggccoommpp(3) to compile a
regex, but the legacy rreeggeexxeecc(3) to execute it? Any interpretation will surprise someone. Darwin October 7, 2004 Darwin