From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,b9424f19341b3367 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1992-12-01 10:02:50 PST Path: sparky!uunet!dtix!darwin.sura.net!wupost!sdd.hp.com!elroy.jpl.nasa.gov!ufo!jenkins From: jenkins@jpl-devvax.jpl.nasa.gov (Steve Jenkins) Newsgroups: comp.unix.osf.misc Subject: Re: Is DEC OSF stable? Message-ID: <1992Dec1.172759.20835@jpl-devvax.jpl.nasa.gov> Date: 1 Dec 92 17:27:59 GMT References: <1992Dec1.005532.3944@jpl-devvax.jpl.nasa.gov> Organization: Jet Propulsion Laboratory (NASA) In article jet@boxer.nas.nasa.gov (J. Eric Townsend) writes: >"jenkins" == Steve Jenkins writes: > >jenkins> Why not? POSIX.1 requires that certain header symbols be >jenkins> made visible if, and only if, the feature test macro >jenkins> _POSIX_SOURCE is defined. I suspect the same is true for >jenkins> X/Open and OSF specifications. These macros are necessary to >jenkins> avoid namespace collisions. > >0. If it's an OSF system, I shouldn't have to define any sort of >"OSF" flags at compile time. OSF/1 provides multiple standard or historical (e.g., BSD) application programming interfaces. These API's are not entirely mutually compatible, especially with regards to namespace. Some method *must* be provided for the programmer to select the appropriate APIs. In the case of ISO C, POSIX, XPG3, and the OSF AES, OSF/1 is providing *exactly* the mechanism (feature test macros) required by the standards. >1. Why not have seperate sets of include files instead of a mess of >ifdefs? It'd make digging through the includes a bit more easy. Neither ISO/IEC (ANSI) C nor POSIX require header files to even exist, only that an "#include " have the specified effects. If the compiler can do it by internal magic, that's OK. The point is that header files are not for human consumption. If you want to know what header files are supposed to do, you should be reading the relevant standards and specifications. You certainly cannot judge anything about the commitment of a vendor to an operating system from the structure of its header files. Solaris 2.0, for example, has #ifdef's all over, for exactly the same reasons. -- Steve Jenkins jenkins@devvax.jpl.nasa.gov Caltech/Jet Propulsion Laboratory (818) 306-6438