Changeset 402 in Main for trunk/Server/server.c
- Timestamp:
- Nov 3, 2024, 7:39:59 PM (12 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/server.c
r401 r402 15 15 #include "tw_module.h" 16 16 #include "tw_version.h" 17 18 #ifdef __amiga__ 19 #include <pthread.h> 20 #endif 17 21 18 22 #if !defined(_MSC_VER) && !defined(__BORLANDC__) … … 108 112 #endif 109 113 110 #if defined(_PSP) || defined(__ps2sdk__) || defined(__bsdi__) 114 #if defined(_PSP) || defined(__ps2sdk__) || defined(__bsdi__) || defined(__amiga__) 111 115 #include "strptime.h" 112 116 #endif … … 516 520 #define NO_RETURN_THREAD 517 521 void tw_server_pass(void* ptr) { 522 #elif defined(__amiga__) 523 void* tw_server_pass(void* ptr) { 518 524 #elif defined(__HAIKU__) 519 525 int32_t tw_server_pass(void* ptr) { … … 521 527 int tw_server_pass(void* ptr) { 522 528 #endif 523 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 529 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__amiga__) 524 530 #define FREE_PTR 525 531 int sock = ((struct pass_entry*)ptr)->sock; … … 622 628 struct tm* btm; 623 629 strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm); 624 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__USLC__) || defined(__NeXT__) || defined(__bsdi__) 630 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__USLC__) || defined(__NeXT__) || defined(__bsdi__) || defined(__amiga__) 625 631 t = 0; 626 632 btm = localtime(&t); … … 1056 1062 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__) 1057 1063 if(errno == EINTR) continue; 1058 cm_log("Server", "Select failure: %s", strerror(errno));1064 cm_log("Server", "Select/poll failure: %s", strerror(errno)); 1059 1065 #endif 1060 1066 break; … … 1079 1085 socklen_t clen = sizeof(claddr); 1080 1086 int sock = accept(sockets[i], (struct sockaddr*)&claddr, &clen); 1081 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 1087 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) || defined(__PPU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__amiga__) 1088 #ifdef __amiga__ 1089 pthread_t thrt; 1090 #endif 1082 1091 int j; 1083 1092 struct pass_entry* e = malloc(sizeof(*e)); … … 1104 1113 #elif defined(_PSP) || defined(__PPU__) 1105 1114 tw_server_pass(e); 1115 #elif defined(__amiga__) 1116 pthread_create(&thrt, NULL, tw_server_pass, e); 1106 1117 #elif defined(__HAIKU__) 1107 1118 for(j = 0; j < sizeof(threads) / sizeof(threads[0]); j++) {
Note:
See TracChangeset
for help on using the changeset viewer.