[Pachi] win32 build performance

linfk linfk at 163.com
Sun Jan 22 07:00:45 CET 2012


Hi, Petr

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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rover.ms.mff.cuni.cz/pipermail/pachi/attachments/20120122/b7e42cff/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winpatch.patch
Type: application/octet-stream
Size: 6367 bytes
Desc: not available
URL: <http://rover.ms.mff.cuni.cz/pipermail/pachi/attachments/20120122/b7e42cff/attachment.obj>


More information about the Pachi mailing list