diff options
| author | tomas <tomas@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-14 11:45:35 +0000 |
|---|---|---|
| committer | tomas <tomas@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-14 11:45:35 +0000 |
| commit | 8284a34173b34c0b6e5ffa9158dfceb4d286ecbc (patch) | |
| tree | 76083e7886d9a67bef3c845678f7e1af60e9a790 /src/base | |
| parent | e792ee9cbe5191fcc81273b65bdb4ac9108435d5 (diff) | |
- port net/ na win32
- pridany inet_ntop () a inet_pton () pro win32 kvuli kompatibilite zdrojoveho kodu
git-svn-id: http://opensvn.csie.org/tuxanci_ng@128 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/base/main.c b/src/base/main.c index ebc2018..60a6066 100644 --- a/src/base/main.c +++ b/src/base/main.c @@ -8,6 +8,11 @@ #include <assert.h> #include <sys/stat.h> +#ifdef __WIN32__ +# include <windows.h> +# include <wininet.h> +#endif + #include "main.h" #include "tux.h" @@ -122,6 +127,18 @@ int main(int argc, char *argv[]) exit(0); */ +#ifdef __WIN32__ + WORD wVersionRequested = MAKEWORD(1,1); // WinSock version + WSADATA data; // WinSock information structure + + /* Let's initialize WinSock */ + if( WSAStartup(wVersionRequested, &data) != 0 ) + { + fprintf(stderr, "WinSock initialization failed !\nProgram shutdown !\n"); + exit(-1); + } +#endif + #ifndef PUBLIC_SERVER startGame(); #endif |