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"    - RCSID("$Id: dynamic_load.c,v 1.31 1998/09/18 21:35:00 hubbe Exp $"); + RCSID("$Id: dynamic_load.c,v 1.32 1999/02/01 03:08:27 per Exp $");      #endif /* !TESTING */      #ifdef HAVE_ERRNO_H   #include <errno.h>   #endif /* HAVE_ERRNO_H */   #ifdef HAVE_STRING_H   #include <string.h>   #endif /* HAVE_STRING_H */   
pike.git/src/dynamic_load.c:195:      #define dlinit()   #endif /* !EMULATE_DLOPEN */         #endif /* HAVE_SOME_DLOPEN */      #ifndef RTLD_NOW   #define RTLD_NOW 0   #endif + #ifndef RTLD_LAZY + #define RTLD_LAZY 0 + #endif + #ifndef RTLD_GLOBAL + #define RTLD_GLOBAL 0 + #endif      #ifndef TESTING      #if defined(HAVE_DLOPEN) || defined(USE_DLD) || defined(USE_HPUX_DL)      struct module_list   {    struct module_list * next;    void *module;    modfun init, exit;
pike.git/src/dynamic_load.c:221: Inside #if undefined(TESTING) and #if defined(HAVE_DLOPEN) || defined(USE_DLD) || defined(USE_HPUX_DL)
   void *module;    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;    + #ifdef DEBUG +  module=dlopen(module_name, +  (d_flag?RTLD_NOW|RTLD_GLOBAL:RTLD_LAZY|RTLD_GLOBAL)); + #else    module=dlopen(module_name, RTLD_NOW); -  + #endif       if(!module)    {    const char *err = dlerror();    if(!err) err = "Unknown reason";    if (sp[-args].u.string->len < 1024) {    error("load_module(\"%s\") failed: %s\n",    sp[-args].u.string->str, err);    } else {    error("load_module() failed: %s\n", err);