That sounds like an OK idea to me. xboard has a long history and at one
time needed to be able to build with K&R and/or other older compilers. I
doubt there is any need for that anymore. I don't have a strong opinion on
exactly which version of the ANSI C standard would be best to target.

One thing to be careful of is that the code shared with WinBoard needs to
build with whatever Windows compiler(s) we care about. At one time that was
some old version of MSVC that I owned a copy of, then that plus gcc. HG
will hopefully weigh in on what compiler he uses.

On Thu, Mar 19, 2015 at 1:56 PM, Thomas Adam <[email protected]> wrote:

> Hello,
>
> I was looking at the XBoard code as I've a few patches I intend to send
> out, in the form of bugfixes and a few little features, etc., and in
> doing so have noticed a few things which have irritated me enough to ask
> some questions, as I'll likely do these first before anything else.  :)
>
> The INSTALL file alludes to some compilers (c89) being used---which if
> that were the case would likely fail.  Try this, for instance:
>
>     CFLAGS="-std=c89" ./configure && make
>
> The result is one of failure for all sorts of reasons.  Likewise, for
> c99:
>
>     CFLAGS="-std=c99" ./configure && make
>
> There are more failures.  I appreciate I've not been very specific as to
> which, but I'm curious which one you'd at least want to try and adhere
> to.
>
> More generally, there's a lot of older, err, "cruft" if I can call it
> that with a mixture of K&R/ANSI function protoypes, the use of the very
> old P() macro, etc., which makes me wonder any form of C standards
> compliance has largely been overshadowed.
>
> I'm very happy to audit the files in question and clean a lot of these
> things up (even as proof-of-concepts so you can see what the impact
> is), but I'd appreciate thoughts on this before I start wading through,
> as it's very easy to overshoot yourself and go beyond what's wanted.
>
> My own preference would be for ANSI across the board (no pun intended),
> and adherence to c89 so that we can then check to see if things can be
> modernised further, assuming we don't break older compilers.
>
> Thoughts?
>
> -- Thomas Adam
>
> --
> "Deep in my heart I wish I was wrong.  But deep in my heart I know I am
> not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)
>
>

Reply via email to