Changeset 312 in Main for trunk/Server/server.c
- Timestamp:
- Oct 14, 2024, 3:17:37 AM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/server.c
r311 r312 19 19 #include <unistd.h> 20 20 #endif 21 #include <ctype.h> 21 22 #include <string.h> 22 23 #include <stdbool.h> … … 33 34 #include <cm_dir.h> 34 35 36 #ifdef __OS2__ 37 #include <types.h> 38 #include <sys/time.h> 39 #define INCL_DOSPROCESS 40 #include <os2.h> 41 #include <process.h> 42 #define HANDLE void* 43 44 #include "strptime.h" 45 typedef int socklen_t; 46 47 #include <tcpustd.h> 48 #endif 49 35 50 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__)) 36 51 #ifndef NO_GETNAMEINFO … … 109 124 } else if(*pw == '*') { 110 125 return *(pw + 1) == 0 || tw_wildcard_match(pw, pt + 1) || tw_wildcard_match(pw + 1, pt); 111 } else if(*pw == '?' || ( *pw == *pt)) {126 } else if(*pw == '?' || (tolower(*pw) == tolower(*pt))) { 112 127 pw++; 113 128 pt++; … … 120 135 121 136 void close_socket(int sock) { 122 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 137 #ifdef __OS2__ 138 soclose(sock); 139 #elif defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 123 140 closesocket(sock); 124 141 #else … … 129 146 int tw_server_init(void) { 130 147 int i; 131 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)148 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__)) 132 149 WSADATA wsa; 133 150 #ifdef USE_WINSOCK1 … … 136 153 WSAStartup(MAKEWORD(2, 0), &wsa); 137 154 #endif 155 #endif 156 #ifdef __OS2__ 157 sock_init(); 138 158 #endif 139 159 for(i = 0; config.ports[i] != -1; i++) … … 1020 1040 #endif 1021 1041 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 1042 #ifdef __OS2__ 1043 _beginthread(tw_server_pass, 0, 0, e); 1044 #else 1022 1045 _beginthread(tw_server_pass, 0, e); 1046 #endif 1023 1047 #elif defined(_PSP) || defined(__PPU__) 1024 1048 tw_server_pass(e);
Note:
See TracChangeset
for help on using the changeset viewer.