]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: Fix various build errors
authorGuido Serassio <serassio@squid-cache.org>
Tue, 1 Jul 2008 10:40:13 +0000 (12:40 +0200)
committerGuido Serassio <serassio@squid-cache.org>
Tue, 1 Jul 2008 10:40:13 +0000 (12:40 +0200)
include/squid_mswin.h [changed mode: 0644->0755]
src/dns_internal.cc

old mode 100644 (file)
new mode 100755 (executable)
index 0cb8887..3115a12
@@ -76,7 +76,6 @@ typedef unsigned long ino_t;
 #include "default_config_file.h"
 /* Some tricks for MS Compilers */
 #define __STDC__ 1
-#pragma include_alias(<dirent.h>, <direct.h>)
 #define THREADLOCAL __declspec(thread)
 
 #elif defined(__GNUC__) /* gcc environment */
@@ -235,12 +234,9 @@ struct timezone
 #include <ws2spi.h>
 #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
 #pragma warning (pop)
-#include "readdir.h"
-#else
+#endif
 #include <io.h>
 #include <stdlib.h>
-#include <sys/types.h> 
-#endif
 
 typedef char * caddr_t;
 
index 7d339162d754227f52ef17cda2246fa54ce621a6..7a8f2ea7abd72a5a9c5c4304b8b8e206596c6eef 100755 (executable)
@@ -390,7 +390,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);
        }
@@ -414,7 +414,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);
@@ -445,7 +445,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, ", ");
 
@@ -462,7 +462,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) {
@@ -516,7 +516,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) {
@@ -534,7 +534,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) {
@@ -575,7 +575,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) {