[Pachi] win32 build performance

Petr Baudis pasky at ucw.cz
Sun Jan 22 20:12:46 CET 2012


  Hi!

On Sun, Jan 22, 2012 at 02:00:45PM +0800, linfk wrote:
> Here is the patch for existing pachi files.
> 
> Some short explanations for what I've done:
> code base: http://repo.or.cz/w/pachi.git/snapshot/pachi-9.01-hakugen.tar.gz
> environment : mingw gcc 4.6.2 bundled with Dev-C++ 5.1.0.0.
> src changes:
>     alloca() to _alloca()
>     inet_ntop() to inet_ntoa()
>     POSIX socket headers to winsock2 headers
>     nanosleep() and sleep() to Sleep()
>     __sync_fetch_and_add() to InterlockedExchangeAdd()
>     the preprocessor cannot expand "foreach_free_point" correctly in wolf.c. So I manually expanded it.
>     see the patch for detail
> linked lib: libpthread and libws2_32
> 
> I found dlfcn and strcasestr are missing. So I used:
>     dlfcn header and implementation. http://code.google.com/p/dlfcn-win32/
>     strcasestr implementation. http://www.koders.com/c/fid798A0739421823ED85D3B691E2B8C20CA354D5C9.aspx
> Maybe they are available in other mingw version.

  Excellent, thanks for the patch! I have split it to few commits on the
win32 git branch, could you please give that a try if I didn't mess
anything up?

  About the crashes, I don't see what is going wrong. I guess there is
no way around just sitting down with a debugger, hopefully now more
people will be able to give that a try.

  I assume the Makefile will need some tweaks as well - the changes
could be in a similar vein as for MACOSX. I will try to get something
started later tonight if noone beats me to it but I have to completely
rely to feedback of you guys. :-)

  Best,

-- 
				Petr "Pasky" Baudis
	The goal of Computer Science is to build something that will
	last at least until we've finished building it.


More information about the Pachi mailing list