/[tewi]/Server/module.c
ViewVC logotype

Diff of /Server/module.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by nishi, Thu Oct 17 09:53:39 2024 UTC Revision 1.3 by nishi, Tue Nov 19 07:55:13 2024 UTC
# Line 17  Line 17 
17    
18  extern struct tw_config config;  extern struct tw_config config;
19    
20  #if defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(__NeXT__) || defined(__DOS__)  #if defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(__NeXT__) || defined(__DOS__) || defined(__amiga__)
21  void* tw_module_load(const char* path) { return NULL; }  void* tw_module_load(const char* path) { return NULL; }
22    
23  void* tw_module_symbol(void* mod, const char* sym) { return NULL; }  void* tw_module_symbol(void* mod, const char* sym) { return NULL; }
# Line 51  void* tw_module_load(const char* path) { Line 51  void* tw_module_load(const char* path) {
51  #elif defined(__NETWARE__)  #elif defined(__NETWARE__)
52          unsigned int* hnd = malloc(sizeof(*hnd));          unsigned int* hnd = malloc(sizeof(*hnd));
53  #endif  #endif
54    #ifndef WINCE
55          chdir(config.server_root);          chdir(config.server_root);
56    #endif
57  #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)  #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
58  #ifdef __OS2__  #ifdef __OS2__
59          if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR) {          if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR) {
# Line 66  void* tw_module_load(const char* path) { Line 68  void* tw_module_load(const char* path) {
68          }          }
69          lib = (void*)hnd;          lib = (void*)hnd;
70  #else  #else
71          lib = LoadLibraryA(path);          lib = LoadLibrary(path);
72  #endif  #endif
73  #else  #else
74          lib = dlopen(path, RTLD_LAZY);          lib = dlopen(path, RTLD_LAZY);
# Line 74  void* tw_module_load(const char* path) { Line 76  void* tw_module_load(const char* path) {
76          if(lib == NULL) {          if(lib == NULL) {
77                  cm_log("Module", "Could not load %s", path);                  cm_log("Module", "Could not load %s", path);
78          }          }
79    #ifndef WINCE
80          chdir(p);          chdir(p);
81    #endif
82          free(p);          free(p);
83          return lib;          return lib;
84  }  }
# Line 91  void* tw_module_symbol(void* mod, const Line 95  void* tw_module_symbol(void* mod, const
95          return ret;          return ret;
96  #elif defined(__NETWARE__)  #elif defined(__NETWARE__)
97          return ImportSymbol(*(unsigned int*)mod, sym);          return ImportSymbol(*(unsigned int*)mod, sym);
98    #elif defined(WINCE)
99            return GetProcAddressW(mod, sym);
100  #else  #else
101          return GetProcAddress(mod, sym);          return GetProcAddress(mod, sym);
102  #endif  #endif


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

nishi@yakumo.dev
ViewVC Help
Powered by ViewVC 1.3.0-dev