[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] socket support for Windows: patch
From: |
Paul Pogonyshev |
Subject: |
Re: [gnugo-devel] socket support for Windows: patch |
Date: |
Fri, 17 Dec 2004 04:44:58 +0200 |
User-agent: |
KMail/1.4.3 |
Arend wrote:
> On Thu, 16 Dec 2004, wrote:
> > Paul wrote:
> > > This is much more difficult to overcome than I expected. The main
> > > complication is around gprintf() that is used for e.g. "%1m" output.
> > > It is completely unaware of the need to not use `stdio.h' functions.
> > > Does anyone has any clever ideas? With what I can think of, the
> > > patch quickly starts spreading all over GNU Go.
> >
> > I don't have any clever ideas but as a general comment I don't think
> > we should go out of our way to support C environments which are so
> > badly designed that you can't do anything useful with standard IO.
>
> On the other hand, I think it would be useful to have a working version
> of gtp.c that can easily be used for windows programs (that do not run
> in DOS-mode as gnugo).
Vadim suggested a hackish solution: #define fprintf (and a few other
functions) to some internal implementation. Those will use normal stdio
functions for everything but `gtp_output_file'. Of course, this will
only be done for insane (as opposed to sane ;) platforms.
Side effect will be that the Windows socket handling code will be
toppled down to a very low level (maybe even to `utils/') and the GTP
code will not be directly affected in any way (except maybe in the
`gtp.h' file.)
Does this sound like a tolerable solution?
Paul