[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] patch for libevent 1.4.13 for building win32 + unicode
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] patch for libevent 1.4.13 for building win32 + unicode
- From: Brodie Thiesfield <brofield2@xxxxxxxxxxxx>
- Date: Thu, 04 Feb 2010 11:58:00 +0900
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Wed, 03 Feb 2010 21:58:14 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:content-type; bh=Od1yaKX08vq5D3O5SW2kJRsM5oUzvqX7zkuaEOKxrrM=; b=CUcZPEDzjbt8fkynsza3l9QYPO/kjc2wKwxA5EorerWifJaAIDueHxAHzsQisXYMU1 D6Ei+2vyrRZ+FsxPAd93gWnulCshrd5OkZEPa+Tr8ef8yP2/XRVOB7N6pazEDiQjqbCT 4m6A+Tm3IDDlx9EaED8CPIxL4JcbRxQhFaQS0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type; b=UZppTW0Wbpv9ScBnGxelzBY2lCwUpXBX9LieMyaK8ErhB1jrMqSKEWORx53WrsYfuR FzEzsSfn+VwhKi7RDCkQtA4MkE/GqRFwy775EwhcRuaGNxE/87m1Gs1h9SARHX5b3gKU 7qgzwCj0trI3ubwEXO7kKRd0f8kaA2/BSL4tQ=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
Hi,
The following (and attached) patch fixes calls to the win32 api to
explicitly call the char* versions of the functions. This fixes build
failures when libevent is built with the UNICODE define.
Regards,
Brodie
--- evdns.orig.c 2009-07-24 00:17:02.000000000 +0900
+++ evdns.c 2010-02-04 11:46:54.046659000 +0900
@@ -2848,3 +2848,3 @@
- if (!(handle = LoadLibrary("iphlpapi.dll"))) {
+ if (!(handle = LoadLibraryA("iphlpapi.dll"))) {
log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll");
@@ -2918,3 +2918,3 @@
- if (RegQueryValueEx(key, subkey, 0, &type, NULL, &bufsz)
+ if (RegQueryValueExA(key, subkey, 0, &type, NULL, &bufsz)
!= ERROR_MORE_DATA)
@@ -2924,3 +2924,3 @@
- if (RegQueryValueEx(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
+ if (RegQueryValueExA(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
== ERROR_SUCCESS && bufsz > 1) {
@@ -2954,3 +2954,3 @@
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
KEY_READ, &nt_key) != ERROR_SUCCESS) {
@@ -2959,3 +2959,3 @@
}
- r = RegOpenKeyEx(nt_key, "Interfaces", 0,
+ r = RegOpenKeyExA(nt_key, "Interfaces", 0,
KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,
@@ -2974,3 +2974,3 @@
HKEY win_key = 0;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
KEY_READ, &win_key) != ERROR_SUCCESS) {
--- sample\event-test.orig.c 2008-11-17 05:35:40.000000000 +0900
+++ sample\event-test.c 2010-02-04 11:49:56.751109100 +0900
@@ -75,3 +75,3 @@
// Open a file.
- socket = CreateFile("test.txt", // open File
+ socket = CreateFileA("test.txt", // open File
GENERIC_READ, // open for reading
--- evdns.orig.c 2009-07-24 00:17:02.000000000 +0900
+++ evdns.c 2010-02-04 11:46:54.046659000 +0900
@@ -2848,3 +2848,3 @@
- if (!(handle = LoadLibrary("iphlpapi.dll"))) {
+ if (!(handle = LoadLibraryA("iphlpapi.dll"))) {
log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll");
@@ -2918,3 +2918,3 @@
- if (RegQueryValueEx(key, subkey, 0, &type, NULL, &bufsz)
+ if (RegQueryValueExA(key, subkey, 0, &type, NULL, &bufsz)
!= ERROR_MORE_DATA)
@@ -2924,3 +2924,3 @@
- if (RegQueryValueEx(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
+ if (RegQueryValueExA(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
== ERROR_SUCCESS && bufsz > 1) {
@@ -2954,3 +2954,3 @@
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
KEY_READ, &nt_key) != ERROR_SUCCESS) {
@@ -2959,3 +2959,3 @@
}
- r = RegOpenKeyEx(nt_key, "Interfaces", 0,
+ r = RegOpenKeyExA(nt_key, "Interfaces", 0,
KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,
@@ -2974,3 +2974,3 @@
HKEY win_key = 0;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
KEY_READ, &win_key) != ERROR_SUCCESS) {
--- sample\event-test.orig.c 2008-11-17 05:35:40.000000000 +0900
+++ sample\event-test.c 2010-02-04 11:49:56.751109100 +0900
@@ -75,3 +75,3 @@
// Open a file.
- socket = CreateFile("test.txt", // open File
+ socket = CreateFileA("test.txt", // open File
GENERIC_READ, // open for reading