Changeset 359 in Main for trunk/Server/main.c


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

add dos supportr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.