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";