Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!randvax!segue!jim From: jim@segue.segue.com (Jim Balter) Newsgroups: comp.unix.sysv386 Subject: Re: Help with gcc under ISC 2.2 Message-ID: <5257@segue.segue.com> Date: 20 Dec 90 01:37:05 GMT References: <1990Dec17.190525.16868@agate.berkeley.edu> <5234@segue.segue.com> <1990Dec18.210054.23004@agate.berkeley.edu> Reply-To: jim@segue.segue.com (Jim Balter) Distribution: usa Organization: Segue Software, Inc. - Santa Monica, CA. +1-213-453-2161 Lines: 25 In article <1990Dec18.210054.23004@agate.berkeley.edu> ilan343@violet.berkeley.edu (Geraldo Veiga) writes: >I just finished recompiling gcc (stage1) using -traditional switch and >went through with no apparent glitches. Should I still "fix" types.h? In the ISC 2.2 headers, the POSIX types usually occur within ifdef _POSIX_SOURCE. In stat.h they botched it (aside from their botched use of _POSIX_SOURCE) and use these types in function prototypes. But since the prototypes are only compiled under ifdef __STDC__, stat.h is ok if you use cc or gcc -traditional. But *any* program that uses will have to be compiled -traditional unless you fix stat.h or types.h, or define _POSIX_SOURCE, which will give you a whole host of other problems. >Is the "_POSIX_SOURCE" definition generic SysV 3.2 or Interactive's >enhancement? It wasn't in ISC releases prior to 2.2, so it may have been added by ISC. The important point is that it is in some systems but not others. >I am sort of reluctant of messing around with standard header files, I >want to keep my code portable. Well, you can put the changed headers in gcc-include so you don't have to touch the distributed versions. For maximal portability among UNIX systems, stick with good ole K&R -traditional, and hope that no one hands you code that uses ANSI C features.