symbian-qemu-0.9.1-12/qemu-symbian-svp/tests/cris/check_time2.c
author Mike Kinghan <mikek@symbian.org>
Wed, 04 Aug 2010 10:56:22 +0100
branchGCC_SURGE
changeset 93 07b904f40417
parent 1 2fb8b9db1c86
permissions -rw-r--r--
Provisional fix for bug 3508 - Persistent storage support breaks Linux compatibility. Enables libnvmemmory.so to be built and dynamically linked on Linux and rom boot reports persistent storage image created OK, but ROM then crashes.

/* CB_SYS_time doesn't implement the Linux time syscall; the return
   value isn't written to the argument.  */

#include <time.h>
#include <stdio.h>
#include <stdlib.h>

int
main (void)
{
  time_t x = (time_t) -1;
  time_t t = time (&x);

  if (t == (time_t) -1 || t != x)
    abort ();
  printf ("pass\n");
  exit (0);
}