Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!strath-cs!jim From: jim@cs.strath.ac.uk (Jim Reid) Newsgroups: comp.lang.c++ Subject: Re: Making AT&T C++ for Sun 3 Message-ID: <1001@stracs.cs.strath.ac.uk> Date: 20 May 88 12:48:50 GMT References: <1231@ektools.UUCP> Reply-To: jim@cs.strath.ac.uk Organization: Comp. Sci. Dept., Strathclyde Univ., Scotland. Lines: 37 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. The C++ stdio.h include file by default puts elements of the _iobuf structures the wrong way round for Suns. The positioning of the _cnt and _ptr fields of the structure is determined by an ifdef that looks like: extern struct _iobuf { #if vax || u3b || u3b2 || u3b5 || mc68k int _cnt; char *_ptr; #else char *_ptr; int _cnt; #endif The Sun cpp doesn't have mc68k as an in-built define, so all that's required is to make the ifdef look like: #if vax || ..... mc68k || mc68000 That way, you'll get the right structure layout for use on Suns. Sun's C preprocessor on the Sun2's and 3's does have mc68000 defined, and so anything including /usr/include/CC/stdio.h gets the proper structure layout. Once we made this mod., recompiled and installed C++, the compiler has worked for us OK. Jim -- ARPA: jim%cs.strath.ac.uk@ucl-cs.arpa, jim@cs.strath.ac.uk UUCP: jim@strath-cs.uucp, ...!uunet!mcvax!ukc!strath-cs!jim JANET: jim@uk.ac.strath.cs "JANET domain ordering is swapped around so's there'd be some use for rev(1)!"