X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmono-dl.h;h=ac7747c8799f9f0f12b53613a2d9e45627d159fc;hb=eeb5d4c670b18885d4f575136e348df324c46de8;hp=869495cb5c516a6cd4c5b667018add3d44dadfd1;hpb=30532e61745c00839d0cb0ad6959819959b2df43;p=mono.git diff --git a/mono/utils/mono-dl.h b/mono/utils/mono-dl.h index 869495cb5c5..ac7747c8799 100644 --- a/mono/utils/mono-dl.h +++ b/mono/utils/mono-dl.h @@ -1,18 +1,53 @@ +/** + * \file + */ + #ifndef __MONO_UTILS_DL_H__ #define __MONO_UTILS_DL_H__ #include "mono/utils/mono-compiler.h" #include "mono/utils/mono-dl-fallback.h" -typedef struct _MonoDl MonoDl; +#ifdef TARGET_WIN32 +#define MONO_SOLIB_EXT ".dll" +#elif defined(__ppc__) && defined(TARGET_MACH) +#define MONO_SOLIB_EXT ".dylib" +#elif defined(TARGET_MACH) && defined(TARGET_X86) && !defined(__native_client_codegen__) +#define MONO_SOLIB_EXT ".dylib" +#elif defined(TARGET_MACH) && defined(TARGET_AMD64) && !defined(__native_client_codegen__) +#define MONO_SOLIB_EXT ".dylib" +#else +#define MONO_SOLIB_EXT ".so" +#endif + +typedef struct { + void *handle; + int main_module; + + /* If not NULL, use the methods in MonoDlFallbackHandler instead of the LL_* methods */ + MonoDlFallbackHandler *dl_fallback; +} MonoDl; + MonoDl* mono_dl_open (const char *name, int flags, char **error_msg) MONO_LLVM_INTERNAL; char* mono_dl_symbol (MonoDl *module, const char *name, void **symbol) MONO_LLVM_INTERNAL; void mono_dl_close (MonoDl *module) MONO_LLVM_INTERNAL; -char* mono_dl_build_path (const char *directory, const char *name, void **iter) MONO_INTERNAL; +char* mono_dl_build_path (const char *directory, const char *name, void **iter); + +MonoDl* mono_dl_open_runtime_lib (const char *lib_name, int flags, char **error_msg); + -MonoDl* mono_dl_open_runtime_lib (const char *lib_name, int flags, char **error_msg) MONO_INTERNAL; +//Platform API for mono_dl +const char* mono_dl_get_so_prefix (void); +const char** mono_dl_get_so_suffixes (void); +void* mono_dl_open_file (const char *file, int flags); +void mono_dl_close_handle (MonoDl *module); +void* mono_dl_lookup_symbol (MonoDl *module, const char *name); +int mono_dl_convert_flags (int flags); +char* mono_dl_current_error_string (void); +int mono_dl_get_executable_path (char *buf, int buflen); +const char* mono_dl_get_system_dir (void); #endif /* __MONO_UTILS_DL_H__ */