From: Guido Serassio Date: Tue, 8 Jul 2008 10:33:53 +0000 (+0200) Subject: Windows port: Fix various build errors X-Git-Tag: SQUID_3_0_STABLE8~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0078d6b671b7f8df4e294ef93816b95d157c4c12;p=thirdparty%2Fsquid.git Windows port: Fix various build errors --- diff --git a/include/squid_mswin.h b/include/squid_mswin.h index 345aa436a5..138f403d51 100644 --- a/include/squid_mswin.h +++ b/include/squid_mswin.h @@ -70,7 +70,6 @@ typedef unsigned long ino_t; #include "default_config_file.h" /* Some tricks for MS Compilers */ #define __STDC__ 1 -#pragma include_alias(, ) #define THREADLOCAL __declspec(thread) #elif defined(__GNUC__) /* gcc environment */ @@ -221,12 +220,9 @@ struct timezone #include #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */ #pragma warning (pop) -#include "readdir.h" -#else +#endif #include #include -#include -#endif typedef char * caddr_t; diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 7730334381..32d951d459 100755 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -388,7 +388,7 @@ idnsParseWIN32SearchList(const char * Separator) t = (char *) xmalloc(Size); RegQueryValueEx(hndKey, "Domain", NULL, &Type, (LPBYTE) t, &Size); - debugs(78, 1, "Adding domain " << token << " from Registry"); + debugs(78, 1, "Adding domain " << t << " from Registry"); idnsAddPathComponent(t); xfree(t); } @@ -412,7 +412,7 @@ idnsParseWIN32SearchList(const char * Separator) RegCloseKey(hndKey); } - if (npc == 0 && ((const char *) t = getMyHostname())) { + if (npc == 0 && (t = (char *) getMyHostname())) { t = strchr(t, '.'); if (t) idnsAddPathComponent(t + 1); @@ -443,7 +443,7 @@ idnsParseWIN32Registry(void) if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, t, + RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, (LPBYTE) t, &Size); token = strtok(t, ", "); @@ -460,7 +460,7 @@ idnsParseWIN32Registry(void) if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey, "NameServer", NULL, &Type, t, &Size); + RegQueryValueEx(hndKey, "NameServer", NULL, &Type, (LPBYTE) t, &Size); token = strtok(t, ", "); while (token) { @@ -514,7 +514,7 @@ idnsParseWIN32Registry(void) if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, - &Type, t, &Size); + &Type, (LPBYTE) t, &Size); token = strtok(t, ", "); while (token) { @@ -532,7 +532,7 @@ idnsParseWIN32Registry(void) if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, - t, &Size); + (LPBYTE) t, &Size); token = strtok(t, ", "); while (token) { @@ -573,7 +573,7 @@ idnsParseWIN32Registry(void) if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); - RegQueryValueEx(hndKey, "NameServer", NULL, &Type, t, &Size); + RegQueryValueEx(hndKey, "NameServer", NULL, &Type, (LPBYTE) t, &Size); token = strtok(t, ", "); while (token) {