From 0c27b315a95ee7445077f36bce2d0f1ec8d54328 Mon Sep 17 00:00:00 2001 From: ketrptr Date: Mon, 16 Dec 2024 09:20:06 +0100 Subject: [PATCH] modified: src/planner.c modified: src/ui.c --- src/planner.c | 10 ++++++---- src/ui.c | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/planner.c b/src/planner.c index 5494d33..723658a 100644 --- a/src/planner.c +++ b/src/planner.c @@ -15,12 +15,14 @@ #include #include -#define ctime_r(T,Tm) (localtime_s(Tm,T) ? NULL:Tm) -#define localtime_r(T,Tm) (localtime_s(Tm,T) ? NULL:Tm) +#ifdef _WIN32 +_WIN32 #define ctime_r(T, Tm)(localtime_s(Tm, T) ? NULL : Tm) +#define localtime_r(T, Tm) (localtime_s(Tm, T) ? NULL : Tm) +#endif /* ifdef _WIN32 */ -const uint intervalLen = 45; // min -const uint pauseLen = 10; // + const uint intervalLen = 45; // min +const uint pauseLen = 10; // const char taskFormat[] = "Task { %.64s = {\n created={%lu},\n deadline={%lu},\n " diff --git a/src/ui.c b/src/ui.c index 90417ea..bb0af5f 100644 --- a/src/ui.c +++ b/src/ui.c @@ -13,8 +13,9 @@ #include #include -#define localtime_r(T,Tm) (localtime_s(Tm,T) ? NULL:Tm) - +#ifdef _WIN32 +#define localtime_r(T, Tm) (localtime_s(Tm, T) ? NULL : Tm) +#endif const char *dbName = "db.csv";