Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!wuarchive!psuvax1!news From: melling@cs.psu.edu (Michael D Mellinger) Newsgroups: comp.sys.next Subject: Re: cc -traditional problem Message-ID: <_i2G0ppb@cs.psu.edu> Date: 31 Jan 91 19:21:04 GMT References: <1991Jan31.115059.12153@investor.pgh.pa.us> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 25 In-Reply-To: rbp@investor.pgh.pa.us's message of 31 Jan 91 11:50:59 GMT Nntp-Posting-Host: client3.cs.psu.edu In article <1991Jan31.115059.12153@investor.pgh.pa.us> rbp@investor.pgh.pa.us (Bob Peirce #305) writes: I was moving over some scripts from the old system and in testing discovered NeXT's awk is oawk, so I decided to port nawk. It wouldn't compile so I went to the manual and discovered this might be because externs were mentioned inside functions and I probably needed the -traditional flag. When I tried that, the compiler croaked on problems with stdio.h. It didn't like the concept of const whatever. Now that seems pretty dumb. Why provide a flag that is needed but can't be used? This suggests I am missing something, but I don't know what. Do you? To use the -traditional switch, you can try copying the stdio.h file to another directory, removing the const keyword, and then including that directory with the -I option. I got a stdio.h from a Sun 3. I can't remember if removing the word const is enough. Hopefully, NeXT will get around to changing stdio.h in the next release. BTW, why is there no lint? Are the compiler messages considered to be just as good? Try cc -Wall -O. The GNU compiler gives decent warnings. As far as I know, lint doesn't even work with ANSI C, let alone Objective C. -Mike