From 50246da711770d8dbec72cea9dd6fd59467fb069 Mon Sep 17 00:00:00 2001 From: Nishi Date: Wed, 2 Oct 2024 17:49:31 +0000 Subject: [PATCH] fix git-svn-id: file:///raid/svn-personal/tewi/trunk@214 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Platform/vc6.mk | 4 +++- Server/server.c | 6 +++--- Server/version.c | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Platform/vc6.mk b/Platform/vc6.mk index f1cfa26..8e06552 100644 --- a/Platform/vc6.mk +++ b/Platform/vc6.mk @@ -1,8 +1,10 @@ # $Id$ +PREFIX = C:/Tewi + CC = ../vc6.sh AR = lib -AR_FLAGS = /out: +AR_FLAGS = /nologo /out: CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I ../Common -fPIC LDFLAGS = LIBS = -lws2_32 -ladvapi32 -llibcmt diff --git a/Server/server.c b/Server/server.c index 6b464a8..c8a2634 100644 --- a/Server/server.c +++ b/Server/server.c @@ -166,11 +166,11 @@ int tw_server_init(void) { #ifdef NO_IPV6 addresses[i].sin_family = AF_INET; addresses[i].sin_addr.s_addr = INADDR_ANY; - addresses[i].sin_port = htons(config.ports[i]); + addresses[i].sin_port = htons(config.ports[i] & 0xffff); #else addresses[i].sin6_family = AF_INET6; addresses[i].sin6_addr = in6addr_any; - addresses[i].sin6_port = htons(config.ports[i]); + addresses[i].sin6_port = htons(config.ports[i] & 0xffff); #endif if(bind(sock, (struct sockaddr*)&addresses[i], sizeof(addresses[i])) < 0) { close_socket(sock); @@ -889,7 +889,7 @@ cleanup: #elif defined(__HAIKU__) exit_thread(0); #endif - ; + return 0; } #ifdef SERVICE diff --git a/Server/version.c b/Server/version.c index 1e15710..4aa7c1e 100644 --- a/Server/version.c +++ b/Server/version.c @@ -13,8 +13,10 @@ const char* tw_platform = "NetBSD" #elif defined(__linux__) "Linux" -#elif defined(__MINGW32__) || defined(_MSC_VER) - "Windows" +#elif defined(__MINGW32__) + "Windows-MinGW32" +#elif defined(_MSC_VER) + "Windows-MSVC" #elif defined(__HAIKU__) "Haiku" #elif defined(__CYGWIN__) -- 2.43.0