Changeset 312 in Main for trunk/Server/module.c
- Timestamp:
- Oct 14, 2024, 3:17:37 AM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/module.c
r219 r312 28 28 29 29 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 30 #ifdef __OS2__ 31 #define INCL_DOSMODULEMGR 32 #include <os2.h> 33 #else 30 34 #include <windows.h> 31 35 #include <direct.h> 36 #endif 32 37 #else 33 38 #include <dlfcn.h> … … 37 42 char* p = getcwd(NULL, 0); 38 43 void* lib; 44 char tmp[512]; 45 unsigned long l; 39 46 chdir(config.server_root); 40 47 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 48 #ifdef __OS2__ 49 lib = NULL; 50 l = (unsigned long)lib; 51 DosLoadModule(tmp, 512, path, &l); 52 #else 41 53 lib = LoadLibraryA(path); 54 #endif 42 55 #else 43 56 lib = dlopen(path, RTLD_LAZY); … … 53 66 void* tw_module_symbol(void* mod, const char* sym) { 54 67 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 68 #ifdef __OS2__ 69 void* ret; 70 DosQueryProcAddr((unsigned long)mod, 0, sym, (PFN*)&ret); 71 return ret; 72 #else 55 73 return GetProcAddress(mod, sym); 74 #endif 56 75 #else 57 76 return dlsym(mod, sym);
Note:
See TracChangeset
for help on using the changeset viewer.