mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Fix some additional -DUNICODE issues on win32.
Brodie's patch didn't catch the ones that were new since 1.4.
This commit is contained in:
parent
000a33ec83
commit
a7a943106c
14
evdns.c
14
evdns.c
@ -3415,7 +3415,7 @@ evdns_get_default_hosts_filename(void)
|
||||
char *path_out;
|
||||
int len_out;
|
||||
|
||||
if (! SHGetSpecialFolderPath(NULL, path, CSIDL_SYSTEM, 0))
|
||||
if (! SHGetSpecialFolderPathA(NULL, path, CSIDL_SYSTEM, 0))
|
||||
return NULL;
|
||||
len_out = strlen(path)+strlen(hostfile);
|
||||
path_out = mm_malloc(len_out+1);
|
||||
@ -3530,7 +3530,7 @@ load_nameservers_with_getnetworkparams(struct evdns_base *base)
|
||||
GetNetworkParams_fn_t fn;
|
||||
|
||||
ASSERT_LOCKED(base);
|
||||
if (!(handle = LoadLibraryA("iphlpapi.dll"))) {
|
||||
if (!(handle = LoadLibraryA("iphlpapi.dll"))) {
|
||||
log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll");
|
||||
status = -1;
|
||||
goto done;
|
||||
@ -3603,13 +3603,13 @@ config_nameserver_from_reg_key(struct evdns_base *base, HKEY key, const char *su
|
||||
int status = 0;
|
||||
|
||||
ASSERT_LOCKED(base);
|
||||
if (RegQueryValueExA(key, subkey, 0, &type, NULL, &bufsz)
|
||||
if (RegQueryValueExA(key, subkey, 0, &type, NULL, &bufsz)
|
||||
!= ERROR_MORE_DATA)
|
||||
return -1;
|
||||
if (!(buf = mm_malloc(bufsz)))
|
||||
return -1;
|
||||
|
||||
if (RegQueryValueExA(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
|
||||
if (RegQueryValueExA(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
|
||||
== ERROR_SUCCESS && bufsz > 1) {
|
||||
status = evdns_nameserver_ip_add_line(base,buf);
|
||||
}
|
||||
@ -3641,12 +3641,12 @@ load_nameservers_from_registry(struct evdns_base *base)
|
||||
if (((int)GetVersion()) > 0) { /* NT */
|
||||
HKEY nt_key = 0, interfaces_key = 0;
|
||||
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
|
||||
KEY_READ, &nt_key) != ERROR_SUCCESS) {
|
||||
log(EVDNS_LOG_DEBUG,"Couldn't open nt key, %d",(int)GetLastError());
|
||||
return -1;
|
||||
}
|
||||
r = RegOpenKeyExA(nt_key, "Interfaces", 0,
|
||||
r = RegOpenKeyExA(nt_key, "Interfaces", 0,
|
||||
KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,
|
||||
&interfaces_key);
|
||||
if (r != ERROR_SUCCESS) {
|
||||
@ -3661,7 +3661,7 @@ load_nameservers_from_registry(struct evdns_base *base)
|
||||
RegCloseKey(nt_key);
|
||||
} else {
|
||||
HKEY win_key = 0;
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
|
||||
KEY_READ, &win_key) != ERROR_SUCCESS) {
|
||||
log(EVDNS_LOG_DEBUG, "Couldn't open registry key, %d", (int)GetLastError());
|
||||
return -1;
|
||||
|
@ -107,7 +107,7 @@ _testcase_run_forked(const struct testgroup_t *group,
|
||||
*/
|
||||
int ok;
|
||||
char buffer[LONGEST_TEST_NAME+256];
|
||||
STARTUPINFO si;
|
||||
STARTUPINFOA si;
|
||||
PROCESS_INFORMATION info;
|
||||
DWORD exitcode;
|
||||
|
||||
@ -126,7 +126,7 @@ _testcase_run_forked(const struct testgroup_t *group,
|
||||
memset(&info, 0, sizeof(info));
|
||||
si.cb = sizeof(si);
|
||||
|
||||
ok = CreateProcess(commandname, buffer, NULL, NULL, 0,
|
||||
ok = CreateProcessA(commandname, buffer, NULL, NULL, 0,
|
||||
0, NULL, NULL, &si, &info);
|
||||
if (!ok) {
|
||||
printf("CreateProcess failed!\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user