dlutils.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/* dlutils.c - handy functions and definitions for dl_*.xs files
*
* Currently this file is simply #included into dl_*.xs/.c files.
*
* Modified:
* 29th Feburary 2000 - Alan Burlison: Added functionality to close dlopen'd
* files when the interpreter exits
*/
/* pointer to allocated memory for last error message */
/* flag for immediate rather than lazy linking (spots unresolved symbol) */
static int dl_nonlazy = 0;
#ifdef DL_LOADONCEONLY
#endif
#ifdef DEBUGGING
static int dl_debug = 0; /* value copied from $DynaLoader::dl_debug */
#else
#endif
/* Close all dlopen'd files */
static void
{
AV *dl_librefs;
dSP;
}
}
}
static void
{
char *perl_dl_nonlazy;
#ifdef DEBUGGING
#endif
if (dl_nonlazy)
#ifdef DL_LOADONCEONLY
if (!dl_loaded_files)
#endif
#ifdef DL_UNLOAD_ALL_AT_EXIT
call_atexit(&dl_unload_all_files, (void*)0);
#endif
}
/* SaveError() takes printf style args and saves the result in LastError */
static void
{
char *message;
len++; /* include terminating null char */
/* Allocate some memory for the error message */
if (LastError)
else
/* Copy message into LastError (including terminating null char) */
}