Public Comment Number PC-UK0280 ISO/IEC CD2 9899 (SC22N2794) Public Comment =========================================== Date: 1998-12-12 Author: C.D.W.Feather Author Affiliation: Self Postal Address: Demon Internet Ltd. 322 Regents Park Road London N3 2QQ United Kingdom E-mail Address: Telephone Number: +44 181 371 1138 Fax Number: +44 181 371 1037 Category: Feature that should be included Committee Draft subsection: 6.10.8 Title: provide a __STDC_HOSTED__ macro Detailed description: There is currently no way for a program to determine if the implementation is hosted or freestanding. A standard predefined macro should be provided. Add to the list in 6.10.8p1: __STDC_HOSTED__ The decimal constant 0 if the implementation is a freestanding one and the decimal constant 1 if it is a hosted one. Note: it has been suggested that this is difficult to provide when there is an independent preprocessor because it will not know what language the compiler is handling or what library is available, but the same points apply to the standard headers, to __STC_VERSION__, to __STDC_IEC_559__, and so on; if these can be handled correcly by such an implementation, so can __STDC_HOSTED__.