diff --git a/lang/cem/libcc.ansi/headers/ack/config.h b/lang/cem/libcc.ansi/headers/ack/config.h index cefa902bd..2ee784213 100644 --- a/lang/cem/libcc.ansi/headers/ack/config.h +++ b/lang/cem/libcc.ansi/headers/ack/config.h @@ -49,6 +49,11 @@ #define ACKCONF_WANT_EMULATED_POPEN 1 #endif +#ifndef ACKCONF_WANT_EMULATED_TIME +/* Implement time() with gettimeofday(). */ +#define ACKCONF_WANT_EMULATED_TIME 1 +#endif + #ifndef ACKCONF_WANT_MALLOC /* Uses sbrk() to get memory from the system. */ #define ACKCONF_WANT_MALLOC 1 diff --git a/lang/cem/libcc.ansi/time/time.c b/lang/cem/libcc.ansi/sys/misc/time.c similarity index 83% rename from lang/cem/libcc.ansi/time/time.c rename to lang/cem/libcc.ansi/sys/misc/time.c index 1379723a3..813cd2a30 100644 --- a/lang/cem/libcc.ansi/time/time.c +++ b/lang/cem/libcc.ansi/sys/misc/time.c @@ -8,10 +8,9 @@ #include #include -#ifndef ACKCONF_TIME_IS_A_SYSCALL +#if ACKCONF_WANT_EMULATED_TIME -time_t -time(time_t* timer) +time_t time(time_t* timer) { struct timeval tv; struct timezone tz; diff --git a/plat/cpm/include/ack/plat.h b/plat/cpm/include/ack/plat.h index cbd879396..321dadf18 100644 --- a/plat/cpm/include/ack/plat.h +++ b/plat/cpm/include/ack/plat.h @@ -9,6 +9,6 @@ /* We're providing a time() system call rather than wanting a wrapper around * gettimeofday() in the libc. */ -#define ACKCONF_TIME_IS_A_SYSCALL +#define ACKCONF_WANT_EMULATED_TIME 0 #endif diff --git a/plat/em/include/ack/plat.h b/plat/em/include/ack/plat.h index 585a6abf7..8506e8781 100644 --- a/plat/em/include/ack/plat.h +++ b/plat/em/include/ack/plat.h @@ -1,8 +1,7 @@ #ifndef _ACK_PLAT_H #define _ACK_PLAT_H -#define ACKCONF_TIME_IS_A_SYSCALL - +#define ACKCONF_WANT_EMULATED_TIME 0 #define ACKCONF_WANT_STANDARD_SIGNALS 0 #endif diff --git a/plat/linux/include/ack/plat.h b/plat/linux/include/ack/plat.h index 0a2f9dded..f0ad12797 100644 --- a/plat/linux/include/ack/plat.h +++ b/plat/linux/include/ack/plat.h @@ -6,11 +6,6 @@ #ifndef _ACK_PLAT_H #define _ACK_PLAT_H -/* We're providing a time() system call rather than wanting a wrapper around - * gettimeofday() in the libc. */ - -/* #define ACKCONF_TIME_IS_A_SYSCALL */ - #define ACKCONF_WANT_STANDARD_O 0 #define ACKCONF_WANT_STANDARD_SIGNALS 0 diff --git a/plat/osx/include/ack/plat.h b/plat/osx/include/ack/plat.h index 6d6baa515..f0ad12797 100644 --- a/plat/osx/include/ack/plat.h +++ b/plat/osx/include/ack/plat.h @@ -6,11 +6,6 @@ #ifndef _ACK_PLAT_H #define _ACK_PLAT_H -/* We're providing a time() system call rather than wanting a wrapper around - * gettimeofday() in the libc. */ - -/* #define ACKCONF_TIME_IS_A_SYSCALL */ - #define ACKCONF_WANT_STANDARD_O 0 #define ACKCONF_WANT_STANDARD_SIGNALS 0 diff --git a/plat/pc86/include/ack/plat.h b/plat/pc86/include/ack/plat.h index cbd879396..e8c2251a0 100644 --- a/plat/pc86/include/ack/plat.h +++ b/plat/pc86/include/ack/plat.h @@ -6,9 +6,6 @@ #ifndef _ACK_PLAT_H #define _ACK_PLAT_H -/* We're providing a time() system call rather than wanting a wrapper around - * gettimeofday() in the libc. */ - -#define ACKCONF_TIME_IS_A_SYSCALL +#define ACKCONF_WANT_EMULATED_TIME 0 #endif diff --git a/plat/pdpv7/include/ack/plat.h b/plat/pdpv7/include/ack/plat.h index 42a302513..da2767148 100644 --- a/plat/pdpv7/include/ack/plat.h +++ b/plat/pdpv7/include/ack/plat.h @@ -8,9 +8,6 @@ #ifndef _ACK_PLAT_H #define _ACK_PLAT_H -/* We're providing a time() system call rather than wanting a wrapper around - * gettimeofday() in the libc. */ - -#define ACKCONF_TIME_IS_A_SYSCALL +#define ACKCONF_WANT_EMULATED_TIME 0 #endif diff --git a/plat/qemuppc/include/ack/plat.h b/plat/qemuppc/include/ack/plat.h index 4ad324142..fa39da2e4 100644 --- a/plat/qemuppc/include/ack/plat.h +++ b/plat/qemuppc/include/ack/plat.h @@ -6,9 +6,6 @@ #ifndef _ACK_PLAT_H #define _ACK_PLAT_H -/* We're providing a time() system call rather than wanting a wrapper around - * gettimeofday() in the libc. */ - -#define ACKCONF_TIME_IS_A_SYSCALL +#define ACKCONF_WANT_EMULATED_TIME 0 #endif diff --git a/plat/rpi/include/ack/plat.h b/plat/rpi/include/ack/plat.h index 9f9d08b27..e512c58e3 100644 --- a/plat/rpi/include/ack/plat.h +++ b/plat/rpi/include/ack/plat.h @@ -8,9 +8,6 @@ #ifndef _ACK_PLAT_H #define _ACK_PLAT_H -/* We're providing a time() system call rather than wanting a wrapper around - * gettimeofday() in the libc. */ - -#define ACKCONF_TIME_IS_A_SYSCALL +#define ACKCONF_WANT_EMULATED_TIME 0 #endif