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
*/
#ifndef XS_VERSION
# define XS_VERSION "0"
#endif
typedef struct {
last error message */
int x_dl_nonlazy; /* flag for immediate rather than lazy
linking (spots unresolved symbol) */
#ifdef DL_LOADONCEONLY
#endif
#ifdef DL_CXT_EXTRA
#endif
#ifdef DEBUGGING
int x_dl_debug; /* value copied from $DynaLoader::dl_debug */
#endif
} my_cxt_t;
#ifdef DL_LOADONCEONLY
#endif
#ifdef DL_CXT_EXTRA
#endif
#ifdef DEBUGGING
#endif
#ifdef DEBUGGING
STMT_START { \
dMY_CXT; \
} STMT_END
#else
#endif
#ifdef DL_UNLOAD_ALL_AT_EXIT
/* Close all dlopen'd files */
static void
{
AV *dl_librefs;
dSP;
}
}
}
#endif
static void
{
char *perl_dl_nonlazy;
dl_nonlazy = 0;
#ifdef DL_LOADONCEONLY
#endif
#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 dl_last_error */
static void
{
char *message;
len++; /* include terminating null char */
/* Copy message into dl_last_error (including terminating null char) */
}