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


Ignore:
Timestamp:
Oct 14, 2024, 7:01:02 PM (5 weeks ago)
Author:
Nishi
Message:

wip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/server.c

    r314 r315  
    4848#endif
    4949
    50 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))
     50#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
    5151#ifndef NO_GETNAMEINFO
    5252#include <ws2tcpip.h>
     
    6363#include "strptime.h"
    6464typedef int socklen_t;
     65#elif defined(__NETWARE__)
     66#include <sys/socket.h>
     67#include <nwthread.h>
     68
     69typedef int socklen_t;
     70#define IPPROTO_TCP 0
     71#define INADDR_ANY 0
     72#define htons(x) x
     73#include "strptime.h"
    6574#else
    6675#ifdef USE_POLL
     
    137146#ifdef __OS2__
    138147        soclose(sock);
     148#elif defined(__NETWARE__)
     149        shutdown(sock, 2);
    139150#elif defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    140151        closesocket(sock);
     
    146157int tw_server_init(void) {
    147158        int i;
    148 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))
     159#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
    149160        WSADATA wsa;
    150161#ifdef USE_WINSOCK1
     
    522533        struct sockaddr* sa = (struct sockaddr*)&addr;
    523534        getnameinfo(sa, sizeof(addr), address, 512, NULL, 0, NI_NUMERICHOST);
    524 #else
    525                 addrstr = inet_ntoa(addr.sin_addr);
    526                 strcpy(address, addrstr);
    527                 address[strlen(addrstr)] = 0;
     535#elif defined(__NETWARE__)
     536                address[0] = 0;
     537#else
     538        addrstr = inet_ntoa(addr.sin_addr);
     539        strcpy(address, addrstr);
     540        address[strlen(addrstr)] = 0;
    528541#endif
    529542#ifdef FREE_PTR
     
    632645                        tw_mod_request_t mod_req = (tw_mod_request_t)tw_module_symbol(config.modules[i], "MOD_REQUEST");
    633646#else
    634                         tw_mod_request_t mod_req = (tw_mod_request_t)tw_module_symbol(config.modules[i], "mod_request");
     647                                tw_mod_request_t mod_req = (tw_mod_request_t)tw_module_symbol(config.modules[i], "mod_request");
    635648#endif
    636649                        if(mod_req != NULL) {
     
    941954        close_socket(sock);
    942955#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
     956#ifdef __NETWARE__
     957        ExitThread(EXIT_THREAD, 0);
     958#else
    943959        _endthread();
     960#endif
    944961#elif defined(__HAIKU__)
    945962                exit_thread(0);
     
    959976#ifdef __HAIKU__
    960977        thread_id thread;
     978#elif defined(__NETWARE__)
     979        int thread;
    961980#else
    962981        HANDLE handle;
     
    10461065#ifdef __OS2__
    10471066                                        _beginthread(tw_server_pass, 0, 0, e);
     1067#elif defined(__NETWARE__)
     1068                                        BeginThread(tw_server_pass, 0, 0, e);
    10481069#else
    10491070                                        _beginthread(tw_server_pass, 0, e);
Note: See TracChangeset for help on using the changeset viewer.