]> Nishi Git Mirror - tewi.git/commitdiff
fix
authorNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 17:49:31 +0000 (17:49 +0000)
committerNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 17:49:31 +0000 (17:49 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@214 8739d7e6-ffea-ec47-b151-bdff447c6205

Platform/vc6.mk
Server/server.c
Server/version.c

index f1cfa26071c6ada6520aea5b8745c23580f77d93..8e065528da01f08b5c55827574e7de25c8b71fcf 100644 (file)
@@ -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
index 6b464a8dda3df3318fecc17bf3fadcde8a548e46..c8a2634d7b62504914cbfa073d776d90e8adf875 100644 (file)
@@ -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
index 1e15710642578d8a2a3174739d641cfe062fa6c0..4aa7c1e11d8ddde6efa84f1dacdff4e1a78e1c30 100644 (file)
@@ -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__)