Changeset 219 in Main for trunk/Server


Ignore:
Timestamp:
Oct 3, 2024, 5:40:37 AM (6 weeks ago)
Author:
Nishi
Message:

add watcom

Location:
trunk/Server
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/http.c

    r215 r219  
    1616#include <string.h>
    1717
    18 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     18#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    1919#include <winsock2.h>
    2020#else
  • trunk/Server/main.c

    r215 r219  
    790790        cm_force_log(r);
    791791        free(r);
    792 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__)
     792#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__)
    793793        signal(SIGCHLD, SIG_IGN);
    794794        signal(SIGPIPE, SIG_IGN);
  • trunk/Server/module.c

    r217 r219  
    2727#else
    2828
    29 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     29#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    3030#include <windows.h>
    3131#include <direct.h>
     
    3838        void* lib;
    3939        chdir(config.server_root);
    40 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     40#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    4141        lib = LoadLibraryA(path);
    4242#else
     
    5252
    5353void* 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__)
    5555        return GetProcAddress(mod, sym);
    5656#else
  • trunk/Server/server.c

    r216 r219  
    3333#include <cm_dir.h>
    3434
    35 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     35#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    3636#ifndef NO_GETADDRINFO
    3737#include <ws2tcpip.h>
     
    8585int sockets[MAX_PORTS];
    8686
    87 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     87#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    8888const 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"};
    8989#endif
     
    112112
    113113void close_socket(int sock) {
    114 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     114#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    115115        closesocket(sock);
    116116#else
     
    121121int tw_server_init(void) {
    122122        int i;
    123 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     123#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    124124        WSADATA wsa;
    125125        WSAStartup(MAKEWORD(2, 0), &wsa);
     
    450450};
    451451
    452 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     452#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    453453#define NO_RETURN_THREAD
    454454void tw_server_pass(void* ptr) {
     
    458458int tw_server_pass(void* ptr) {
    459459#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__)
    461461#define FREE_PTR
    462462        int sock = ((struct pass_entry*)ptr)->sock;
     
    552552                                        struct tm* btm;
    553553                                        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__)
    555555                                        t = 0;
    556556                                        btm = localtime(&t);
     
    619619                        path = cm_strcat(vhost_entry->root == NULL ? "" : vhost_entry->root, req.path);
    620620                        cm_log("Server", "Filesystem path is %s", path);
    621 #if defined(_MSC_VER) || defined(__BORLANDC__)
     621#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    622622                        for(i = strlen(path) - 1; i >= 0; i--) {
    623623                                if(path[i] == '/') {
     
    628628                        }
    629629#endif
    630 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     630#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    631631                        rpath = cm_strdup(path);
    632632                        for(i = strlen(rpath) - 1; i >= 0; i--) {
     
    899899#endif
    900900        close_socket(sock);
    901 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     901#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    902902        _endthread();
    903903#elif defined(__HAIKU__)
     
    914914#endif
    915915
    916 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__)
     916#if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    917917struct thread_entry {
    918918#ifdef __HAIKU__
     
    933933        struct timeval tv;
    934934#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__)
    936936        struct thread_entry threads[2048];
    937937        for(i = 0; i < sizeof(threads) / sizeof(threads[0]); i++) {
     
    964964#endif
    965965                if(ret == -1) {
    966 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__)
     966#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__)
    967967                        cm_log("Server", "Select failure: %s", strerror(errno));
    968968#endif
     
    988988                                        socklen_t clen = sizeof(claddr);
    989989                                        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__)
    991991                                        int j;
    992992                                        struct pass_entry* e = malloc(sizeof(*e));
     
    10011001                                        e->addr = claddr;
    10021002#endif
    1003 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     1003#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    10041004                                        _beginthread(tw_server_pass, 0, e);
    10051005#elif defined(_PSP) || defined(__PPU__)
  • trunk/Server/strptime.c

    r215 r219  
    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__)
     38#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    3939
    4040#include <ctype.h>
  • trunk/Server/tw_config.h

    r215 r219  
    1515#include <stdbool.h>
    1616
    17 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
     17#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    1818#include <winsock2.h>
    1919#define NO_IPV6
  • trunk/Server/version.c

    r215 r219  
    1717    "Windows-MinGW32"
    1818#elif defined(_MSC_VER)
    19     "Windows-MSVC"
     19    "Windows-VisualC"
    2020#elif defined(__BORLANDC__)
    21     "Windows-BCC"
     21    "Windows-Borland"
     22#elif defined(__WATCOMC__)
     23    "Windows-Watcom"
    2224#elif defined(__HAIKU__)
    2325    "Haiku"
Note: See TracChangeset for help on using the changeset viewer.