From 77602c2cde084bbc71461ea9efd7617132c1927c Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Wed, 4 May 2022 14:14:51 +0200 Subject: [PATCH] lib: linux/time: Remove SYS_time specialization. * lib/linux/time.c (time)[SYS_time]: Remove specialization. [!SYS_time && !SYS_gettimeofday]: Remove fallback. --- lib/linux/time.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/lib/linux/time.c b/lib/linux/time.c index 30d9a064..eda2cd0b 100644 --- a/lib/linux/time.c +++ b/lib/linux/time.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -23,13 +23,6 @@ #include #include -/* Linux' SYS_time syscall is a compatibility shim for SYS_gettimeofday. -Therefore, prefer SYS_gettimeofday. */ - -#if defined (SYS_gettimeofday) - -#include - time_t time (time_t * result) { @@ -41,31 +34,3 @@ time (time_t * result) *result = tv.tv_sec; return tv.tv_sec; } - -#elif defined (SYS_time) - -time_t -time (time_t * result) -{ - return _sys_call1 (SYS_time, (long) result); -} - -#else - -#warning there is no time - -#include - -time_t -time (time_t * result) -{ - static int stub = 0; - if (__mes_debug () && !stub) - eputs ("time stub\n"); - stub = 1; - if (result) - *result = 0; - return 0; -} - -#endif