pike.git / src / main.c

version» Context lines:

pike.git/src/main.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: main.c,v 1.237 2010/06/17 17:16:05 grubba Exp $ + || $Id: main.c,v 1.238 2010/06/17 17:24:34 grubba Exp $   */      #include "global.h"   #include "fdlib.h"   #include "backend.h"   #include "module.h"   #include "object.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"
pike.git/src/main.c:196:    }   #endif       TRACE((stderr, "Default master at \"%s\"...\n", mp));   }      #ifdef LIBPIKE   static char libpike_file[MAXPATHLEN * 2];   static void *libpike;    - static void (*init_pike)(const char **argv, const char *file); - static void (*init_pike_runtime)(void (*exit_cb)(int)); + static void (*init_pike_var)(const char **argv, const char *file); + static void (*init_pike_runtime_var)(void (*exit_cb)(int)); + static void (*add_predefine_var)(char *s);   #endif /* LIBPIKE */      static void find_lib_dir(int argc, char **argv)   {    int e;       TRACE((stderr, "find_lib_dir...\n"));       set_default_master(argv[0]);   
pike.git/src/main.c:310: Inside #if defined(LIBPIKE)
  #endif /* HAVE_DLINIT */       if (!(libpike = dlopen(libpike_name, RTLD_NOW))) {    const char *err = dlerror();    if (!err) err = "Unknown reason.";    fprintf(stderr, "Failed to open %s: %s\n", libpike_name, err);    exit(1);    }      #define LOOKUP(symbol) do { \ -  if (!(symbol = CAST_TO_FUN(dlsym(libpike, TOSTR(symbol)))) && \ -  !(symbol = CAST_TO_FUN(dlsym(libpike, "_" TOSTR(symbol))))) { \ +  if (!(PIKE_CONCAT(symbol, _var) = \ +  CAST_TO_FUN(dlsym(libpike, TOSTR(symbol)))) && \ +  !(PIKE_CONCAT(symbol, _var) = \ +  CAST_TO_FUN(dlsym(libpike, "_" TOSTR(symbol))))) { \    fprintf(stderr, "Missing symbol in %s: " TOSTR(symbol) "\n", \    libpike_name); \    dlclose(libpike); \    exit(1); \    } \    } while(0)       LOOKUP(init_pike); -  + #define init_pike init_pike_var    LOOKUP(init_pike_runtime); -  + #define init_pike_runtime init_pike_runtime_var    LOOKUP(add_predefine); -  + #define add_predefine add_predefine_var      #endif /* LIBPIKE */       TRACE((stderr, "init_pike()\n"));       init_pike(argv, master_location + CONSTANT_STRLEN(MASTER_COOKIE));       for(e=1; e<argc; e++)    {    TRACE((stderr, "Parse argument %d:\"%s\"...\n", e, argv[e]));