OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [mprotect1.c] - Diff between revs 24 and 157

Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 157
/* Check unimplemented-output for mprotect call.
/* Check unimplemented-output for mprotect call.
#notarget: cris*-*-elf
#notarget: cris*-*-elf
#xerror:
#xerror:
#output: Unimplemented mprotect call (0x0, 0x2001, 0x4)\n
#output: Unimplemented mprotect call (0x0, 0x2001, 0x4)\n
#output: program stopped with signal 4.\n
#output: program stopped with signal 4.\n
 */
 */
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/mman.h>
#include <errno.h>
#include <errno.h>
 
 
int main (int argc, char *argv[])
int main (int argc, char *argv[])
{
{
  int err = mprotect (0, 8193, PROT_EXEC);
  int err = mprotect (0, 8193, PROT_EXEC);
  if (err == -1 && errno == ENOSYS)
  if (err == -1 && errno == ENOSYS)
    printf ("ENOSYS\n");
    printf ("ENOSYS\n");
  printf ("xyzzy\n");
  printf ("xyzzy\n");
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.