Changeset 315 in Main for trunk/Server/module.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/module.c

    r313 r315  
    3232#define INCL_DOSERRORS
    3333#include <os2.h>
     34#elif defined(__NETWARE__)
     35#include <nwadv.h>
     36#include <nwthread.h>
    3437#else
    3538#include <windows.h>
     
    4649#ifdef __OS2__
    4750        HMODULE mod;
     51#elif defined(__NETWARE__)
     52        unsigned int* hnd = malloc(sizeof(*hnd));
    4853#endif
    4954        chdir(config.server_root);
    5055#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
    5156#ifdef __OS2__
    52         if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR){
     57        if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR) {
    5358                return NULL;
    5459        }
    5560        lib = (void*)mod;
     61#elif defined(__NETWARE__)
     62        *hnd = FindNLMHandle(path);
     63        lib = (void*)hnd;
    5664#else
    5765        lib = LoadLibraryA(path);
     
    7381        void* ret;
    7482        APIRET rc;
    75         if((rc = DosQueryProcAddr((HMODULE)mod, 0, sym, (PFN*)&ret)) != NO_ERROR){
     83        if((rc = DosQueryProcAddr((HMODULE)mod, 0, sym, (PFN*)&ret)) != NO_ERROR) {
    7684                cm_log("Module", "OS/2 error %d", (int)rc);
    7785                return NULL;
    7886        }
    7987        return ret;
     88#elif defined(__NETWARE__)
     89        return ImportSymbol(*(unsigned int*)mod, sym);
    8090#else
    8191        return GetProcAddress(mod, sym);
Note: See TracChangeset for help on using the changeset viewer.