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.239 2010/06/21 15:10:34 grubba Exp $ + || $Id: main.c,v 1.240 2010/06/22 12:37:19 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;    + typedef void (*modfun)(void); + #ifdef NO_CAST_TO_FUN + /* Function pointers can't be casted to scalar pointers according to +  * ISO-C (probably to support true Harward achitecture machines). +  */ + static modfun CAST_TO_FUN(void *ptr) + { +  union { +  void *ptr; +  modfun fun; +  } u; +  u.ptr = ptr; +  return u.fun; + } + #else /* !NO_CAST_TO_FUN */ + #define CAST_TO_FUN(X) ((modfun)X) + #endif /* NO_CAST_TO_FUN */ +    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"));