Changeset 402 in Main for trunk/Server/server.c


Ignore:
Timestamp:
Nov 3, 2024, 7:39:59 PM (12 days ago)
Author:
Nishi
Message:

amiga

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/server.c

    r401 r402  
    1515#include "tw_module.h"
    1616#include "tw_version.h"
     17
     18#ifdef __amiga__
     19#include <pthread.h>
     20#endif
    1721
    1822#if !defined(_MSC_VER) && !defined(__BORLANDC__)
     
    108112#endif
    109113
    110 #if defined(_PSP) || defined(__ps2sdk__) || defined(__bsdi__)
     114#if defined(_PSP) || defined(__ps2sdk__) || defined(__bsdi__) || defined(__amiga__)
    111115#include "strptime.h"
    112116#endif
     
    516520#define NO_RETURN_THREAD
    517521void tw_server_pass(void* ptr) {
     522#elif defined(__amiga__)
     523void* tw_server_pass(void* ptr) {
    518524#elif defined(__HAIKU__)
    519525int32_t tw_server_pass(void* ptr) {
     
    521527int tw_server_pass(void* ptr) {
    522528#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__)
    524530#define FREE_PTR
    525531        int sock = ((struct pass_entry*)ptr)->sock;
     
    622628                                        struct tm* btm;
    623629                                        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__)
    625631                                        t = 0;
    626632                                        btm = localtime(&t);
     
    10561062#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__)
    10571063                        if(errno == EINTR) continue;
    1058                         cm_log("Server", "Select failure: %s", strerror(errno));
     1064                        cm_log("Server", "Select/poll failure: %s", strerror(errno));
    10591065#endif
    10601066                        break;
     
    10791085                                        socklen_t clen = sizeof(claddr);
    10801086                                        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
    10821091                                        int j;
    10831092                                        struct pass_entry* e = malloc(sizeof(*e));
     
    11041113#elif defined(_PSP) || defined(__PPU__)
    11051114                                                tw_server_pass(e);
     1115#elif defined(__amiga__)
     1116                                        pthread_create(&thrt, NULL, tw_server_pass, e);
    11061117#elif defined(__HAIKU__)
    11071118                                        for(j = 0; j < sizeof(threads) / sizeof(threads[0]); j++) {
Note: See TracChangeset for help on using the changeset viewer.