16 #ifndef JM_PORTABILITY_H_ 17 #define JM_PORTABILITY_H_ 22 #if defined(_MSC_VER) || defined(WIN32) || defined(__MINGW32__) 24 #define DLL_HANDLE HANDLE 26 #define DLL_HANDLE void* 50 #define jm_dll_function_ptr FARPROC 136 #define JM_VA_COPY va_copy 137 #elif defined(HAVE___VA_COPY) 138 #define JM_VA_COPY __va_copy 140 #define JM_VA_COPY(dest,src) dest=src
char * jm_portability_get_last_dll_error(void)
Return error associated with Dll handling.
Library configuration file generated by the build system.
char * jm_create_URL_from_abs_path(jm_callbacks *cb, const char *absPath)
Create a file:// URL from absolute path.
jm_status_enu_t jm_rmdir(jm_callbacks *cb, const char *dir)
Remove directory and all it contents.
FMILIB_EXPORT int jm_snprintf(char *str, size_t size, const char *fmt,...)
C89 compatible implementation of C99 snprintf.
jm_status_enu_t jm_portability_get_current_working_directory(char *buffer, size_t len)
Get current working directory name.
char * jm_mk_temp_dir(jm_callbacks *cb, const char *systemTempDir, const char *tempPrefix)
Create a unique temporary directory.
void * jm_dll_function_ptr
A function pointer as returned when DLL symbol is loaded.
DLL_HANDLE jm_portability_load_dll_handle(const char *dll_file_path)
Load a dll/so library into the process and return a handle.
#define FMILIB_EXPORT
Used to declare the public API of the library needed for dynamic linking.
The callbacks struct is sent to all the modules in the library.
char * jm_get_dir_abspath(jm_callbacks *cb, const char *dir, char *outPath, size_t len)
Get absolute path to an existing directory.
jm_status_enu_t jm_mkdir(jm_callbacks *cb, const char *dir)
Make a directory.
jm_status_enu_t jm_portability_free_dll_handle(DLL_HANDLE dll_handle)
Unload a Dll and release the handle.
jm_status_enu_t
Return status codes.
const char * jm_get_system_temp_dir()
Get system-wide temporary directory.
jm_status_enu_t jm_portability_set_current_working_directory(const char *cwd)
Set current working directory.
jm_status_enu_t jm_portability_load_dll_function(DLL_HANDLE dll_handle, char *dll_function_name, jm_dll_function_ptr *dll_function_ptrptr)
Find a function in the Dll and return a function pointer.
char * jm_mkdtemp(jm_callbacks *cb, char *tmplt)
Create a uniquely named temporary directory.
FMILIB_EXPORT int jm_vsnprintf(char *str, size_t size, const char *fmt, va_list al)
C89 compatible implementation of C99 vsnprintf.