pike.git / src / dynamic_load.c

version» Context lines:

pike.git/src/dynamic_load.c:1:   #ifndef TESTING   # include "global.h"   # include "interpret.h"   # include "constants.h"   # include "error.h"   # include "module.h"   # include "stralloc.h"   # include "pike_macros.h"   # include "main.h"    - RCSID("$Id: dynamic_load.c,v 1.40 2000/06/27 15:15:11 grubba Exp $"); + RCSID("$Id: dynamic_load.c,v 1.41 2000/07/28 17:16:54 hubbe 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:60: Inside #if defined(HAVE_SOME_DLOPEN)
   return ret;   }      static void *dlopen(const char *foo, int how)   {    TCHAR *tmp;    HINSTANCE ret;    tmp=convert_string(foo, strlen(foo));    ret=LoadLibrary(tmp);    free((char *)tmp); +  if(ret) +  { +  void ** psym=(void **)GetProcAddress(ret, "PikeSymbol"); +  if(psym) +  { +  extern void *PikeSymbol[]; +  *psym = PikeSymbol; +  } +  }    return (void *)ret;   }      static char * dlerror(void)   {    static char buffer[200];    sprintf(buffer,"LoadLibrary failed with error: %d",GetLastError());    return buffer;   }   
pike.git/src/dynamic_load.c:207:   #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) + #if defined(HAVE_DLOPEN) || defined(USE_DLD) || defined(USE_HPUX_DL) || defined(USE_LOADLIBRARY)      struct module_list   {    struct module_list * next;    void *module;    modfun init, exit;   };      struct module_list *dynamic_module_list = 0;   
pike.git/src/dynamic_load.c:312:       pop_n_elems(args);    push_program(end_program());   }      #endif /* HAVE_DLOPEN || USE_DLD || USE_HPUX_DL */         void init_dynamic_load(void)   { - #if defined(HAVE_DLOPEN) || defined(USE_DLD) || defined(USE_HPUX_DL) + #if defined(HAVE_DLOPEN) || defined(USE_DLD) || defined(USE_HPUX_DL) || defined(USE_LOADLIBRARY)    dlinit();         /* function(string:program) */ -  +     ADD_EFUN("load_module",f_load_module,tFunc(tStr,tPrg),OPT_EXTERNAL_DEPEND);   #endif   }      void exit_dynamic_load(void)   {   #if defined(HAVE_DLOPEN) || defined(USE_DLD) || defined(USE_HPUX_DL)    while(dynamic_module_list)    {    struct module_list *tmp=dynamic_module_list;