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.85 2004/10/16 07:27:30 agehall Exp $ + || $Id: dynamic_load.c,v 1.86 2004/11/12 13:02:18 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:503: Inside #if defined(PIKE_DEBUG)
   return;    }    }   #endif /* PIKE_DEBUG */       init = CAST_TO_FUN(dlsym(module, "pike_module_init"));    if (!init) {    init = CAST_TO_FUN(dlsym(module, "_pike_module_init"));    if (!init) {    dlclose(module); -  if (!module_name->size_shift && module_name->len < 1024) { -  Pike_error("pike_module_init missing in dynamic module \"%s\".\n", -  module_name->str); -  } else { -  Pike_error("pike_module_init missing in dynamic module.\n"); +  Pike_error("pike_module_init missing in dynamic module \"%S\".\n", +  module_name);    }    } -  } +        exit = CAST_TO_FUN(dlsym(module, "pike_module_exit"));    if (!exit) {    exit = CAST_TO_FUN(dlsym(module, "_pike_module_exit"));    if (!exit) {    dlclose(module); -  if (!module_name->size_shift && module_name->len < 1024) { -  Pike_error("pike_module_exit missing in dynamic module \"%s\".\n", -  module_name->str); -  } else { -  Pike_error("pike_module_exit missing in dynamic module.\n"); +  Pike_error("pike_module_exit missing in dynamic module \"%S\".\n", +  module_name);    }    } -  } +       #if defined(__NT__) && defined(_M_IA64)    {    fprintf(stderr, "pike_module_init: 0x%p\n"    " func: 0x%p\n"    " gp: 0x%p\n",    init, ((void **)init)[0], ((void **)init)[1]);    fprintf(stderr, "pike_module_exit: 0x%p\n"    " func: 0x%p\n"    " gp: 0x%p\n",
pike.git/src/dynamic_load.c:604:    /* No identifier references -- Disabled module. */    free_program(p);    push_undefined();    }    } else {    /* Initialization failed. */    new_module->exit();    dlclose(module);    dynamic_module_list = new_module->next;    free(new_module); -  if (strlen(module_name->str) < 1024) { -  Pike_error("Failed to initialize dynamic module \"%s\".\n", -  module_name->str); -  } else { -  Pike_error("Failed to initialize dynamic module.\n"); +  Pike_error("Failed to initialize dynamic module \"%S\".\n", +  module_name);    }    }   } - } +       #endif /* USE_DYNAMIC_MODULES */         void init_dynamic_load(void)   {   #ifdef USE_DYNAMIC_MODULES    if (dlinit()) {       /* function(string:program) */