summaryrefslogtreecommitdiff
path: root/legacy/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2008-10-28 08:59:12 +0000
committerVincent Torri <vincent.torri@gmail.com>2008-10-28 08:59:12 +0000
commit9a0b7ebd1805753468369a9f6e8ba75a674cf8bf (patch)
treeddde4943f46ee16f05b6faa600dd31f71ffafd3e /legacy/evil
parent09c1768c9902fe786e7438dcd2f458452e1b9d05 (diff)
* configure.ac:
add c++ compiler checks remove linking against libuid.a as it's not an import lib. * src/bin/Makefile.am: * src/bin/evil_suite.c: * src/bin/evil_test_link.c: * src/bin/evil_test_link.h: add unit test for links. Must be improved. * src/lib/Makefile.am: add unistd.cpp and uuid.c use -fno-exceptions when compiling c++ code * src/lib/evil_unistd.c: * src/lib/evil_unistd.cpp: use C++ api to manage links on Windows XP. Can be considered as heavy but it's cleaner as the internals can change later. I might consider to compile Windows CE code with only C compiler as with mingw32ce, libstdc++ is statically linked to the DLL / app (legacy of mingw stuff), to reduce a bit the DLL size. * src/lib/evil_private.h: declare _evil_error_display() as C function (otherwise linker not happy) * src/lib/evil_stdlib.c: use RegCreateKeyEx() instead of RegOpenKeyEx in getenv(). fix an _evil_error_display() call. * src/lib/evil_util.c: add more error messages * src/lib/evil_uuid.c: define IID_IPersistFile (for links on Windows XP) * src/lib/evil_unistd.h: fix doc SVN revision: 37267
Diffstat (limited to 'legacy/evil')
-rw-r--r--legacy/evil/ChangeLog41
-rw-r--r--legacy/evil/configure.ac4
-rw-r--r--legacy/evil/src/bin/Makefile.am2
-rw-r--r--legacy/evil/src/bin/evil_suite.c6
-rw-r--r--legacy/evil/src/bin/evil_test_link.c67
-rw-r--r--legacy/evil/src/bin/evil_test_link.h8
-rw-r--r--legacy/evil/src/lib/Makefile.am6
-rw-r--r--legacy/evil/src/lib/evil_private.h8
-rw-r--r--legacy/evil/src/lib/evil_stdlib.c13
-rw-r--r--legacy/evil/src/lib/evil_unistd.cpp (renamed from legacy/evil/src/lib/evil_unistd.c)67
-rw-r--r--legacy/evil/src/lib/evil_unistd.h5
-rw-r--r--legacy/evil/src/lib/evil_util.c9
-rw-r--r--legacy/evil/src/lib/evil_uuid.c13
13 files changed, 187 insertions, 62 deletions
diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog
index f1a87bafaa..cfd9c97063 100644
--- a/legacy/evil/ChangeLog
+++ b/legacy/evil/ChangeLog
@@ -1,3 +1,44 @@
12008-10-28 Vincent Torri <doursse at users dot sf dot net>
2
3 * configure.ac:
4 add c++ compiler checks
5 remove linking against libuid.a as it's not an import lib.
6
7 * src/bin/Makefile.am:
8 * src/bin/evil_suite.c:
9 * src/bin/evil_test_link.c:
10 * src/bin/evil_test_link.h:
11 add unit test for links. Must be improved.
12
13 * src/lib/Makefile.am:
14 add unistd.cpp and uuid.c
15 use -fno-exceptions when compiling c++ code
16
17 * src/lib/evil_unistd.c:
18 * src/lib/evil_unistd.cpp:
19 use C++ api to manage links on Windows XP. Can be considered
20 as heavy but it's cleaner as the internals can change later.
21 I might consider to compile Windows CE code with only C compiler
22 as with mingw32ce, libstdc++ is statically linked to the
23 DLL / app (legacy of mingw stuff), to reduce a bit the DLL size.
24
25 * src/lib/evil_private.h:
26 declare _evil_error_display() as C function (otherwise linker
27 not happy)
28
29 * src/lib/evil_stdlib.c:
30 use RegCreateKeyEx() instead of RegOpenKeyEx in getenv().
31 fix an _evil_error_display() call.
32
33 * src/lib/evil_util.c:
34 add more error messages
35
36 * src/lib/evil_uuid.c:
37 define IID_IPersistFile (for links on Windows XP)
38
39 * src/lib/evil_unistd.h:
40 fix doc
41
12008-10-25 Vincent Torri <doursse at users dot sf dot net> 422008-10-25 Vincent Torri <doursse at users dot sf dot net>
2 43
3 * src/lib/evil_unistd.c: 44 * src/lib/evil_unistd.c:
diff --git a/legacy/evil/configure.ac b/legacy/evil/configure.ac
index aefc957ac0..2ed16984c6 100644
--- a/legacy/evil/configure.ac
+++ b/legacy/evil/configure.ac
@@ -18,7 +18,6 @@ esac
18AM_INIT_AUTOMAKE(1.6 dist-bzip2) 18AM_INIT_AUTOMAKE(1.6 dist-bzip2)
19 19
20AC_LIBTOOL_WIN32_DLL 20AC_LIBTOOL_WIN32_DLL
21define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
22define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl 21define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
23AC_PROG_LIBTOOL 22AC_PROG_LIBTOOL
24 23
@@ -35,7 +34,7 @@ AC_SUBST(version_info)
35win32_libs="" 34win32_libs=""
36case "$host_os" in 35case "$host_os" in
37 mingw | mingw32 | mingw32msvc) 36 mingw | mingw32 | mingw32msvc)
38 win32_libs="-lole32 -luuid -lws2_32 -lsecur32" 37 win32_libs="-lole32 -lws2_32 -lsecur32"
39 ;; 38 ;;
40 cegcc*) 39 cegcc*)
41 win32_libs="-lws2" 40 win32_libs="-lws2"
@@ -55,6 +54,7 @@ AC_CHECK_HEADERS_ONCE([errno.h])
55 54
56### Checks for programs 55### Checks for programs
57AM_PROG_AS 56AM_PROG_AS
57AC_PROG_CXX
58AC_LANG(C) 58AC_LANG(C)
59AC_PROG_CPP 59AC_PROG_CPP
60AC_PROG_CC 60AC_PROG_CC
diff --git a/legacy/evil/src/bin/Makefile.am b/legacy/evil/src/bin/Makefile.am
index f26f21f7c2..f5ee70802c 100644
--- a/legacy/evil/src/bin/Makefile.am
+++ b/legacy/evil/src/bin/Makefile.am
@@ -14,6 +14,7 @@ bin_PROGRAMS = evil_suite test_dlfcn test_pipe test_evil
14evil_suite_SOURCES = \ 14evil_suite_SOURCES = \
15evil_suite.c \ 15evil_suite.c \
16evil_test_environment.c \ 16evil_test_environment.c \
17evil_test_link.c \
17evil_test_memcpy.c 18evil_test_memcpy.c
18 19
19if EVIL_HAVE_WINCE 20if EVIL_HAVE_WINCE
@@ -44,4 +45,5 @@ test_evil_LDFLAGS = -Wl,--enable-auto-import
44EXTRA_DIST = \ 45EXTRA_DIST = \
45evil_suite.h \ 46evil_suite.h \
46evil_test_environment.h \ 47evil_test_environment.h \
48evil_test_link.h \
47evil_test_memcpy.h 49evil_test_memcpy.h
diff --git a/legacy/evil/src/bin/evil_suite.c b/legacy/evil/src/bin/evil_suite.c
index 28b11efa95..8df639a7b3 100644
--- a/legacy/evil/src/bin/evil_suite.c
+++ b/legacy/evil/src/bin/evil_suite.c
@@ -7,6 +7,7 @@
7 7
8#include "evil_suite.h" 8#include "evil_suite.h"
9#include "evil_test_environment.h" 9#include "evil_test_environment.h"
10#include "evil_test_link.h"
10#include "evil_test_memcpy.h" 11#include "evil_test_memcpy.h"
11 12
12 13
@@ -150,6 +151,7 @@ main()
150{ 151{
151 test tests[] = { 152 test tests[] = {
152 { "environment", test_environment }, 153 { "environment", test_environment },
154 { "link ", test_link },
153 { "memcpy ", test_memcpy }, 155 { "memcpy ", test_memcpy },
154 { NULL, NULL }, 156 { NULL, NULL },
155 }; 157 };
@@ -160,10 +162,8 @@ main()
160 if (!s) 162 if (!s)
161 return EXIT_FAILURE; 163 return EXIT_FAILURE;
162 164
163 for (i = 0; ; ++i) 165 for (i = 0; tests[i].name; ++i)
164 { 166 {
165 if (!tests[i].name)
166 break;
167 167
168 suite_test_add(s, tests[i].name, tests[i].fct); 168 suite_test_add(s, tests[i].name, tests[i].fct);
169 } 169 }
diff --git a/legacy/evil/src/bin/evil_test_link.c b/legacy/evil/src/bin/evil_test_link.c
new file mode 100644
index 0000000000..d91facfc0f
--- /dev/null
+++ b/legacy/evil/src/bin/evil_test_link.c
@@ -0,0 +1,67 @@
1
2
3#ifdef HAVE_CONFIG_H
4# include "config.h"
5#endif /* HAVE_CONFIG_H */
6
7#include <stdio.h>
8#include <string.h>
9
10#include <Evil.h>
11
12#include "evil_suite.h"
13
14static int
15test_link_test_file_create(const char *name, const char *data)
16{
17 FILE *f;
18 size_t length;
19 size_t res;
20
21 f = fopen(name, "wb");
22 if (!f)
23 return 0;
24
25 length = strlen(data) + 1;
26 res = fwrite(data, 1, length, f);
27 if (res < length)
28 {
29 fclose(f);
30 return 0;
31 }
32
33 fclose(f);
34
35 return 1;
36}
37
38static int
39test_link_test_symlink(void)
40{
41 int res;
42
43 if (!test_link_test_file_create("evil_test_link.dat",
44 "evil_test_link symlink data\n"))
45 return 0;
46
47 if (symlink("evil_test_link.dat", "evil_test_link") < 0)
48 return 0;
49
50 if (unlink("evil_test_link.dat") < 0)
51 return 0;
52
53 return 1;
54}
55
56static int
57test_link_tests_run(suite *s)
58{
59 return test_link_test_symlink();
60}
61
62int
63test_link(suite *s)
64{
65
66 return test_link_tests_run(s);
67}
diff --git a/legacy/evil/src/bin/evil_test_link.h b/legacy/evil/src/bin/evil_test_link.h
new file mode 100644
index 0000000000..4867357a17
--- /dev/null
+++ b/legacy/evil/src/bin/evil_test_link.h
@@ -0,0 +1,8 @@
1#ifndef __EVIL_TEST_LINK__
2#define __EVIL_TEST_LINK__
3
4
5int test_link(suite *s);
6
7
8#endif /* __EVIL_TEST_LINK__ */
diff --git a/legacy/evil/src/lib/Makefile.am b/legacy/evil/src/lib/Makefile.am
index 0733ebe034..3b2d2fd487 100644
--- a/legacy/evil/src/lib/Makefile.am
+++ b/legacy/evil/src/lib/Makefile.am
@@ -35,11 +35,13 @@ evil_stdlib.c \
35evil_stdio.c \ 35evil_stdio.c \
36evil_string.c \ 36evil_string.c \
37evil_time.c \ 37evil_time.c \
38evil_unistd.c \ 38evil_unistd.cpp \
39evil_util.c 39evil_util.c \
40evil_uuid.c
40 41
41libevil_la_CPPFLAGS = @win32_cppflags@ 42libevil_la_CPPFLAGS = @win32_cppflags@
42libevil_la_CFLAGS = @win32_cflags@ 43libevil_la_CFLAGS = @win32_cflags@
44libevil_la_CXXFLAGS = -fno-exceptions
43libevil_la_LIBADD = @win32_libs@ $(EFL_MPATROL_LIBS) 45libevil_la_LIBADD = @win32_libs@ $(EFL_MPATROL_LIBS)
44libevil_la_LDFLAGS = -no-undefined -Wl,--enable-auto-import -version-info @version_info@ 46libevil_la_LDFLAGS = -no-undefined -Wl,--enable-auto-import -version-info @version_info@
45 47
diff --git a/legacy/evil/src/lib/evil_private.h b/legacy/evil/src/lib/evil_private.h
index 2933931e46..c2a7e2d0e3 100644
--- a/legacy/evil/src/lib/evil_private.h
+++ b/legacy/evil/src/lib/evil_private.h
@@ -2,7 +2,15 @@
2#define __EVIL_PRIVATE_H__ 2#define __EVIL_PRIVATE_H__
3 3
4 4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
5void _evil_error_display(const char *fct, LONG res); 9void _evil_error_display(const char *fct, LONG res);
6 10
11#ifdef __cplusplus
12}
13#endif
14
7 15
8#endif /* __EVIL_PRIVATE_H__ */ 16#endif /* __EVIL_PRIVATE_H__ */
diff --git a/legacy/evil/src/lib/evil_stdlib.c b/legacy/evil/src/lib/evil_stdlib.c
index 0f4bdccf06..7a19cf3676 100644
--- a/legacy/evil/src/lib/evil_stdlib.c
+++ b/legacy/evil/src/lib/evil_stdlib.c
@@ -39,17 +39,20 @@ getenv(const char *name)
39 wchar_t *wname; 39 wchar_t *wname;
40 LONG res; 40 LONG res;
41 DWORD type; 41 DWORD type;
42 DWORD disposition;
42 DWORD size = PATH_MAX; 43 DWORD size = PATH_MAX;
43 44
44 if (!name || !*name) 45 if (!name || !*name)
45 return NULL; 46 return NULL;
46 47
47 if ((res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, 48 if ((res = RegCreateKeyEx(HKEY_LOCAL_MACHINE,
48 TEXT("Software\\Efl\\Environment"), 49 TEXT("Software\\Efl\\Environment"),
49 0, 0, 50 0, NULL,
50 &key)) != ERROR_SUCCESS) 51 REG_OPTION_VOLATILE,
52 0, NULL,
53 &key, &disposition)) != ERROR_SUCCESS)
51 { 54 {
52 _evil_error_display(__FILE__, res); 55 _evil_error_display(__FUNCTION__, res);
53 return NULL; 56 return NULL;
54 } 57 }
55 58
diff --git a/legacy/evil/src/lib/evil_unistd.c b/legacy/evil/src/lib/evil_unistd.cpp
index ae45910fd7..1cbc675b1f 100644
--- a/legacy/evil/src/lib/evil_unistd.c
+++ b/legacy/evil/src/lib/evil_unistd.cpp
@@ -17,6 +17,10 @@
17# include <objidl.h> 17# include <objidl.h>
18#endif 18#endif
19 19
20#ifdef _WIN32_WCE
21# include <shellapi.h>
22#endif
23
20#include "Evil.h" 24#include "Evil.h"
21#include "evil_private.h" 25#include "evil_private.h"
22 26
@@ -37,19 +41,6 @@ getpid(void)
37 * 41 *
38 */ 42 */
39 43
40#if defined(__CEGCC__) || defined(__MINGW32CE__)
41
42DWORD SHCreateShortcutEx(LPTSTR lpszDir,
43 LPTSTR lpszTarget,
44 LPTSTR szShortcut,
45 LPDWORD lpcbShortcut);
46
47BOOL SHGetShortcutTarget(LPTSTR szShortcut,
48 LPTSTR szTarget,
49 int cbMax );
50
51#endif /* __CEGCC__ || __MINGW32CE__ */
52
53 44
54/* REMARK: Windows has no symbolic link. */ 45/* REMARK: Windows has no symbolic link. */
55/* Nevertheless, it can create and read .lnk files */ 46/* Nevertheless, it can create and read .lnk files */
@@ -79,9 +70,7 @@ symlink(const char *oldpath, const char *newpath)
79 70
80 return res ? 0 : -1; 71 return res ? 0 : -1;
81#else 72#else
82# ifdef UNICODE
83 wchar_t new_path[MB_CUR_MAX]; 73 wchar_t new_path[MB_CUR_MAX];
84# endif /* UNICODE */
85 IShellLink *pISL; 74 IShellLink *pISL;
86 IShellLink **shell_link; 75 IShellLink **shell_link;
87 IPersistFile *pIPF; 76 IPersistFile *pIPF;
@@ -100,41 +89,36 @@ symlink(const char *oldpath, const char *newpath)
100 89
101 /* Hack to cleanly remove a warning */ 90 /* Hack to cleanly remove a warning */
102 shell_link = &pISL; 91 shell_link = &pISL;
103 if (FAILED(CoCreateInstance(&CLSID_ShellLink, 92 if (FAILED(CoCreateInstance(CLSID_ShellLink,
104 NULL, 93 NULL,
105 CLSCTX_INPROC_SERVER, 94 CLSCTX_INPROC_SERVER,
106 &IID_IShellLink, 95 IID_IShellLink,
107 (void **)shell_link))) 96 (void **)shell_link)))
108 goto no_instance; 97 goto no_instance;
109 98
110 if (FAILED(pISL->lpVtbl->SetPath(pISL, oldpath))) 99 if (FAILED(pISL->SetPath(oldpath)))
111 goto no_setpath; 100 goto no_setpath;
112 101
113 /* Hack to cleanly remove a warning */ 102 /* Hack to cleanly remove a warning */
114 persit_file = &pIPF; 103 persit_file = &pIPF;
115 if (FAILED(pISL->lpVtbl->QueryInterface(pISL, &IID_IPersistFile, (void **)persit_file))) 104 if (FAILED(pISL->QueryInterface(IID_IPersistFile, (void **)persit_file)))
116 goto no_queryinterface; 105 goto no_queryinterface;
117 106
118# ifdef UNICODE
119 mbstowcs(new_path, newpath, MB_CUR_MAX); 107 mbstowcs(new_path, newpath, MB_CUR_MAX);
120 if (FAILED(pIPF->lpVtbl->Save(pIPF, new_path, FALSE))) 108 if (FAILED(pIPF->Save(new_path, FALSE)))
121 goto no_save; 109 goto no_save;
122# else
123 if (FAILED(pIPF->lpVtbl->Save(pIPF, newpath, FALSE)))
124 goto no_save;
125# endif /* ! UNICODE */
126 110
127 pIPF->lpVtbl->Release(pIPF); 111 pIPF->Release();
128 pISL->lpVtbl->Release(pISL); 112 pISL->Release();
129 CoUninitialize(); 113 CoUninitialize();
130 114
131 return 0; 115 return 0;
132 116
133 no_save: 117 no_save:
134 pIPF->lpVtbl->Release(pIPF); 118 pIPF->Release();
135 no_queryinterface: 119 no_queryinterface:
136 no_setpath: 120 no_setpath:
137 pISL->lpVtbl->Release(pISL); 121 pISL->Release();
138 no_instance: 122 no_instance:
139 CoUninitialize(); 123 CoUninitialize();
140 return -1; 124 return -1;
@@ -176,9 +160,7 @@ readlink(const char *path, char *buf, size_t bufsiz)
176 160
177 return length; 161 return length;
178#else 162#else
179# ifdef UNICODE
180 wchar_t old_path[MB_CUR_MAX]; 163 wchar_t old_path[MB_CUR_MAX];
181# endif /* UNICODE */
182 char new_path[PATH_MAX]; 164 char new_path[PATH_MAX];
183 IShellLink *pISL; 165 IShellLink *pISL;
184 IShellLink **shell_link; 166 IShellLink **shell_link;
@@ -199,27 +181,22 @@ readlink(const char *path, char *buf, size_t bufsiz)
199 181
200 /* Hack to cleanly remove a warning */ 182 /* Hack to cleanly remove a warning */
201 persit_file = &pIPF; 183 persit_file = &pIPF;
202 if (FAILED(CoCreateInstance(&CLSID_ShellLink, 184 if (FAILED(CoCreateInstance(CLSID_ShellLink,
203 NULL, 185 NULL,
204 CLSCTX_INPROC_SERVER, 186 CLSCTX_INPROC_SERVER,
205 &IID_IPersistFile, 187 IID_IPersistFile,
206 (void **)persit_file))) 188 (void **)persit_file)))
207 goto no_instance; 189 goto no_instance;
208 190
209# ifdef UNICODE
210 mbstowcs(old_path, path, MB_CUR_MAX); 191 mbstowcs(old_path, path, MB_CUR_MAX);
211 if (FAILED(pIPF->lpVtbl->Load(pIPF, old_path, STGM_READWRITE))) 192 if (FAILED(pIPF->Load(old_path, STGM_READWRITE)))
212 goto no_load;
213# else
214 if (FAILED(pIPF->lpVtbl->Load(pIPF, path, STGM_READWRITE)))
215 goto no_load; 193 goto no_load;
216# endif /* ! UNICODE */
217 194
218 shell_link = &pISL; 195 shell_link = &pISL;
219 if (FAILED(pIPF->lpVtbl->QueryInterface(pIPF, &IID_IShellLink, (void **)shell_link))) 196 if (FAILED(pIPF->QueryInterface(IID_IShellLink, (void **)shell_link)))
220 goto no_queryinterface; 197 goto no_queryinterface;
221 198
222 if (FAILED(pISL->lpVtbl->GetPath(pISL, new_path, PATH_MAX, NULL, 0))) 199 if (FAILED(pISL->GetPath(new_path, PATH_MAX, NULL, 0)))
223 goto no_getpath; 200 goto no_getpath;
224 201
225 length = strlen(new_path); 202 length = strlen(new_path);
@@ -228,17 +205,17 @@ readlink(const char *path, char *buf, size_t bufsiz)
228 205
229 memcpy(buf, new_path, length); 206 memcpy(buf, new_path, length);
230 207
231 pISL->lpVtbl->Release(pISL); 208 pISL->Release();
232 pIPF->lpVtbl->Release(pIPF); 209 pIPF->Release();
233 CoUninitialize(); 210 CoUninitialize();
234 211
235 return length; 212 return length;
236 213
237 no_getpath: 214 no_getpath:
238 pISL->lpVtbl->Release(pISL); 215 pISL->Release();
239 no_queryinterface: 216 no_queryinterface:
240 no_load: 217 no_load:
241 pIPF->lpVtbl->Release(pIPF); 218 pIPF->Release();
242 no_instance: 219 no_instance:
243 CoUninitialize(); 220 CoUninitialize();
244 return -1; 221 return -1;
diff --git a/legacy/evil/src/lib/evil_unistd.h b/legacy/evil/src/lib/evil_unistd.h
index fd86d06da9..2c0c928997 100644
--- a/legacy/evil/src/lib/evil_unistd.h
+++ b/legacy/evil/src/lib/evil_unistd.h
@@ -71,9 +71,8 @@ EAPI int symlink(const char *oldpath, const char *newpath);
71 * Place the content of the shell link @p path in the buffer 71 * Place the content of the shell link @p path in the buffer
72 * @p buf, which has size @p bufzsiz. 72 * @p buf, which has size @p bufzsiz.
73 * 73 *
74 * On success, this function returns the count of characters 74 * On success, this function returns 0. Otherwise, it returns -1 and
75 * placed in the buffer. Otherwise, it returns -1 and errno may 75 * errno may be set to the following value:
76 * be set to the following value:
77 * - ENOMEM: Not enough memory. 76 * - ENOMEM: Not enough memory.
78 * 77 *
79 * On Windows, the symbolic links do not exist. Nevertheless 78 * On Windows, the symbolic links do not exist. Nevertheless
diff --git a/legacy/evil/src/lib/evil_util.c b/legacy/evil/src/lib/evil_util.c
index b5a97c7e48..b7f42574ff 100644
--- a/legacy/evil/src/lib/evil_util.c
+++ b/legacy/evil/src/lib/evil_util.c
@@ -70,7 +70,12 @@ evil_format_message(long err)
70 (LPTSTR)&msg, 70 (LPTSTR)&msg,
71 0, 71 0,
72 NULL)) 72 NULL))
73 return NULL; 73 {
74 char buf[4096];
75
76 snprintf(buf, 4096, "FormatMessage failed with error %ld\n", GetLastError());
77 return strdup(buf);
78 }
74 79
75#ifdef UNICODE 80#ifdef UNICODE
76 str = evil_wchar_to_char(msg); 81 str = evil_wchar_to_char(msg);
@@ -98,7 +103,7 @@ _evil_error_display(const char *fct, LONG res)
98 char *error; 103 char *error;
99 104
100 error = evil_format_message(res); 105 error = evil_format_message(res);
101 fprintf(stderr, "[Evil] [%s] ERROR: %s\n", fct, error); 106 fprintf(stderr, "[Evil] [%s] ERROR (%ld): %s\n", fct, res, error);
102 free(error); 107 free(error);
103} 108}
104 109
diff --git a/legacy/evil/src/lib/evil_uuid.c b/legacy/evil/src/lib/evil_uuid.c
new file mode 100644
index 0000000000..09026d2cd4
--- /dev/null
+++ b/legacy/evil/src/lib/evil_uuid.c
@@ -0,0 +1,13 @@
1
2#if ! defined(__CEGCC__) && ! defined(__MINGW32CE__)
3/*
4 * Defines the windows UUID IID_IPersistFile used for links in
5 * evil. This is here since uuid.lib is a static only library and
6 * libtool does not allow you to link a DLL against a static library.
7 */
8
9# define INITGUID
10# include <basetyps.h>
11DEFINE_OLEGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
12
13#endif /* ! __CEGCC__ && ! __MINGW32CE__ */