Move time() into sys; change the name of the variable which controls it.

This commit is contained in:
David Given 2018-06-23 19:40:50 +02:00
parent bb78fd158c
commit 64ae1d7583
10 changed files with 13 additions and 32 deletions

View file

@ -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

View file

@ -8,10 +8,9 @@
#include <time.h>
#include <ack/config.h>
#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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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