dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* build issues when using pcc
@ 2011-05-22 12:34 Szabolcs Nagy
  2011-05-22 16:46 ` Jonathan Nieder
  0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2011-05-22 12:34 UTC (permalink / raw)
  To: dash

hello i compiled dash with pcc and found two issues:

src/output.h the outc macro is not standard c:
#define outc(c, file)<->((file)->nextc == (file)->end ? outcslow((c), (file)) : (*(file)->nextc = (c), (file)->nextc++))

type signature of the operands are int ? void : char*
but the two sides of : should be compatible
either use
    ... ? outcslow(), 0 : ...
or
    ... ? outcslow() : ..., (void)0
otherwise a standard compliant compiler won't compile it


the other issue is in the mkbuiltins:
it assumes that the cpp does not produce empty lines with
whitespace only
the following line
< $builtins sed '/^#/d; /^$/d' > $temp
should be
< $builtins sed '/^#/d; /^ *$/d' > $temp

so empty lines with spaces are dropped as well
(allowed by the standard after the preprocessing pass)


(also it would be nice to include a configure script in
the git repo, or don't use autoconf in the first place)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-07  7:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-22 12:34 build issues when using pcc Szabolcs Nagy
2011-05-22 16:46 ` Jonathan Nieder
     [not found]   ` <20110522173900.GG6142@port70.net>
2011-05-22 17:41     ` Jonathan Nieder
2011-07-07  7:22   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).