#ifndef SLTDL_COMPAT_H
#define SLTDL_COMPAT_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************/
/*                                                                 */
/* additional macros for projects that depend on ltdl's interfaces */
/*                                                                 */
/*******************************************************************/

#define LT_ERROR_OK                              SLTDL_ERR_OK
#define LT_ERROR_SYSTEM_ERROR                    SLTDL_ERR_SYSTEM_ERROR
#define LT_ERROR_DLFCN_ERROR                     SLTDL_ERR_DLFCN_ERROR
#define LT_ERROR_SLTDL_ERROR                     SLTDL_ERR_SLTDL_ERROR
#define LT_ERROR_DLEXIT_REF_COUNT                SLTDL_ERR_DLEXIT_REF_COUNT
#define LT_ERROR_MODULE_REF_COUNT                SLTDL_ERR_MODULE_REF_COUNT
#define LT_ERROR_MODULE_PTR_INVALID              SLTDL_ERR_MODULE_PTR_INVALID
#define LT_ERROR_PATH_INVALID_FIRST_CHAR         SLTDL_ERR_PATH_INVALID_FIRST_CHAR
#define LT_ERROR_PATH_INVALID_SEPARATTOR_CHAR    SLTDL_ERR_PATH_INVALID_SEPARATTOR_CHAR
#define LT_ERROR_PATH_INVALID_MARK               SLTDL_ERR_PATH_INVALID_MARK
#define LT_ERROR_PATH_INVALID_LEN                SLTDL_ERR_PATH_INVALID_LEN
#define LT_ERROR_PATH_NO_ENTRY                   SLTDL_ERR_PATH_NO_ENTRY
#define LT_ERROR_CANNOT_OPEN                     SLTDL_ERR_CANNOT_OPEN
#define LT_ERROR_CANNOT_CLOSE                    SLTDL_ERR_CANNOT_CLOSE
#define LT_ERROR_SYMBOL_NOT_FOUND                SLTDL_ERR_SYMBOL_NOT_FOUND

#define LTDL_SET_PRELOADED_SYMBOLS()             lt_dlpreload_modctl(              \
	                                                 lt_preloaded_symbols,      \
	                                                 SLTDL_MODCTL_PRELOAD_DEFAULT)


#ifdef __cplusplus
}
#endif

#endif
