This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Tweak unload.exp to support Windows CE and setups where UNICODE is defined.
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: gdb-patches at sourceware dot org
- Date: Sat, 11 Aug 2007 19:25:13 +0100
- Subject: Tweak unload.exp to support Windows CE and setups where UNICODE is defined.
Hi,
The attached patch fixes unload.exp building on Windows CE, which always has
UNICODE defined. Tested that the testcase succeeds on a gdbserver/WinCE, a
remote to gdbserver/Cygwin, and a native Cygwin.
Cheers,
Pedro Alves
2007-08-11 Pedro Alves <pedro_alves@portugalmail.pt>
* gdb.base/unload.c (dlopen, dlsym): Use the TEXT macro to convert
the dll name to unicode.
---
gdb/testsuite/gdb.base/unload.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: src/gdb/testsuite/gdb.base/unload.c
===================================================================
--- src.orig/gdb/testsuite/gdb.base/unload.c 2007-07-18 13:26:00.000000000 +0100
+++ src/gdb/testsuite/gdb.base/unload.c 2007-08-08 21:37:12.000000000 +0100
@@ -21,8 +21,12 @@
#ifdef __WIN32__
#include <windows.h>
-#define dlopen(name, mode) LoadLibrary (name)
-#define dlsym(handle, func) GetProcAddress (handle, func)
+#define dlopen(name, mode) LoadLibrary (TEXT (name))
+#ifdef _WIN32_WCE
+# define dlsym(handle, func) GetProcAddress (handle, TEXT (func))
+#else
+# define dlsym(handle, func) GetProcAddress (handle, func)
+#endif
#define dlclose(handle) FreeLibrary (handle)
#define dlerror() "error %d occurred", GetLastError ()
#else