Changeset 219 in Main for trunk/Server
- Timestamp:
- Oct 3, 2024, 5:40:37 AM (6 weeks ago)
- Location:
- trunk/Server
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/http.c
r215 r219 16 16 #include <string.h> 17 17 18 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 18 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 19 19 #include <winsock2.h> 20 20 #else -
trunk/Server/main.c
r215 r219 790 790 cm_force_log(r); 791 791 free(r); 792 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) 792 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__) 793 793 signal(SIGCHLD, SIG_IGN); 794 794 signal(SIGPIPE, SIG_IGN); -
trunk/Server/module.c
r217 r219 27 27 #else 28 28 29 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 29 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 30 30 #include <windows.h> 31 31 #include <direct.h> … … 38 38 void* lib; 39 39 chdir(config.server_root); 40 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 40 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 41 41 lib = LoadLibraryA(path); 42 42 #else … … 52 52 53 53 void* tw_module_symbol(void* mod, const char* sym) { 54 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 54 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 55 55 return GetProcAddress(mod, sym); 56 56 #else -
trunk/Server/server.c
r216 r219 33 33 #include <cm_dir.h> 34 34 35 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 35 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 36 36 #ifndef NO_GETADDRINFO 37 37 #include <ws2tcpip.h> … … 85 85 int sockets[MAX_PORTS]; 86 86 87 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 87 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 88 88 const char* reserved_names[] = {"CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"}; 89 89 #endif … … 112 112 113 113 void close_socket(int sock) { 114 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 114 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 115 115 closesocket(sock); 116 116 #else … … 121 121 int tw_server_init(void) { 122 122 int i; 123 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 123 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 124 124 WSADATA wsa; 125 125 WSAStartup(MAKEWORD(2, 0), &wsa); … … 450 450 }; 451 451 452 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 452 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 453 453 #define NO_RETURN_THREAD 454 454 void tw_server_pass(void* ptr) { … … 458 458 int tw_server_pass(void* ptr) { 459 459 #endif 460 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) 460 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 461 461 #define FREE_PTR 462 462 int sock = ((struct pass_entry*)ptr)->sock; … … 552 552 struct tm* btm; 553 553 strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm); 554 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(_MSC_VER) || defined(__BORLANDC__) 554 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 555 555 t = 0; 556 556 btm = localtime(&t); … … 619 619 path = cm_strcat(vhost_entry->root == NULL ? "" : vhost_entry->root, req.path); 620 620 cm_log("Server", "Filesystem path is %s", path); 621 #if defined(_MSC_VER) || defined(__BORLANDC__) 621 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 622 622 for(i = strlen(path) - 1; i >= 0; i--) { 623 623 if(path[i] == '/') { … … 628 628 } 629 629 #endif 630 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 630 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 631 631 rpath = cm_strdup(path); 632 632 for(i = strlen(rpath) - 1; i >= 0; i--) { … … 899 899 #endif 900 900 close_socket(sock); 901 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 901 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 902 902 _endthread(); 903 903 #elif defined(__HAIKU__) … … 914 914 #endif 915 915 916 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) 916 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 917 917 struct thread_entry { 918 918 #ifdef __HAIKU__ … … 933 933 struct timeval tv; 934 934 #endif 935 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) 935 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 936 936 struct thread_entry threads[2048]; 937 937 for(i = 0; i < sizeof(threads) / sizeof(threads[0]); i++) { … … 964 964 #endif 965 965 if(ret == -1) { 966 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) 966 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__) 967 967 cm_log("Server", "Select failure: %s", strerror(errno)); 968 968 #endif … … 988 988 socklen_t clen = sizeof(claddr); 989 989 int sock = accept(sockets[i], (struct sockaddr*)&claddr, &clen); 990 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) 990 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 991 991 int j; 992 992 struct pass_entry* e = malloc(sizeof(*e)); … … 1001 1001 e->addr = claddr; 1002 1002 #endif 1003 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 1003 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 1004 1004 _beginthread(tw_server_pass, 0, e); 1005 1005 #elif defined(_PSP) || defined(__PPU__) -
trunk/Server/strptime.c
r215 r219 36 36 //__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $"); 37 37 38 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 38 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 39 39 40 40 #include <ctype.h> -
trunk/Server/tw_config.h
r215 r219 15 15 #include <stdbool.h> 16 16 17 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) 17 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 18 18 #include <winsock2.h> 19 19 #define NO_IPV6 -
trunk/Server/version.c
r215 r219 17 17 "Windows-MinGW32" 18 18 #elif defined(_MSC_VER) 19 "Windows- MSVC"19 "Windows-VisualC" 20 20 #elif defined(__BORLANDC__) 21 "Windows-BCC" 21 "Windows-Borland" 22 #elif defined(__WATCOMC__) 23 "Windows-Watcom" 22 24 #elif defined(__HAIKU__) 23 25 "Haiku"
Note:
See TracChangeset
for help on using the changeset viewer.