From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 31 May 2015 11:14:42 +0100 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=089e0160aa484c94d705175dfa09 Subject: Re: [9fans] "..." and "##' stuff with pcc? Topicbox-Message-UUID: 5739f894-ead9-11e9-9d60-3106f5b1d025 --089e0160aa484c94d705175dfa09 Content-Type: text/plain; charset=UTF-8 On 25 May 2015 at 19:44, Jens Staal wrote: > It did however not work (I guess the "..." and "##" are to blame?) so now > I wonder how/if it is possible with the posix compiler on plan9? It doesn't understand the named ... variant, which I suppose is more recent tinkering. Use the older __VA_ARGS__. Also I didn't think your use of ## was correct in any case (you can only concatenate things that produce a valid token). It looked as though #define err(exitcode, format, ...) \ errx(exitcode, format ": %s", __VA_ARGS__, strerror(errno)) etc might work. --089e0160aa484c94d705175dfa09 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 25 May 2015 at 19:44, Jens Staal <staal1978@gmail.com> = wrote:
It did however not work (I guess the "...&q= uot; and "##" are to blame?) so now I wonder how/if it is possibl= e with the posix compiler on plan9?

It doesn't un= derstand the named ... variant, which I suppose is more recent tinkering. U= se the older __VA_ARGS__.
Also I didn't= think your use of ## was correct in any case (you can only concatenate thi= ngs that produce a valid token).

=
It looked as though

#define= err(exitcode, format, ...) \
=C2=A0 errx(e= xitcode, format ": %s", __VA_ARGS__, strerror(errno))

etc might work.


--089e0160aa484c94d705175dfa09--