summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-03-13 09:53:17 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-03-13 09:53:17 -0400
commit12e0ee8742c3da77848d79a7fe9d88242873f5bf (patch)
tree1574c977e7c1089a3ede064ca8ad542fa6ef2d07 /src/lib/eina
parentf60fef6f0fb7f0bedd24ceb1d7cf55967d30aac6 (diff)
eina_error: On Windows strerror_s() is the same than POSIX strerror_r()
Summary: strerror_r() does not exist on Windows, but strerror_s() does Test Plan: compilation Reviewers: cedric, bu5hm4n, zmike Reviewed By: zmike Subscribers: zmike, bu5hm4n, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8279
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_error.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/eina/eina_error.c b/src/lib/eina/eina_error.c
index a7faadeb3b..7922933e59 100644
--- a/src/lib/eina/eina_error.c
+++ b/src/lib/eina/eina_error.c
@@ -25,10 +25,6 @@
25#include <stdlib.h> 25#include <stdlib.h>
26#include <stdint.h> 26#include <stdint.h>
27 27
28#ifdef _WIN32
29# include <Evil.h>
30#endif
31
32#include "eina_config.h" 28#include "eina_config.h"
33#include "eina_private.h" 29#include "eina_private.h"
34 30
@@ -111,6 +107,18 @@ _eina_error_msg_alloc(void)
111 return _eina_errors + idx; 107 return _eina_errors + idx;
112} 108}
113 109
110#ifdef _WIN32
111# define HAVE_STRERROR_R
112# ifdef STRERROR_R_CHAR_P
113# undef STRERROR_R_CHAR_P
114# endif
115/* Windows has strerror_s(), similar to POSIX strerror_r() */
116static inline int strerror_r(int errnum, char *buf, size_t buflen)
117{
118 return strerror_s(buf, buflen, errnum);
119}
120#endif
121
114/** 122/**
115 * @endcond 123 * @endcond
116 */ 124 */