Changeset 359 in Main


Ignore:
Timestamp:
Oct 16, 2024, 11:34:51 PM (4 weeks ago)
Author:
Nishi
Message:

add dos supportr

Location:
trunk
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/README

    r358 r359  
    4747UnixWare                 Working on 7.1.1
    4848OS/2                     Working
     49DOS                      Working, missing module support and multi-threading
    4950NeXTSTEP                 Working, missing module support
    5051PlayStation Portable     Working, missing module support
  • trunk/README.tmpl

    r358 r359  
    4747UnixWare                 Working on 7.1.1
    4848OS/2                     Working
     49DOS                      Working, missing module support and multi-threading
    4950NeXTSTEP                 Working, missing module support
    5051PlayStation Portable     Working, missing module support
  • trunk/Server/config.c

    r349 r359  
    1515#endif
    1616
    17 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
     17#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__))
    1818#ifdef USE_WINSOCK1
    1919#include <winsock.h>
  • trunk/Server/http.c

    r349 r359  
    2222#endif
    2323
    24 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
     24#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__))
    2525#ifdef USE_WINSOCK1
    2626#include <winsock.h>
  • trunk/Server/main.c

    r349 r359  
    2828#endif
    2929
     30#ifdef __DOS__
     31#include <tcp.h>
     32#endif
     33
    3034#include <cm_log.h>
    3135#include <cm_string.h>
     
    3539#include "tw_version.h"
    3640
    37 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
     41#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__))
    3842#include <windows.h>
    3943#elif defined(__NETWARE__)
     
    9498int startup(int argc, char** argv);
    9599
    96 #if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) || defined(__BORLANDC__)
     100#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__)) || defined(__BORLANDC__)
    97101char* get_registry(const char* main, const char* sub) {
    98102        DWORD bufsize = 512;
     
    751755        int i;
    752756        char* r;
    753 #if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) || defined(__BORLANDC__)
     757#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__)) || defined(__BORLANDC__)
    754758        char* confpath = cm_strdup(PREFIX "/etc/tewi.conf");
    755759        char* regpath = get_registry("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Tewi HTTPd", "InstallDir");
     
    824828                return 1;
    825829        }
     830#ifdef __DOS__
     831        sock_init();
     832#endif
    826833        if(tw_server_init() != 0) {
    827834                STDERR_LOG("Could not initialize the server\n");
     
    835842        signal(SIGCHLD, SIG_IGN);
    836843        signal(SIGPIPE, SIG_IGN);
    837 #elif !defined(BUILD_GUI) && !defined(__OS2__) && !defined(__NETWARE__)
     844#elif !defined(BUILD_GUI) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__)
    838845        SetConsoleTitle(tw_server);
    839846#endif
  • trunk/Server/module.c

    r349 r359  
    1818extern struct tw_config config;
    1919
    20 #if defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(__NeXT__)
     20#if defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(__NeXT__) || defined(__DOS__)
    2121void* tw_module_load(const char* path) { return NULL; }
    2222
  • trunk/Server/server.c

    r349 r359  
    4848#endif
    4949
    50 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
     50#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__))
    5151#ifndef NO_GETNAMEINFO
    5252#include <ws2tcpip.h>
     
    7171#include "strptime.h"
    7272typedef int socklen_t;
     73#elif defined(__DOS__)
     74#include <netinet/tcp.h>
     75#include <netinet/in.h>
     76#include <arpa/inet.h>
     77#include <sys/select.h>
     78
     79#include "strptime.h"
    7380#else
    7481#ifdef USE_POLL
     
    167174int tw_server_init(void) {
    168175        int i;
    169 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
     176#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__))
    170177        WSADATA wsa;
    171178#ifdef USE_WINSOCK1
     
    965972#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    966973#ifdef __NETWARE__
     974#elif defined(__DOS__)
    967975#else
    968976        _endthread();
     
    987995#elif defined(__NETWARE__)
    988996        int thread;
     997#elif defined(__DOS__)
    989998#else
    990999        HANDLE handle;
     
    10751084                                        _beginthread(tw_server_pass, 0, 0, e);
    10761085#elif defined(__NETWARE__)
     1086                                        tw_server_pass(e);
     1087#elif defined(__DOS__)
    10771088                                        tw_server_pass(e);
    10781089#else
  • trunk/Server/strptime.c

    r344 r359  
    470470                    continue;
    471471                }
    472 #if defined(_WIN32) || defined(__OS2__) || defined(__NeXT__)
     472#if defined(_WIN32) || defined(__OS2__) || defined(__NeXT__) || defined(__DOS__)
    473473#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__NeXT__)
    474474                if (1)
  • trunk/Server/strptime.h

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

    r349 r359  
    1818#endif
    1919
    20 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
     20#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__) && !defined(__DOS__))
    2121#ifdef USE_WINSOCK1
    2222#include <winsock.h>
  • trunk/Server/version.c

    r325 r359  
    2222#elif defined(__NETWARE__)
    2323    "NetWare"
     24#elif defined(__DOS__)
     25    "DOS"
    2426#elif defined(__MINGW32__)
    2527    "Windows-MinGW32"
  • trunk/config_platform.h

    r350 r359  
    7070#endif
    7171
     72#if defined(__WATCOMC__) && defined(__DOS__) && !defined(NO_IPV6)
     73#define NO_IPV6
     74#endif
     75
    7276#if defined(__NeXT__) && !defined(NO_IPV6)
    7377#define NO_IPV6
Note: See TracChangeset for help on using the changeset viewer.