From 802537bc683be01493f7a623548eed6d8c12dab3 Mon Sep 17 00:00:00 2001 From: charonxin <1656746727@qq.com> Date: Mon, 14 Aug 2023 19:02:26 +0800 Subject: [PATCH] [8_2] fix tm_timer --- System/Classes/tm_timer.hpp | 24 ++++++++++++++++++++++++ System/config_l1.h.xmake | 24 ------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/System/Classes/tm_timer.hpp b/System/Classes/tm_timer.hpp index 3abee4f8f..1eb77f7dc 100644 --- a/System/Classes/tm_timer.hpp +++ b/System/Classes/tm_timer.hpp @@ -12,6 +12,30 @@ #ifndef TIMER_H #define TIMER_H +#ifndef __FreeBSD__ +#ifndef HAVE_TIME_T +#define HAVE_TIME_T +typedef long time_t; +#endif +#else +#include +#endif + +#ifdef OS_SUN +#include +#endif + +#ifdef HAVE_GETTIMEOFDAY +#include +#else +#include +#ifdef OS_SUN +extern "C" { +extern int ftime __P ((struct timeb * __timebuf)); +}; +#endif +#endif + #include "string.hpp" #include "tm_ostream.hpp" diff --git a/System/config_l1.h.xmake b/System/config_l1.h.xmake index 79b1f78d3..20b8df2eb 100644 --- a/System/config_l1.h.xmake +++ b/System/config_l1.h.xmake @@ -17,30 +17,6 @@ ${define OS_SUN} typedef long intptr_t; #endif -#ifndef __FreeBSD__ -#ifndef HAVE_TIME_T -#define HAVE_TIME_T -typedef long time_t; -#endif -#else -#include -#endif - -#ifdef OS_SUN -#include -#endif - -#ifdef HAVE_GETTIMEOFDAY -#include -#else -#include -#ifdef OS_SUN -extern "C" { -extern int ftime __P ((struct timeb * __timebuf)); -}; -#endif -#endif - ${define SANITY_CHECKS} ${define OS_MINGW} ${define OS_WIN32}