Changeset 402 in Main for trunk/Server


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

amiga

Location:
trunk/Server
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/config.c

    r400 r402  
    134134#elif defined(__NETWARE__)
    135135        strcpy(config.hostname, "netware");
     136#elif defined(__amiga__)
     137        strcpy(config.hostname, "amiga");
    136138#else
    137139        gethostname(config.hostname, 1024);
  • trunk/Server/module.c

    r366 r402  
    1818extern struct tw_config config;
    1919
    20 #if defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(__NeXT__) || defined(__DOS__)
     20#if defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(__NeXT__) || defined(__DOS__) || defined(__amiga__)
    2121void* tw_module_load(const char* path) { return NULL; }
    2222
  • 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++) {
  • trunk/Server/strptime.c

    r382 r402  
    3636//__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $");
    3737
    38 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__NeXT__) || defined(__bsdi__)
     38#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__NeXT__) || defined(__bsdi__) || defined(__amiga__)
    3939
    4040#include <stdlib.h>
     
    116116#endif
    117117
    118 #ifdef __WATCOMC__
     118#if defined(__WATCOMC__)
    119119#define _tzset tzset
    120120#endif
     
    470470                    continue;
    471471                }
    472 #if defined(_WIN32) || defined(__OS2__) || defined(__NeXT__) || defined(__DOS__)
    473 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__NeXT__)
     472#if defined(_WIN32) || defined(__OS2__) || defined(__NeXT__) || defined(__DOS__) || defined(__amiga__)
     473#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__NeXT__) || defined(__amiga__)
    474474                if (1)
    475475#else
     
    561561#ifdef _WIN32
    562562            _tzset();
     563#elif defined(__amiga__)
    563564#else
    564565            tzset();
  • trunk/Server/strptime.h

    r380 r402  
    88#include <time.h>
    99
    10 #if defined(_WIN32) || defined(_PSP) || defined(__ps2sdk__) || defined(__OS2__) || defined(__NETWARE__) || defined(__NeXT__) || defined(__DOS__) || defined(__bsdi__)
     10#if defined(_WIN32) || defined(_PSP) || defined(__ps2sdk__) || defined(__OS2__) || defined(__NETWARE__) || defined(__NeXT__) || defined(__DOS__) || defined(__bsdi__) || defined(__amiga__)
    1111char* strptime(const char *buf, const char *fmt, struct tm *tm);
    1212#endif
  • trunk/Server/version.c

    r399 r402  
    2626#elif defined(__DOS__)
    2727    "DOS"
     28#elif defined(__amiga__)
     29    "Amiga"
    2830#elif defined(__MINGW32__)
    2931    "Windows-MinGW32"
Note: See TracChangeset for help on using the changeset viewer.