sysmark@physics.utoronto.ca (Mark Bartelt) (02/13/91)
We recently got A/UX for one of our MacIIs, and were appalled to discover that the C compiler isn't X3J11 compliant. The guy who uses that system sent me the following last night: | Subject: non-ANSI c | | Horror of horrors! After converting all my beautifully prototyped | mac interface programs to port over to AUX, I find that the AUX | compiler is some prehistoric monster that doesn't respect the ANSI | 'standard'. Is there some kind of filter available to convert programs | from ANSI to old format? So, a couple of questions (aside from the obvious one, namely how does Apple expect to be taken seriously if a recent major release of their UNIX product doesn't even contain an X3J11 compliant compiler) ... (1) At the risk of starting a flame war, what are people's feelings about alternative C compilers? I've heard both wonderful things and terrible things about gcc. Someone spoke favourably about UniSoft's compiler a few months ago, but a fellow from UniSoft replied that at the time there were no plans to produce an A/UX 2.0 compatible version. (For that matter, I've not looked at the UniSoft compiler, so I don't know whether it's X3J11 compliant. Is it?) (2) Apple folks: Are there plans to step into the 1990s with the next release of A/UX? Will a "modern" C compiler come with 2.0.1, or will we have to wait for 2.1 (or 3.0; or ...)? (3) As to the question of converting an ANSI C program, complete with function prototypes, into something that can be shoved through an old-fashioned C compiler: I could probably cobble together some sort of shell script, with judicious use of awk/sed/whatever, that would do the job. But, before I embark on this silly exercise, it seems worth inquiring as to whether anyone else already has such a tool. If so, I'd appreciate hearing about it/them. Thanks in advance. -- Mark Bartelt 416/978-5619 Canadian Institute for sysmark@cita.toronto.edu Theoretical Astrophysics sysmark@cita.utoronto.ca
ksand@Apple.COM (Kent Sandvik) (02/14/91)
In article <1991Feb13.122652.14565@helios.physics.utoronto.ca> sysmark@physics.utoronto.ca (Mark Bartelt) writes: >We recently got A/UX for one of our MacIIs, and were appalled to discover >that the C compiler isn't X3J11 compliant. The guy who uses that system >sent me the following last night: > >| Subject: non-ANSI c >| >| Horror of horrors! After converting all my beautifully prototyped >| mac interface programs to port over to AUX, I find that the AUX >| compiler is some prehistoric monster that doesn't respect the ANSI >| 'standard'. Is there some kind of filter available to convert programs >| from ANSI to old format? Well, most of the basic Unix workstation system C compilers are 'prehistoric mosters' originating from the terrifying, Tyrannosaurus pcc from the continent of AT&T. With the advent of System V.4 AT&T is *finally* shipping an ANSI C compliant C compiler as part of the UNIX system release. As to A/UX, use A/UX GNU gcc for the time being with the ANSI C flag, otherwise wait and see (GNU cc available with anonymous ftp from wuarchive.wustl.edu). Regards, Kent Sandvik -- Kent Sandvik, Apple Computer Inc, Developer Technical Support NET:ksand@apple.com, AppleLink: KSAND DISCLAIMER: Private mumbo-jumbo Zippy++ says: "C++ is a write-only language, I can write programs in C++ but I can't read any of them".
paul@athertn.Atherton.COM (Paul Sander) (02/14/91)
In article <1991Feb13.122652.14565@helios.physics.utoronto.ca> sysmark@physics.utoronto.ca (Mark Bartelt) writes: [some other guy writes:] >| Horror of horrors! After converting all my beautifully prototyped >| mac interface programs to port over to AUX, I find that the AUX >| compiler is some prehistoric monster that doesn't respect the ANSI >| 'standard'. Is there some kind of filter available to convert programs >| from ANSI to old format? > >So, a couple of questions (aside from the obvious one, namely how does >Apple expect to be taken seriously if a recent major release of their >UNIX product doesn't even contain an X3J11 compliant compiler) ... [stuff omitted] >(2) Apple folks: Are there plans to step into the 1990s with the >next release of A/UX? Will a "modern" C compiler come with 2.0.1, >or will we have to wait for 2.1 (or 3.0; or ...)? Please remember that A/UX is a port of System V Release 2, which is older than the X3J11 standard. Until Apple can support a release of Unix that is more recent than X3J11, I think we'll be stuck with old compilers. I understand that System V Release 4 supplies an X3J11 compliant compiler. Since some of Apple's lower-priced competition (i.e. Amiga) is rumored to support post-beta SVR4 in March, I suspect we won't have to wait too long before we start seeing software that is a little bit more modern. >(3) As to the question of converting an ANSI C program, complete >with function prototypes, into something that can be shoved through >an old-fashioned C compiler: I could probably cobble together some >sort of shell script, with judicious use of awk/sed/whatever, that >would do the job. But, before I embark on this silly exercise, it >seems worth inquiring as to whether anyone else already has such a >tool. If so, I'd appreciate hearing about it/them. GhostScript, the Free Software Foundation's PostScript clone, supplies a program that converts ANSI compliant C programs to K&R as part of its build and install tools. -- Paul Sander (408) 734-9822 | "Passwords are like underwear," she said, paul@Atherton.COM | "Both should be changed often." {decwrl,pyramid,sun}!athertn!paul | -- Bennett Falk in "Mom Meets Unix"
sramtrc@windy.dsir.govt.nz (02/15/91)
> > (3) As to the question of converting an ANSI C program, complete > with function prototypes, into something that can be shoved through > an old-fashioned C compiler: I could probably cobble together some > sort of shell script, with judicious use of awk/sed/whatever, that > would do the job. But, before I embark on this silly exercise, it > seems worth inquiring as to whether anyone else already has such a > tool. If so, I'd appreciate hearing about it/them. > There is a program that does this. It comes as part of some other package. Trouble is, I forget which one. I found it within the past six months and my most likely guess is with ghostscript (GNU software). Sorry it's not much help to you but at least you know now that you don't have to write something yourself. If you don't get an answer from someone else I can dig into my brain or archives to find it. Tony Cooper sramtrc@albert.dsir.govt.nz
ksand@Apple.COM (Kent Sandvik) (02/16/91)
In article <18836.27bbd7bc@windy.dsir.govt.nz> sramtrc@albert.dsir.govt.nz writes: >There is a program that does this. It comes as part of some other package. >Trouble is, I forget which one. I found it within the past six months >and my most likely guess is with ghostscript (GNU software). Sorry it's >not much help to you but at least you know now that you don't have to >write something yourself. If you don't get an answer from someone else >I can dig into my brain or archives to find it. Tony, do you talk about protoize/unprotoize? I'm not sure where to get that one, but it's a function prototype adder/stripper. It requires gcc, so if you want to strip function prototypes with protoize using gnu, you're on the wrong track :-). Kent -- Kent Sandvik, Apple Computer Inc, Developer Technical Support NET:ksand@apple.com, AppleLink: KSAND DISCLAIMER: Private mumbo-jumbo Zippy++ says: "C++ is a write-only language, I can write programs in C++ but I can't read any of them".
domo@tsa.co.uk (Dominic Dunlop) (02/16/91)
In article <1991Feb13.122652.14565@helios.physics.utoronto.ca> sysmark@physics.utoronto.ca (Mark Bartelt) writes: > We recently got A/UX for one of our MacIIs, and were appalled to discover > that the C compiler isn't X3J11 compliant. Yes. Fun, isn't it? Surprising how many commercially-shipped UNIX systems have yet to acknowledge the existence of X3-159. (Indeed, if I get enough mail saying who supports ANSI C and who does not, I'll post a summary. But you'll have to over-ride the Followup-To: line above if you want to post to comp.lang.c on this topic.) But anyway, for A/UX there are, to my knowledge, three unsatisfactory ways out of the bind: 1. Compile programs using a (more) compliant Macintosh C complier, and run them under A/UX as Macintosh applications. However, this makes them ``un-UNIX-like'' -- they don't have real command lines, can't be used in pipelines, and so on. 2. Download gcc for A/UX. It's available from several places -- none of them sanctioned by the Free Software Foundation, as FSF does not like Apple. To quote bits of John L Coolidge's message <1991Jan30.002109.5728@julius.cs.uiuc.edu>: JLC> gcc 1.39 and gas 1.38 for A/UX are now available from JLC> wuarchive.wustl.edu. JLC> JLC> Distribution: The following files should be available on JLC> wuarchive.wustl.edu in the systems/aux directory JLC> (/archive/systems/aux for those NFS mounting wuarchive): JLC> JLC> gcc-1.39.bin.tar.Z Binaries for gcc-1.39 and gas-1.38 on JLC> A/UX 2.0 JLC> gcc-1.39.aux.diffs.Z Patches for gcc-1.39 supporting A/UX. JLC> These should not break support JLC> for any other machine. JLC> gcc-1.39.aux.tar.Z Sources for gcc-1.39 with the above JLC> diffs already applied. JLC> gas-1.38.aux.diffs.Z Patches for gas-1.38 supporting A/UX. JLC> These should not break support JLC> for any other machine. JLC> gas-1.38.aux.tar.Z Sources for gas-1.38 with the above JLC> diffs already applied. The problem I've found with gcc is that Apple's headers and libraries are not ANSI-compliant, so gcc does not like them at all. What's the way around this, folks? (I probably wasn't paying attention when it was explained.) 3. Get a commercial or freeware ANSI to ``common usage'' C translator. Mindcraft, at (800) LE POSIX (really) or (415) 323 9000 can sell you one. No doubt others exist. This approach to skirting your problem will probably work, but, boy, does it feel tacky! > > (2) Apple folks: Are there plans to step into the 1990s with the > next release of A/UX? Will a "modern" C compiler come with 2.0.1, > or will we have to wait for 2.1 (or 3.0; or ...)? Hmmm. Put it this way. Most other suppliers seem to have a greater commitment to shipping a modern UNIX does than Apple. On the other hand, Apple does ship an awful lot of functionality for a single, not unreasonable all-in price with A/UX. Most other suppliers charge extra for a C compilation subsystem. Maybe you get what you pay for. (Unless you go to FSF?) -- Dominic Dunlop