forked from enlightenment/efl
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
This commit is contained in:
parent
f60fef6f0f
commit
12e0ee8742
|
@ -25,10 +25,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <Evil.h>
|
||||
#endif
|
||||
|
||||
#include "eina_config.h"
|
||||
#include "eina_private.h"
|
||||
|
||||
|
@ -111,6 +107,18 @@ _eina_error_msg_alloc(void)
|
|||
return _eina_errors + idx;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
# define HAVE_STRERROR_R
|
||||
# ifdef STRERROR_R_CHAR_P
|
||||
# undef STRERROR_R_CHAR_P
|
||||
# endif
|
||||
/* Windows has strerror_s(), similar to POSIX strerror_r() */
|
||||
static inline int strerror_r(int errnum, char *buf, size_t buflen)
|
||||
{
|
||||
return strerror_s(buf, buflen, errnum);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @endcond
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue