Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Compilation on Ultrix cc
- X-seq: zsh-workers 1008
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: hzoli@xxxxxxxxxx (Zoltan Hidvegi)
- Subject: Re: Compilation on Ultrix cc
- Date: Wed, 8 May 1996 15:54:29 +0100 (BST)
- Cc: hniksic@xxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199605072039.WAA24281@xxxxxxxxxxxxx> from "Zoltan Hidvegi" at May 7, 96 10:39:51 pm
>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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author