summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Evil.am1
-rw-r--r--src/bin/evil/evil_test_link.c1
-rw-r--r--src/bin/evil/evil_test_mkstemp.c1
-rw-r--r--src/bin/evil/evil_test_realpath.c1
-rw-r--r--src/lib/evil/Evil.h21
-rw-r--r--src/lib/evil/dlfcn.c3
-rw-r--r--src/lib/evil/evil_dirent.c11
-rw-r--r--src/lib/evil/evil_fcntl.c4
-rw-r--r--src/lib/evil/evil_inet.c1
-rw-r--r--src/lib/evil/evil_inet.h14
-rw-r--r--src/lib/evil/evil_langinfo.c6
-rw-r--r--src/lib/evil/evil_libgen.c3
-rw-r--r--src/lib/evil/evil_locale.c1
-rw-r--r--src/lib/evil/evil_locale.h14
-rw-r--r--src/lib/evil/evil_macro_pop.h3
-rw-r--r--src/lib/evil/evil_macro_wrapper.h110
-rw-r--r--src/lib/evil/evil_main.c8
-rw-r--r--src/lib/evil/evil_private.h6
-rw-r--r--src/lib/evil/evil_pwd.c4
-rw-r--r--src/lib/evil/evil_stdio.c5
-rw-r--r--src/lib/evil/evil_stdio.h14
-rw-r--r--src/lib/evil/evil_stdlib.c1
-rw-r--r--src/lib/evil/evil_string.c8
-rw-r--r--src/lib/evil/evil_time.c4
-rw-r--r--src/lib/evil/evil_time.h10
-rw-r--r--src/lib/evil/evil_unistd.c7
-rw-r--r--src/lib/evil/evil_unistd.h14
-rw-r--r--src/lib/evil/evil_util.c22
28 files changed, 186 insertions, 112 deletions
diff --git a/src/Makefile_Evil.am b/src/Makefile_Evil.am
index 5c27eca..60fc567 100644
--- a/src/Makefile_Evil.am
+++ b/src/Makefile_Evil.am
@@ -13,6 +13,7 @@ lib/evil/evil_langinfo.h \
13lib/evil/evil_locale.h \ 13lib/evil/evil_locale.h \
14lib/evil/evil_macro.h \ 14lib/evil/evil_macro.h \
15lib/evil/evil_macro_pop.h \ 15lib/evil/evil_macro_pop.h \
16lib/evil/evil_macro_wrapper.h \
16lib/evil/evil_main.h \ 17lib/evil/evil_main.h \
17lib/evil/evil_stdio.h \ 18lib/evil/evil_stdio.h \
18lib/evil/evil_stdlib.h \ 19lib/evil/evil_stdlib.h \
diff --git a/src/bin/evil/evil_test_link.c b/src/bin/evil/evil_test_link.c
index 868e9f2..0aa4966 100644
--- a/src/bin/evil/evil_test_link.c
+++ b/src/bin/evil/evil_test_link.c
@@ -2,6 +2,7 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <stdio.h>
5#include <string.h> 6#include <string.h>
6 7
7#include <Evil.h> 8#include <Evil.h>
diff --git a/src/bin/evil/evil_test_mkstemp.c b/src/bin/evil/evil_test_mkstemp.c
index 427dc01..54d9df5 100644
--- a/src/bin/evil/evil_test_mkstemp.c
+++ b/src/bin/evil/evil_test_mkstemp.c
@@ -2,6 +2,7 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <stdio.h>
5#include <string.h> 6#include <string.h>
6 7
7#include <Evil.h> 8#include <Evil.h>
diff --git a/src/bin/evil/evil_test_realpath.c b/src/bin/evil/evil_test_realpath.c
index afd92f1..fbc4d1d 100644
--- a/src/bin/evil/evil_test_realpath.c
+++ b/src/bin/evil/evil_test_realpath.c
@@ -2,6 +2,7 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <stdio.h>
5#include <string.h> 6#include <string.h>
6 7
7#include <Evil.h> 8#include <Evil.h>
diff --git a/src/lib/evil/Evil.h b/src/lib/evil/Evil.h
index 6a69f7b..c4ee0a1 100644
--- a/src/lib/evil/Evil.h
+++ b/src/lib/evil/Evil.h
@@ -100,13 +100,7 @@ extern "C" {
100#include <windows.h> 100#include <windows.h>
101#undef WIN32_LEAN_AND_MEAN 101#undef WIN32_LEAN_AND_MEAN
102 102
103#include <stdlib.h> 103#include <sys/stat.h> /* for mkdir in evil_macro_wrapper */
104#include <stdio.h>
105#include <time.h>
106#include <limits.h>
107#include <sys/stat.h>
108#include <fcntl.h>
109#include <math.h>
110 104
111 105
112typedef unsigned long uid_t; 106typedef unsigned long uid_t;
@@ -125,7 +119,6 @@ typedef unsigned long gid_t;
125#include "evil_time.h" 119#include "evil_time.h"
126#include "evil_unistd.h" 120#include "evil_unistd.h"
127#include "evil_util.h" 121#include "evil_util.h"
128#include "evil_macro_pop.h"
129 122
130#ifndef S_ISDIR 123#ifndef S_ISDIR
131# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) 124# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
@@ -173,18 +166,10 @@ typedef unsigned long gid_t;
173#define _S_IWUSR _S_IWRITE 166#define _S_IWUSR _S_IWRITE
174#define _S_IRUSR _S_IREAD 167#define _S_IRUSR _S_IREAD
175 168
176 /*
177# define close(fd) _close(fd)
178# define read(fd,buffer,count) _read((fd),(buffer),(count))
179# define write(fd,buffer,count) _write((fd),(buffer),(count))
180# define unlink(filename) _unlink((filename))
181# define lstat(f,s) _stat((f),(s))
182 */
183
184#define sigsetjmp(Env, Save) setjmp(Env) 169#define sigsetjmp(Env, Save) setjmp(Env)
185 170
186#undef EAPI 171#include "evil_macro_wrapper.h"
187#define EAPI 172#include "evil_macro_pop.h"
188 173
189#ifdef __cplusplus 174#ifdef __cplusplus
190} 175}
diff --git a/src/lib/evil/dlfcn.c b/src/lib/evil/dlfcn.c
index 4f3760b..76fbf85 100644
--- a/src/lib/evil/dlfcn.c
+++ b/src/lib/evil/dlfcn.c
@@ -12,7 +12,8 @@
12 12
13#include <psapi.h> /* EnumProcessModules(Ex) */ 13#include <psapi.h> /* EnumProcessModules(Ex) */
14 14
15#include "Evil.h" 15#include "evil_macro.h"
16#include "evil_util.h"
16#include "evil_private.h" 17#include "evil_private.h"
17 18
18#include "dlfcn.h" 19#include "dlfcn.h"
diff --git a/src/lib/evil/evil_dirent.c b/src/lib/evil/evil_dirent.c
index 6dcfca2..6f6b86a 100644
--- a/src/lib/evil/evil_dirent.c
+++ b/src/lib/evil/evil_dirent.c
@@ -2,10 +2,19 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <stdlib.h>
5#include <dirent.h> 6#include <dirent.h>
6#include <errno.h> 7#include <errno.h>
8#include <sys/types.h>
7 9
8#include "Evil.h" 10#ifndef WIN32_LEAN_AND_MEAN
11# define WIN32_LEAN_AND_MEAN
12#endif
13#include <windows.h>
14#undef WIN32_LEAN_AND_MEAN
15
16#include "evil_macro.h"
17#include "evil_stdio.h"
9 18
10 19
11struct DIR 20struct DIR
diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c
index 118ed17..188e476 100644
--- a/src/lib/evil/evil_fcntl.c
+++ b/src/lib/evil/evil_fcntl.c
@@ -6,8 +6,10 @@
6#include <sys/locking.h> 6#include <sys/locking.h>
7 7
8#include <winsock2.h> /* for ioctlsocket */ 8#include <winsock2.h> /* for ioctlsocket */
9#include <io.h>
9 10
10#include "Evil.h" 11#include "evil_macro.h"
12#include "evil_fcntl.h"
11 13
12 14
13/* 15/*
diff --git a/src/lib/evil/evil_inet.c b/src/lib/evil/evil_inet.c
index 05d130c..54cee3d 100644
--- a/src/lib/evil/evil_inet.c
+++ b/src/lib/evil/evil_inet.c
@@ -40,7 +40,6 @@
40 40
41#include "evil_macro.h" 41#include "evil_macro.h"
42#include "evil_inet.h" 42#include "evil_inet.h"
43#include "evil_private.h"
44 43
45#ifndef EMSGSIZE 44#ifndef EMSGSIZE
46# define EMSGSIZE WSAEMSGSIZE 45# define EMSGSIZE WSAEMSGSIZE
diff --git a/src/lib/evil/evil_inet.h b/src/lib/evil/evil_inet.h
index 6858a83..fb4e072 100644
--- a/src/lib/evil/evil_inet.h
+++ b/src/lib/evil/evil_inet.h
@@ -90,13 +90,6 @@
90EAPI int evil_inet_pton(int af, const char *src, void *dst); 90EAPI int evil_inet_pton(int af, const char *src, void *dst);
91 91
92/** 92/**
93 * @def inet_pton(x,y,z)
94 *
95 * Wrapper around evil_inet_pton().
96 */
97#define inet_pton(x,y,z) evil_inet_pton(x,y,z)
98
99/**
100 * @brief Convert IPv4 and IPv6 addresses from binary to text form. 93 * @brief Convert IPv4 and IPv6 addresses from binary to text form.
101 * 94 *
102 * @param af The address family. 95 * @param af The address family.
@@ -136,13 +129,6 @@ EAPI int evil_inet_pton(int af, const char *src, void *dst);
136 */ 129 */
137EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size); 130EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size);
138 131
139/**
140 * @def inet_ntop(x,y,z,s)
141 *
142 * Wrapper around evil_inet_ntop().
143 */
144#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
145
146 132
147#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */ 133#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */
148 134
diff --git a/src/lib/evil/evil_langinfo.c b/src/lib/evil/evil_langinfo.c
index 2cec67a..25a863a 100644
--- a/src/lib/evil/evil_langinfo.c
+++ b/src/lib/evil/evil_langinfo.c
@@ -2,7 +2,11 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include "Evil.h" 5#include <stdlib.h>
6#include <string.h>
7
8#include "evil_macro.h"
9#include "evil_langinfo.h"
6 10
7 11
8static char * 12static char *
diff --git a/src/lib/evil/evil_libgen.c b/src/lib/evil/evil_libgen.c
index 779193f..d96ba5b 100644
--- a/src/lib/evil/evil_libgen.c
+++ b/src/lib/evil/evil_libgen.c
@@ -4,7 +4,8 @@
4 4
5#include <string.h> 5#include <string.h>
6 6
7#include "Evil.h" 7#include "evil_macro.h"
8#include "evil_libgen.h"
8 9
9char _evil_basename_buf[PATH_MAX]; 10char _evil_basename_buf[PATH_MAX];
10char _evil_dirname_buf[PATH_MAX]; 11char _evil_dirname_buf[PATH_MAX];
diff --git a/src/lib/evil/evil_locale.c b/src/lib/evil/evil_locale.c
index d243ad8..0a28a5e 100644
--- a/src/lib/evil/evil_locale.c
+++ b/src/lib/evil/evil_locale.c
@@ -14,7 +14,6 @@
14 14
15#include "evil_macro.h" 15#include "evil_macro.h"
16#include "evil_locale.h" 16#include "evil_locale.h"
17#include "evil_private.h"
18 17
19/* 18/*
20 * LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME need at least a buffer 19 * LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME need at least a buffer
diff --git a/src/lib/evil/evil_locale.h b/src/lib/evil/evil_locale.h
index 6196800..4bf14ec 100644
--- a/src/lib/evil/evil_locale.h
+++ b/src/lib/evil/evil_locale.h
@@ -18,6 +18,8 @@
18 * @def LC_MESSAGES 18 * @def LC_MESSAGES
19 * 19 *
20 * New locale value, based on the one in libintl.h 20 * New locale value, based on the one in libintl.h
21 *
22 * @since 1.16
21 */ 23 */
22#ifdef LC_MESSAGES 24#ifdef LC_MESSAGES
23# undef LC_MESSAGES 25# undef LC_MESSAGES
@@ -43,18 +45,10 @@
43 * Conformity: Non applicable. 45 * Conformity: Non applicable.
44 * 46 *
45 * Supported OS: Windows XP. 47 * Supported OS: Windows XP.
46 */
47EAPI char *evil_setlocale(int category, const char *locale);
48
49/**
50 * @def setlocale(cat, loc)
51 * 48 *
52 * Wrapper around evil_setlocale(). 49 * @since 1.16
53 */ 50 */
54#ifdef setlocale /* libintl.h defines setlocale() but always returns "C" */ 51EAPI char *evil_setlocale(int category, const char *locale);
55# undef setlocale
56#endif
57#define setlocale(cat, loc) evil_setlocale(cat, loc)
58 52
59 53
60/** 54/**
diff --git a/src/lib/evil/evil_macro_pop.h b/src/lib/evil/evil_macro_pop.h
index bad78db..8b998c3 100644
--- a/src/lib/evil/evil_macro_pop.h
+++ b/src/lib/evil/evil_macro_pop.h
@@ -64,5 +64,8 @@
64#define SCNuPTR "llu" 64#define SCNuPTR "llu"
65#endif /* _WIN64 */ 65#endif /* _WIN64 */
66 66
67#undef EAPI
68#define EAPI
69
67 70
68#endif /* __EVIL_MACRO_POP_H__ */ 71#endif /* __EVIL_MACRO_POP_H__ */
diff --git a/src/lib/evil/evil_macro_wrapper.h b/src/lib/evil/evil_macro_wrapper.h
new file mode 100644
index 0000000..4eea1fa
--- /dev/null
+++ b/src/lib/evil/evil_macro_wrapper.h
@@ -0,0 +1,110 @@
1#ifndef __EVIL_MACRO_WRAPPER_H__
2#define __EVIL_MACRO_WRAPPER_H__
3
4
5/*
6 * evil_inet.h
7 */
8
9#if ! (_WIN32_WINNT >= 0x600 /* _WIN32_WINNT_VISTA */)
10
11/**
12 * @def inet_pton(x,y,z)
13 *
14 * Wrapper around evil_inet_pton().
15 */
16#define inet_pton(x,y,z) evil_inet_pton(x,y,z)
17
18/**
19 * @def inet_ntop(x,y,z,s)
20 *
21 * Wrapper around evil_inet_ntop().
22 */
23#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
24
25
26#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */
27
28/*
29 * evil_locale.h
30 */
31
32/**
33 * @def setlocale(cat, loc)
34 *
35 * Wrapper around evil_setlocale().
36 * @since 1.16
37 */
38#ifdef setlocale /* libintl.h defines setlocale() but always returns "C" */
39# undef setlocale
40#endif
41#define setlocale(cat, loc) evil_setlocale(cat, loc)
42
43/*
44 * evil_stdio.h
45 */
46
47/**
48 * @def rename(src, dest)
49 *
50 * Wrapper around evil_rename().
51 *
52 * @since 1.8
53 */
54#ifdef rename
55# undef rename
56#endif
57#define rename(src, dst) evil_rename(src, dst)
58
59/**
60 * @def mkdir(dirname, mode)
61 *
62 * Wrapper around evil_mkdir().
63 *
64 * @since 1.15
65 */
66#ifdef mkdir
67# undef mkdir
68#endif
69#define mkdir(dirname, mode) evil_mkdir(dirname, mode)
70
71/*
72 * evil_time.h
73 */
74
75/**
76 * @def localtime_r(t, r)
77 *
78 * Wrapper around evil_localtime_r().
79 */
80#ifdef localtime_r
81# undef localtime_r
82#endif
83#define localtime_r(t, r) evil_localtime_r(t, r)
84
85/*
86 * evil_unistd.h
87 */
88
89/**
90 * @def getcwd(b,s)
91 *
92 * Wrapper around evil_getcwd().
93 */
94#ifdef getcwd
95# undef getcwd
96#endif
97#define getcwd(b,s) evil_getcwd((b),(s))
98
99/**
100 * @def pipe(fds)
101 *
102 * Wrapper around evil_pipe().
103 */
104#ifdef pipe
105# undef pipe
106#endif
107#define pipe(fds) evil_pipe(fds)
108
109
110#endif
diff --git a/src/lib/evil/evil_main.c b/src/lib/evil/evil_main.c
index 79d4e34..2b7ae51 100644
--- a/src/lib/evil/evil_main.c
+++ b/src/lib/evil/evil_main.c
@@ -2,13 +2,17 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include <stdio.h>
6
5#ifndef WIN32_LEAN_AND_MEAN 7#ifndef WIN32_LEAN_AND_MEAN
6# define WIN32_LEAN_AND_MEAN 8# define WIN32_LEAN_AND_MEAN
7#endif 9#endif
8#include <winsock2.h> 10#include <winsock2.h>
9#undef WIN32_LEAN_AND_MEAN 11#undef WIN32_LEAN_AND_MEAN
10 12
11#include "Evil.h" 13#include "evil_macro.h"
14#include "evil_unistd.h"
15#include "evil_main.h"
12#include "evil_private.h" 16#include "evil_private.h"
13 17
14 18
@@ -18,6 +22,8 @@ extern LONGLONG _evil_time_freq;
18extern LONGLONG _evil_time_count; 22extern LONGLONG _evil_time_count;
19extern long _evil_time_second; 23extern long _evil_time_second;
20 24
25long _evil_systemtime_to_time(SYSTEMTIME st);
26
21int 27int
22evil_init(void) 28evil_init(void)
23{ 29{
diff --git a/src/lib/evil/evil_private.h b/src/lib/evil/evil_private.h
index 0f8b6d1..560b4e2 100644
--- a/src/lib/evil/evil_private.h
+++ b/src/lib/evil/evil_private.h
@@ -14,12 +14,6 @@ extern "C" {
14# endif 14# endif
15#endif 15#endif
16 16
17long _evil_systemtime_to_time(SYSTEMTIME st);
18
19void _evil_error_display(const char *fct, LONG res);
20
21void _evil_last_error_display(const char *fct);
22
23#ifdef __cplusplus 17#ifdef __cplusplus
24} 18}
25#endif 19#endif
diff --git a/src/lib/evil/evil_pwd.c b/src/lib/evil/evil_pwd.c
index f53b1d8..bcf9eb3 100644
--- a/src/lib/evil/evil_pwd.c
+++ b/src/lib/evil/evil_pwd.c
@@ -2,11 +2,13 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <stdio.h>
6
5#define _POSIX 7#define _POSIX
6#include <io.h> 8#include <io.h>
7#include <lmcons.h> 9#include <lmcons.h>
8 10
9#include "Evil.h" 11#include "evil_macro.h"
10#include "pwd.h" 12#include "pwd.h"
11 13
12 14
diff --git a/src/lib/evil/evil_stdio.c b/src/lib/evil/evil_stdio.c
index c30f0dc..5919d0c 100644
--- a/src/lib/evil/evil_stdio.c
+++ b/src/lib/evil/evil_stdio.c
@@ -3,8 +3,11 @@
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <direct.h> 5#include <direct.h>
6#include <sys/stat.h>
7#include <sys/types.h>
6 8
7#include "Evil.h" 9#include "evil_macro.h"
10#include "evil_stdio.h"
8#include "evil_private.h" 11#include "evil_private.h"
9 12
10#undef rename 13#undef rename
diff --git a/src/lib/evil/evil_stdio.h b/src/lib/evil/evil_stdio.h
index f1de75a..1f65609 100644
--- a/src/lib/evil/evil_stdio.h
+++ b/src/lib/evil/evil_stdio.h
@@ -45,13 +45,6 @@
45EAPI int evil_rename(const char *src, const char *dst); 45EAPI int evil_rename(const char *src, const char *dst);
46 46
47/** 47/**
48 * @def rename(src, dest)
49 *
50 * Wrapper around evil_rename().
51 */
52#define rename(src, dst) evil_rename(src, dst)
53
54/**
55 * @brief Wrap the _mkdir() function on Windows. 48 * @brief Wrap the _mkdir() function on Windows.
56 * 49 *
57 * @param[in] dirname The new dir name. 50 * @param[in] dirname The new dir name.
@@ -64,12 +57,5 @@ EAPI int evil_rename(const char *src, const char *dst);
64 */ 57 */
65EAPI int evil_mkdir(const char *dirname, mode_t mode); 58EAPI int evil_mkdir(const char *dirname, mode_t mode);
66 59
67/**
68 * @def mkdir(dirname, mode)
69 *
70 * Wrapper around evil_mkdir().
71 */
72#define mkdir(dirname, mode) evil_mkdir(dirname, mode)
73
74 60
75#endif /* __EVIL_STDIO_H__ */ 61#endif /* __EVIL_STDIO_H__ */
diff --git a/src/lib/evil/evil_stdlib.c b/src/lib/evil/evil_stdlib.c
index c10eafb..bcafb3a 100644
--- a/src/lib/evil/evil_stdlib.c
+++ b/src/lib/evil/evil_stdlib.c
@@ -19,7 +19,6 @@
19 19
20#include "evil_macro.h" 20#include "evil_macro.h"
21#include "evil_stdlib.h" 21#include "evil_stdlib.h"
22#include "evil_private.h"
23 22
24/* 23/*
25 * Environment variable related functions 24 * Environment variable related functions
diff --git a/src/lib/evil/evil_string.c b/src/lib/evil/evil_string.c
index 12411be..634565b 100644
--- a/src/lib/evil/evil_string.c
+++ b/src/lib/evil/evil_string.c
@@ -2,8 +2,12 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include "Evil.h" 5#include <stdlib.h>
6#include "evil_private.h" 6#include <string.h>
7#include <ctype.h>
8
9#include "evil_macro.h"
10#include "evil_string.h"
7 11
8 12
9/* 13/*
diff --git a/src/lib/evil/evil_time.c b/src/lib/evil/evil_time.c
index 1bd716a..76c5a58 100644
--- a/src/lib/evil/evil_time.c
+++ b/src/lib/evil/evil_time.c
@@ -7,7 +7,9 @@
7#include <ctype.h> 7#include <ctype.h>
8#include <time.h> 8#include <time.h>
9 9
10#include "Evil.h" 10#include "evil_macro.h"
11#include "evil_time.h"
12#include "evil_macro_wrapper.h"
11#include "evil_private.h" 13#include "evil_private.h"
12 14
13struct tm * 15struct tm *
diff --git a/src/lib/evil/evil_time.h b/src/lib/evil/evil_time.h
index c65115a..34607de 100644
--- a/src/lib/evil/evil_time.h
+++ b/src/lib/evil/evil_time.h
@@ -35,16 +35,6 @@
35EAPI struct tm *evil_localtime_r(const time_t *timep, struct tm *result); 35EAPI struct tm *evil_localtime_r(const time_t *timep, struct tm *result);
36 36
37/** 37/**
38 * @def localtime_r(t, r)
39 *
40 * Wrapper around evil_localtime_r().
41 */
42#ifdef localtime_r
43# undef localtime_r
44#endif
45#define localtime_r(t, r) evil_localtime_r(t, r)
46
47/**
48 * @brief Convert a string representation of time to a time tm structure . 38 * @brief Convert a string representation of time to a time tm structure .
49 * 39 *
50 * @param buf The string to convert. 40 * @param buf The string to convert.
diff --git a/src/lib/evil/evil_unistd.c b/src/lib/evil/evil_unistd.c
index c75f63f..27f6825 100644
--- a/src/lib/evil/evil_unistd.c
+++ b/src/lib/evil/evil_unistd.c
@@ -3,6 +3,7 @@
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <errno.h> 5#include <errno.h>
6#include <direct.h>
6# include <sys/time.h> 7# include <sys/time.h>
7 8
8#ifndef WIN32_LEAN_AND_MEAN 9#ifndef WIN32_LEAN_AND_MEAN
@@ -11,8 +12,8 @@
11#include <winsock2.h> 12#include <winsock2.h>
12#undef WIN32_LEAN_AND_MEAN 13#undef WIN32_LEAN_AND_MEAN
13 14
14#include "Evil.h" 15#include "evil_macro.h"
15#include "evil_private.h" 16#include "evil_unistd.h"
16 17
17 18
18LONGLONG _evil_time_freq; 19LONGLONG _evil_time_freq;
@@ -20,6 +21,8 @@ LONGLONG _evil_time_count;
20long _evil_time_second; 21long _evil_time_second;
21 22
22 23
24long _evil_systemtime_to_time(SYSTEMTIME st);
25
23long 26long
24_evil_systemtime_to_time(SYSTEMTIME st) 27_evil_systemtime_to_time(SYSTEMTIME st)
25{ 28{
diff --git a/src/lib/evil/evil_unistd.h b/src/lib/evil/evil_unistd.h
index 013fbf8..dbc6cfe 100644
--- a/src/lib/evil/evil_unistd.h
+++ b/src/lib/evil/evil_unistd.h
@@ -113,13 +113,6 @@ EAPI ssize_t readlink(const char *path, char *buf, size_t bufsiz);
113 */ 113 */
114EAPI char *evil_getcwd(char *buffer, size_t size); 114EAPI char *evil_getcwd(char *buffer, size_t size);
115 115
116/**
117 * @def getcwd(b,s)
118 *
119 * Wrapper around evil_getcwd().
120 */
121#define getcwd(b,s) evil_getcwd((b),(s))
122
123/* 116/*
124 * Sockets and pipe related functions 117 * Sockets and pipe related functions
125 * 118 *
@@ -166,13 +159,6 @@ EAPI void evil_sockets_shutdown(void);
166 */ 159 */
167EAPI int evil_pipe(int *fds); 160EAPI int evil_pipe(int *fds);
168 161
169/**
170 * @def pipe(fds)
171 *
172 * Wrapper around evil_pipe().
173 */
174#define pipe(fds) evil_pipe(fds)
175
176 162
177/** 163/**
178 * @} 164 * @}
diff --git a/src/lib/evil/evil_util.c b/src/lib/evil/evil_util.c
index 0fff26d..00ce36e 100644
--- a/src/lib/evil/evil_util.c
+++ b/src/lib/evil/evil_util.c
@@ -16,9 +16,11 @@
16 16
17#include "evil_macro.h" 17#include "evil_macro.h"
18#include "evil_util.h" 18#include "evil_util.h"
19#include "evil_private.h"
20 19
21 20
21/* static void _evil_error_display(const char *fct, LONG res); */
22static void _evil_last_error_display(const char *fct);
23
22wchar_t * 24wchar_t *
23evil_char_to_wchar(const char *text) 25evil_char_to_wchar(const char *text)
24{ 26{
@@ -159,15 +161,15 @@ evil_format_message(long err)
159 return disp; 161 return disp;
160} 162}
161 163
162void 164/* static void */
163_evil_error_display(const char *fct, LONG res) 165/* _evil_error_display(const char *fct, LONG res) */
164{ 166/* { */
165 char *error; 167/* char *error; */
166 168
167 error = evil_format_message(res); 169/* error = evil_format_message(res); */
168 fprintf(stderr, "[Evil] [%s] ERROR (%ld): %s\n", fct, res, error); 170/* fprintf(stderr, "[Evil] [%s] ERROR (%ld): %s\n", fct, res, error); */
169 free(error); 171/* free(error); */
170} 172/* } */
171 173
172char * 174char *
173evil_last_error_get(void) 175evil_last_error_get(void)
@@ -178,7 +180,7 @@ evil_last_error_get(void)
178 return evil_format_message(err); 180 return evil_format_message(err);
179} 181}
180 182
181void 183static void
182_evil_last_error_display(const char *fct) 184_evil_last_error_display(const char *fct)
183{ 185{
184 char *error; 186 char *error;