pike.git / src / program.c

version» Context lines:

pike.git/src/program.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: program.c,v 1.574 2006/08/05 20:35:41 mast Exp $ + || $Id: program.c,v 1.575 2006/08/20 21:08:49 peter Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.574 2006/08/05 20:35:41 mast Exp $"); + RCSID("$Id: program.c,v 1.575 2006/08/20 21:08:49 peter Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_macros.h"   #include "fsort.h"
pike.git/src/program.c:8060:   }      #ifdef PIKE_USE_MACHINE_CODE      #ifdef HAVE_SYS_MMAN_H   #include <sys/mman.h>   #endif      void make_program_executable(struct program *p)   { +  if (!p->num_program) +  return; +    #ifdef _WIN32 -  +  {    DWORD old_prot;    if (!VirtualProtect (p->program,    p->num_program * sizeof (p->program[0]),    PAGE_EXECUTE_READWRITE, &old_prot))    Pike_fatal ("VirtualProtect failed, code %d.\n", GetLastError()); -  +  }   #else /* _WIN32 */      #if !defined(HAVE_MMAP) || !defined(MEXEC_USES_MMAP)    mprotect((void *)p->program, p->num_program*sizeof(p->program[0]),    PROT_EXEC | PROT_READ | PROT_WRITE);   #endif /* !HAVE_MMAP || !MEXEC_USES_MMAP */      #endif /* _WIN32 */      #ifdef FLUSH_INSTRUCTION_CACHE    FLUSH_INSTRUCTION_CACHE(p->program,    p->num_program*sizeof(p->program[0]));   #endif /* FLUSH_INSTRUCTION_CACHE */   }   #endif