Changeset 212 in Main for trunk/Server/module.c


Ignore:
Timestamp:
Oct 3, 2024, 2:44:55 AM (6 weeks ago)
Author:
Nishi
Message:

compiles on vc6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/module.c

    r189 r212  
    1111
    1212#include <string.h>
     13#include <stdlib.h>
     14#ifndef _MSC_VER
    1315#include <unistd.h>
    14 #include <stdlib.h>
     16#endif
    1517
    1618extern struct tw_config config;
     
    2527#else
    2628
    27 #ifdef __MINGW32__
     29#if defined(__MINGW32__) || defined(_MSC_VER)
    2830#include <windows.h>
    2931#else
     
    3335void* tw_module_load(const char* path) {
    3436        char* p = getcwd(NULL, 0);
     37        void* lib;
    3538        chdir(config.server_root);
    36         void* lib;
    37 #ifdef __MINGW32__
     39#if defined(__MINGW32__) || defined(_MSC_VER)
    3840        lib = LoadLibraryA(path);
    3941#else
     
    4951
    5052void* tw_module_symbol(void* mod, const char* sym) {
    51 #ifdef __MINGW32__
     53#if defined(__MINGW32__) || defined(_MSC_VER)
    5254        return GetProcAddress(mod, sym);
    5355#else
Note: See TracChangeset for help on using the changeset viewer.