summaryrefslogtreecommitdiffstats
path: root/src/lilv_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-12-11 14:30:13 -0500
committerDavid Robillard <d@drobilla.net>2024-12-11 14:57:06 -0500
commit8ce82a873ac1667ee4cbdc83b812a91e4ada0edf (patch)
tree9b9ca40afd075df80d5addc7a1408a70a0755687 /src/lilv_internal.h
parentb1b2a693ba14627a2170cecfd7ece313224888cd (diff)
downloadlilv-8ce82a873ac1667ee4cbdc83b812a91e4ada0edf.tar.gz
lilv-8ce82a873ac1667ee4cbdc83b812a91e4ada0edf.tar.bz2
lilv-8ce82a873ac1667ee4cbdc83b812a91e4ada0edf.zip
Add dylib abstraction to isolate platform-specific code
Diffstat (limited to 'src/lilv_internal.h')
-rw-r--r--src/lilv_internal.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index 3693f8a..6dc47ee 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -23,20 +23,11 @@ extern "C" {
#ifdef _WIN32
# include <direct.h>
# include <windows.h>
-# define dlopen(path, flags) LoadLibrary(path)
-# define dlclose(lib) FreeLibrary((HMODULE)lib)
# ifdef _MSC_VER
# ifndef snprintf
# define snprintf _snprintf
# endif
# endif
-static inline const char*
-dlerror(void)
-{
- return "Unknown error";
-}
-#else
-# include <dlfcn.h>
#endif
#ifdef LILV_DYN_MANIFEST
@@ -399,21 +390,6 @@ lilv_find_free_path(const char* in_path,
bool (*exists)(const char*, const void*),
const void* user_data);
-typedef void (*LilvVoidFunc)(void);
-
-/** dlsym wrapper to return a function pointer (without annoying warning) */
-static inline LilvVoidFunc
-lilv_dlfunc(void* handle, const char* symbol)
-{
-#ifdef _WIN32
- return (LilvVoidFunc)GetProcAddress((HMODULE)handle, symbol);
-#else
- typedef LilvVoidFunc (*VoidFuncGetter)(void*, const char*);
- VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym;
- return dlfunc(handle, symbol);
-#endif
-}
-
#ifdef LILV_DYN_MANIFEST
static const LV2_Feature* const dman_features = {NULL};