Path: utzoo!attcan!uunet!mcvax!diku!seindal From: seindal@diku.dk (Rene' Seindal) Newsgroups: comp.lang.c++ Subject: Re: Making AT&T C++ for Sun [34] Message-ID: <3824@diku.dk> Date: 20 May 88 15:36:57 GMT References: <1231@ektools.UUCP> Organization: DIKU, U of Copenhagen, DK Lines: 40 In article <1231@ektools.UUCP> ken@ektools.UUCP (Kenneth J. Lester) writes: >This probably has been discussed before, but could someone tell >me how to make AT&T C++ version 1.2.1 for the Sun 3 family of >computers (O/S 3.x). It makes just fine, but when executed >via CC, cfront runs and never returns. I've run the bsd.fix >script, and have tried compiling it with compilers gcc, and Sun >cc compilers from Sun O/S 3.2 and 3.5. >I know I'm doing something wrong but I followed the same make >procedure on a Vax running Ultrix 2.2 and it works just fine. >(Note Ultrix 2.2 is a BSD derivative). You are not really doing anything wrong. It is actually an error in stdio.h. The beginning og the definition of _iobuf in my stdio.h look like this: # ifndef FILE extern struct _iobuf { #if vax || u3b || u3b2 || u3b5 || mc68k || sparc || mc68020 || mc68010 int _cnt; char *_ptr; #else char *_ptr; int _cnt; #endif You are missing the test for "sparc" and "mc680[12]0" in your file, so the two fields was interchanged, when you compiled cfront. It annoys me a bit that the test is on the cpu type, instead of on the operating system. I would like the test to say #if BSD || SunOS || ... instead, since this is more an OS dependency than a hardware dependency. Unfortunately, none of the C compilers I have seen will make any defines like this. (why not??) Rene' Seindal, DIKU, U. of Copenhagen, Denmark. (seindal@diku.dk)