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.82 2004/04/15 13:21:25 grubba Exp $ + || $Id: dynamic_load.c,v 1.83 2004/04/18 02:19:38 mast 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 "lex.h"   # include "object.h"    - RCSID("$Id: dynamic_load.c,v 1.82 2004/04/15 13:21:25 grubba Exp $"); + RCSID("$Id: dynamic_load.c,v 1.83 2004/04/18 02:19:38 mast 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:456:       /* Removing RTLD_GLOBAL breaks some PiGTK themes - Hubbe */    /* Using RTLD_LAZY is faster, but makes it impossible to    * detect linking problems at runtime..    */    module=dlopen(module_name->str,    RTLD_NOW /*|RTLD_GLOBAL*/ );       if(!module)    { -  struct object *err_obj = low_clone (dlopen_error_program); - #define DLERR_STRUCT(OBJ) \ -  ((struct dlopen_error_struct *) (err_obj->storage + dlopen_error_offset)) +  struct object *err_obj = low_clone (module_load_error_program); + #define LOADERR_STRUCT(OBJ) \ +  ((struct module_load_error_struct *) (err_obj->storage + module_load_error_offset))       const char *err = dlerror();    if (err) {    if (err[strlen (err) - 1] == '\n')    push_string (make_shared_binary_string (err, strlen (err) - 1));    else    push_text (err);    }    else    push_constant_text ("Unknown reason");    -  add_ref (DLERR_STRUCT (err_obj)->path = Pike_sp[-args - 1].u.string); -  add_ref (DLERR_STRUCT (err_obj)->dlerror = Pike_sp[-1].u.string); +  add_ref (LOADERR_STRUCT (err_obj)->path = Pike_sp[-args - 1].u.string); +  add_ref (LOADERR_STRUCT (err_obj)->reason = Pike_sp[-1].u.string);       if (Pike_sp[-args].u.string->len < 1024) {    throw_error_object (err_obj, "load_module", Pike_sp - args - 1, args,    "load_module(\"%s\") failed: %s\n",    module_name->str, Pike_sp[-1].u.string->str);    } else {    throw_error_object (err_obj, "load_module", Pike_sp - args - 1, args,    "load_module() failed: %s\n",    Pike_sp[-1].u.string->str);    }