From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (root@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id CAA06195 for ; Thu, 9 May 1996 02:04:37 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id KAA06313; Wed, 8 May 1996 10:58:32 -0400 (EDT) Resent-Date: Wed, 8 May 1996 10:58:32 -0400 (EDT) From: Zefram Message-Id: <3061.199605081454@stone.dcs.warwick.ac.uk> Subject: Re: Compilation on Ultrix cc To: hzoli@cs.elte.hu (Zoltan Hidvegi) Date: Wed, 8 May 1996 15:54:29 +0100 (BST) Cc: hniksic@public.srce.hr, zsh-workers@math.gatech.edu In-Reply-To: <199605072039.WAA24281@turan.elte.hu> from "Zoltan Hidvegi" at May 7, 96 10:39:51 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]7473.10 X-US-Congress: Moronic fuckers MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"4p7Pi.0.WY1.NQBan"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1008 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >The patch below should remove the warnings on Ultix with cc. It removes >the #ifdef ULTRIX lines from glob.c and always uses Statptr in place of >struct stat *. I also removed the #error directive from builtin.c and >repladed with comething which should generate a syntax error (but I hope >that noone will see this error). [...] > ! # error there are some unknown limits. Fixme! > --- 3535,3541 ---- > ! there are some unknown limits. Fixme! Actually the usually preferred way to do #error is thus: #if SOME_PROBLEMATIC_CONDITION #error Fix me. #endif This works because K&R preprocessors don't recognise preprocessor directives unless the # is in column 1. In this case, they would pass the "#error Fix me." text through to the compiler, which will barf just as it would without the "#error". The advantages of this technique are (1) ANSI compilers will abort properly, and (2) it makes it clearer that this is intended to abort compilation. -zefram