const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
+#ifdef INTERNAL
+void *INTERNAL(snd_dlopen)(const char *name, int mode, char *errbuf, size_t errbuflen);
+#endif
+
#endif
buf[len-1] = '\0';
func_name = buf;
}
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
func = h ? snd_dlsym(h, func_name, SND_DLSYM_VERSION(SND_CONFIG_DLSYM_VERSION_HOOK)) : NULL;
err = 0;
if (!h) {
buf[len-1] = '\0';
func_name = buf;
}
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h)
func = snd_dlsym(h, func_name, SND_DLSYM_VERSION(SND_CONFIG_DLSYM_VERSION_EVALUATE));
err = 0;
}
errbuf[0] = '\0';
- dlobj = snd_dlopen(lib, RTLD_NOW,
+ dlobj = INTERNAL(snd_dlopen)(lib, RTLD_NOW,
verbose ? errbuf : 0,
verbose ? sizeof(errbuf) : 0);
if (dlobj == NULL) {
#ifndef PIC
snd_hwdep_open_symbols();
#endif
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h)
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_HWDEP_DLSYM_VERSION));
err = 0;
#include <sys/ioctl.h>
#include <math.h>
#include <dlfcn.h>
-#include "config.h"
-#include "asoundlib.h"
+#include "mixer_local.h"
#include "mixer_simple.h"
#ifndef DOC_HIDDEN
strcpy(xlib, path);
strcat(xlib, "/");
strcat(xlib, lib);
- h = snd_dlopen(xlib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(xlib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h == NULL) {
SNDERR("Unable to open library '%s' (%s)", xlib, errbuf);
free(xlib);
strcat(xlib, "/");
strcat(xlib, lib);
/* note python modules requires RTLD_GLOBAL */
- h = snd_dlopen(xlib, RTLD_NOW|RTLD_GLOBAL, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(xlib, RTLD_NOW|RTLD_GLOBAL, errbuf, sizeof(errbuf));
if (h == NULL) {
SNDERR("Unable to open library '%s'", xlib);
free(xlib);
install = buf;
snprintf(buf, sizeof(buf), "_snd_pcm_hook_%s_install", str);
}
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
install_func = h ? snd_dlsym(h, install, SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION)) : NULL;
err = 0;
if (!h) {
open_name = buf;
snprintf(buf, sizeof(buf), "_snd_pcm_scope_%s_open", str);
}
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
open_func = h ? dlsym(h, open_name) : NULL;
err = 0;
if (!h) {
#ifndef PIC
snd_rawmidi_open_symbols();
#endif
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h)
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_RAWMIDI_DLSYM_VERSION));
err = 0;
#ifndef PIC
snd_seq_open_symbols();
#endif
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h)
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_SEQ_DLSYM_VERSION));
err = 0;
#ifndef PIC
snd_timer_open_symbols();
#endif
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h)
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_TIMER_DLSYM_VERSION));
err = 0;
#ifndef PIC
snd_timer_query_open_symbols();
#endif
- h = snd_dlopen(lib, RTLD_NOW, errbuf, sizeof(errbuf));
+ h = INTERNAL(snd_dlopen)(lib, RTLD_NOW, errbuf, sizeof(errbuf));
if (h)
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_TIMER_QUERY_DLSYM_VERSION));
err = 0;