]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: Fix various build errors
authorGuido Serassio <serassio@squid-cache.org>
Tue, 8 Jul 2008 10:33:53 +0000 (12:33 +0200)
committerGuido Serassio <serassio@squid-cache.org>
Tue, 8 Jul 2008 10:33:53 +0000 (12:33 +0200)
include/squid_mswin.h
src/dns_internal.cc

index 345aa436a5e05783e2ce35ca4841e2c40a71abf3..138f403d5192d90fbc0fa6ff5c77ea0185cf0830 100644 (file)
@@ -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(<dirent.h>, <direct.h>)
 #define THREADLOCAL __declspec(thread)
 
 #elif defined(__GNUC__) /* gcc environment */
@@ -221,12 +220,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 7730334381db5b23dfc96cb32ee96b4546ca9897..32d951d4598f5d487d6e30408ca2c927240df545 100755 (executable)
@@ -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) {