Blame wrappers/dlfcn/dlfake.c

ac584a
#include "dlfake.h"
ac584a
#include "linkage/inittab.h"
ac584a
ac584a
extern struct _inittab _PyImport_Inittab[];
ac584a
ac584a
void * dlfake_dlopen(const char * name, int mode)
ac584a
{
ac584a
	struct _inittab * pyext;
ac584a
ac584a
	if (!name)
ac584a
		return _PyImport_Inittab;
ac584a
ac584a
	for (pyext=_PyImport_Inittab; pyext->name; pyext++)
ac584a
		if (!strcmp(name,pyext->name))
ac584a
			return _PyImport_Inittab;
ac584a
ac584a
	return 0;
ac584a
}
ac584a
ac584a
int dlfake_dlclose(void * handle)
ac584a
{
ac584a
	return -1;
ac584a
}
ac584a
ac584a
void * dlfake_dlsym(void * handle, const char * sym)
ac584a
{
ac584a
	return 0;
ac584a
}
ac584a
ac584a
static const char dlfake_errstr[] =
ac584a
	"dlfake_dlerror(): "
ac584a
	"not implemented";
ac584a
ac584a
char * dlfake_dlerror(void)
ac584a
{
ac584a
	return (char *)dlfake_errstr;
ac584a
}
ac584a
ac584a
int dlfake_dladdr(const void * addr, void * info)
ac584a
{
ac584a
	return 0;
ac584a
}