#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include MODULE = DLL PACKAGE = DLL SV * dlerror() CODE: RETVAL=newSVpv(dlerror(),0); void * dlopen(const char *path, int mode) PREINIT: void * handle; CODE: handle=dlopen(path, mode); if (!handle) { fputs (dlerror(), stderr); exit(1); } RETVAL=handle; OUTPUT: RETVAL void * dlsym(void * handle, const char * symbol) PREINIT: void * shandle; CODE: shandle=dlsym(handle, symbol); if (!shandle) { fputs (dlerror(), stderr); exit(1); } RETVAL=shandle; OUTPUT: RETVAL int int_func_pchar(void * handle, char * arg1) CODE: int (*func)(char*)=handle; int retval; retval=(*func)(arg1); RETVAL=retval; OUTPUT: RETVAL int RTLD_LAZY() CODE: RETVAL=RTLD_LAZY; int RTLD_NOW() CODE: RETVAL=RTLD_NOW; int RTLD_LOCAL() CODE: RETVAL=RTLD_LOCAL; int RTLD_GLOBAL() CODE: RETVAL=RTLD_GLOBAL; int RTLD_TRACE() CODE: RETVAL=RTLD_TRACE;