pike.git / src / dynamic_load.c

version» Context lines:

pike.git/src/dynamic_load.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dynamic_load.c,v 1.75 2004/03/21 16:42:01 grubba Exp $ + || $Id: dynamic_load.c,v 1.76 2004/03/21 17:19:40 grubba Exp $   */      #ifdef TESTING   #define NO_PIKE_INCLUDES   #define CREATE_MAIN   #define NO_PIKE_GUTS   #endif      #ifndef NO_PIKE_INCLUDES   # include "global.h"
pike.git/src/dynamic_load.c:17:   # include "constants.h"   # include "pike_error.h"   # include "module.h"   # include "stralloc.h"   # include "pike_macros.h"   # include "main.h"   # include "constants.h"   # include "language.h"   # include "lex.h"    - RCSID("$Id: dynamic_load.c,v 1.75 2004/03/21 16:42:01 grubba Exp $"); + RCSID("$Id: dynamic_load.c,v 1.76 2004/03/21 17:19:40 grubba 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:241:      #define RTLD_NOW NSLINKMODULE_OPTION_BINDNOW      #define dlinit() _dyld_present()      static void *dlopen(const char *module_name, int how)   {    NSObjectFileImageReturnCode code = 0;    NSObjectFileImage image = NULL;    +  /* FIXME: Should be fixed to detect if the module already is loaded. */    if ((code = NSCreateObjectFileImageFromFile(module_name, &image)) !=    NSObjectFileImageSuccess) {    fprintf(stderr, "NSCreateObjectFileImageFromFile(\"%s\") failed with %d\n",    module_name, code);    return NULL;    }    /* FIXME: image should be freed somewhere! */ -  +  +  fprintf(stderr, "dlopen(\"%s\") ==> image:%p\n", +  module_name, image); +     return NSLinkModule(image, module_name,    how | NSLINKMODULE_OPTION_RETURN_ON_ERROR |    NSLINKMODULE_OPTION_PRIVATE);   }      static char *dlerror(void)   {    NSLinkEditErrors class = 0;    int error_number = 0;    char *file_name = NULL;