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
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