pike.git / src / dynamic_load.c

version» Context lines:

pike.git/src/dynamic_load.c:1: Inside #if undefined(TESTING)
  #ifndef TESTING   # include "global.h"   # include "interpret.h"   # include "constants.h"   # include "error.h"   # include "module.h"   # include "stralloc.h"   # include "pike_macros.h" - #ifdef DEBUG - #include "main.h" - #endif /* DEBUG */ -  +    #endif      #if !defined(HAVE_DLOPEN) && defined(HAVE_DLD_LINK) && defined(HAVE_DLD_GET_FUNC)   #define USE_DLD   #endif      #if defined(HAVE_DLOPEN) || defined(USE_DLD)      typedef void (*modfun)(void);   
pike.git/src/dynamic_load.c:95: Inside #if undefined(TESTING) and #if defined(HAVE_DLOPEN) || defined(USE_DLD)
   modfun init, exit;    struct module_list *new_module;    const char *module_name;       if(sp[-args].type != T_STRING)    error("Bad argument 1 to load_module()\n");       module_name = sp[-args].u.string->str;       module=dlopen(module_name, RTLD_NOW); - #ifdef DEBUG -  if (d_flag >= 1) { -  fprintf(stderr, "dlopen() called.\n"); -  } - #endif /* DEBUG */ +     if(!module)    {    const char *err = dlerror();    if(!err) err = "Unknown reason";    error("load_module(\"%s\") failed: %s\n",    sp[-args].u.string->str, err);    }       init=(modfun)dlsym(module, "pike_module_init");    if (!init) {