summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-05-08 12:39:54 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-05-08 12:39:54 +0100
commita4c44e5e744dba15dfe512668127906afd4b6dba (patch)
tree684068057eedd2641af4ccad70c005fd96897b4b /src/lib/evil
parent4473062dd482f89eb57f2bca120a742acec3b4f9 (diff)
Evil: remove localtime_r as mingw-w64 defines it when _POSIX_C_SOURCE is defined
Summary: localtime_r() is already defined by mingw-w64 when _POSIX_C_SOURCE is defined Test Plan: compilation Reviewers: raster, zmike, cedric Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7907 Differential Revision: https://phab.enlightenment.org/D8854
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_macro_wrapper.h14
-rw-r--r--src/lib/evil/evil_time.c10
-rw-r--r--src/lib/evil/evil_time.h23
3 files changed, 3 insertions, 44 deletions
diff --git a/src/lib/evil/evil_macro_wrapper.h b/src/lib/evil/evil_macro_wrapper.h
index ae74867..9eb1ac7 100644
--- a/src/lib/evil/evil_macro_wrapper.h
+++ b/src/lib/evil/evil_macro_wrapper.h
@@ -46,20 +46,6 @@
46#define mkdir(dirname, mode) evil_mkdir(dirname, mode) 46#define mkdir(dirname, mode) evil_mkdir(dirname, mode)
47 47
48/* 48/*
49 * evil_time.h
50 */
51
52/**
53 * @def localtime_r(t, r)
54 *
55 * Wrapper around evil_localtime_r().
56 */
57#ifdef localtime_r
58# undef localtime_r
59#endif
60#define localtime_r(t, r) evil_localtime_r(t, r)
61
62/*
63 * evil_unistd.h 49 * evil_unistd.h
64 */ 50 */
65 51
diff --git a/src/lib/evil/evil_time.c b/src/lib/evil/evil_time.c
index 76c5a58..90b6369 100644
--- a/src/lib/evil/evil_time.c
+++ b/src/lib/evil/evil_time.c
@@ -12,16 +12,6 @@
12#include "evil_macro_wrapper.h" 12#include "evil_macro_wrapper.h"
13#include "evil_private.h" 13#include "evil_private.h"
14 14
15struct tm *
16evil_localtime_r(const time_t *timep, struct tm *result)
17{
18 __time64_t t = *timep;
19
20 _localtime64_s(result, &t);
21
22 return result;
23}
24
25/* 15/*
26 * strptime 16 * strptime
27 * based on http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/time/strptime.c?rev=HEAD 17 * based on http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/time/strptime.c?rev=HEAD
diff --git a/src/lib/evil/evil_time.h b/src/lib/evil/evil_time.h
index 34607de..00f538c 100644
--- a/src/lib/evil/evil_time.h
+++ b/src/lib/evil/evil_time.h
@@ -2,6 +2,9 @@
2#define __EVIL_TIME_H__ 2#define __EVIL_TIME_H__
3 3
4 4
5#include <time.h>
6
7
5/** 8/**
6 * @file evil_time.h 9 * @file evil_time.h
7 * @brief The file that provides functions ported from Unix in time.h. 10 * @brief The file that provides functions ported from Unix in time.h.
@@ -15,26 +18,6 @@
15 18
16 19
17/** 20/**
18 * @brief Convert the calendar time to broken-time representation in a
19 * user supplied data.
20 *
21 * @param timep The calender time.
22 * @param result The broken-down time representation.
23 * @return The broken-down time representation.
24 *
25 * This function converts the calendar time @p timep to a broken-time
26 * representation. The result is stored in the buffer @p result
27 * supplied by the user. If @p timep or @p result are @c NULL, or if
28 * an error occurred, this function returns @c NULL and the values in
29 * @p result might be undefined. Otherwise it returns @p result.
30 *
31 * Conformity: Non applicable.
32 *
33 * Supported OS: Windows XP.
34 */
35EAPI struct tm *evil_localtime_r(const time_t *timep, struct tm *result);
36
37/**
38 * @brief Convert a string representation of time to a time tm structure . 21 * @brief Convert a string representation of time to a time tm structure .
39 * 22 *
40 * @param buf The string to convert. 23 * @param buf The string to convert.