pike.git / src / dynamic_load.c

version» Context lines:

pike.git/src/dynamic_load.c:1: Inside #if undefined(TESTING)
- #ifndef TESTING + #ifdef TESTING + #define NO_PIKE_INCLUDES + #define CREATE_MAIN + #define NO_PIKE_GUTS + #endif +  + #ifndef NO_PIKE_INCLUDES   # include "global.h"   # include "interpret.h"   # include "constants.h"   # include "pike_error.h"   # include "module.h"   # include "stralloc.h"   # include "pike_macros.h"   # include "main.h"   # include "constants.h"    - RCSID("$Id: dynamic_load.c,v 1.55 2001/09/11 05:42:20 hubbe Exp $"); + RCSID("$Id: dynamic_load.c,v 1.56 2001/09/18 22:59:56 hubbe Exp $");      #else /* TESTING */      #include <stdio.h>      #endif /* !TESTING */      #ifdef HAVE_ERRNO_H   #include <errno.h>   #endif /* HAVE_ERRNO_H */
pike.git/src/dynamic_load.c:285:   #endif      #ifndef RTLD_LAZY   #define RTLD_LAZY 0   #endif      #ifndef RTLD_GLOBAL   #define RTLD_GLOBAL 0   #endif    - #ifndef TESTING + #ifndef NO_PIKE_GUTS      #if defined(HAVE_DLOPEN) || defined(USE_DLD) || defined(USE_HPUX_DL) || defined(USE_LOADLIBRARY)   #define USE_DYNAMIC_MODULES   #endif      #ifdef USE_DYNAMIC_MODULES      struct module_list   {    struct module_list * next;
pike.git/src/dynamic_load.c:464: Inside #if defined(USE_DYNAMIC_MODULES) and #if undefined(DEBUG_MALLOC)
   dynamic_module_list=tmp->next;   #ifndef DEBUG_MALLOC    dlclose(tmp->module);   #endif    free((char *)tmp);    }   #endif   }       - #else /* TESTING */ + #endif /* NO_PIKE_GUTS */ +  + #ifdef CREATE_MAIN   #include <stdio.h>      int main()   {    void *module,*fun;    dlinit();    module=dlopen("./myconftest.so",RTLD_NOW);    if(!module)    {    fprintf(stderr,"Failed to link myconftest.so: %s\n",dlerror());
pike.git/src/dynamic_load.c:489:    if(!fun)    {    fprintf(stderr,"Failed to find function testfunc: %s\n",dlerror());    exit(1);    }    fprintf(stderr,"Calling testfunc\n");    ((void (*)(void))fun)();    fprintf(stderr,"testfunc returned!\n");    exit(1);   } - #endif + #endif /* CREATE_MAIN */