Help with gcc under ISC 2.2

Jim Balter jim at segue.segue.com
Thu Dec 20 12:37:05 AEST 1990


In article <1990Dec18.210054.23004 at agate.berkeley.edu> ilan343 at 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 <sys/stat.h> 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.



More information about the Comp.unix.sysv386 mailing list