--------------------- PatchSet 3961 Date: 2002/04/08 19:18:38 Author: serassio Branch: nt-2_5 Tag: (none) Log: Added external dnsserver helper Members: port/win32/squid.dsw:1.1.2.6->1.1.2.7 port/win32/update.cmd:1.1.2.2->1.1.2.3 port/win32/dnsserver/.cvsignore:1.1->1.1.2.1 port/win32/dnsserver/dnsserver.dsp:1.1->1.1.2.1 port/win32/libntlm/.cvsignore:1.1->1.1.2.1 port/win32/libntlmauth/.cvsignore:1.1->1.1.2.1 port/win32/libsnmp/.cvsignore:1.1->1.1.2.1 port/win32/libufs/.cvsignore:1.1->1.1.2.1 port/win32/nt_auth/.cvsignore:1.1->1.1.2.1 port/win32/pinger/.cvsignore:1.1->1.1.2.1 port/win32/squid/.cvsignore:1.1->1.1.2.1 port/win32/squidclient/.cvsignore:1.1->1.1.2.1 port/win32/unlinkd/.cvsignore:1.1->1.1.2.1 src/dnsserver.c:1.5->1.5.20.1 Index: squid/port/win32/squid.dsw =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/Attic/squid.dsw,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid/port/win32/squid.dsw 7 Apr 2002 09:59:52 -0000 1.1.2.6 +++ squid/port/win32/squid.dsw 8 Apr 2002 19:18:38 -0000 1.1.2.7 @@ -72,6 +72,21 @@ ############################################################################### +Project: "dnsserver"=".\dnsserver\dnsserver.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libmiscutil + End Project Dependency +}}} + +############################################################################### + Project: "fake_auth"=".\fake_auth\fake_auth.dsp" - Package Owner=<4> Package=<5> Index: squid/port/win32/update.cmd =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/Attic/update.cmd,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid/port/win32/update.cmd 27 Mar 2002 21:01:10 -0000 1.1.2.2 +++ squid/port/win32/update.cmd 8 Apr 2002 19:18:38 -0000 1.1.2.3 @@ -2,7 +2,7 @@ if %1==release net stop "SquidNT" copy %0\..\squid\%1\squid.exe %2\bin\squid.exe copy %0\..\unlinkd\%1\unlinkd.exe %2\libexec\unlinkd.exe -rem copy %0\..\dnsserver\%1\dnsserver.exe %2\libexec\dnsserver.exe +copy %0\..\dnsserver\%1\dnsserver.exe %2\libexec\dnsserver.exe copy %0\..\pinger\%1\pinger.exe %2\libexec\pinger.exe copy %0\..\squidclient\%1\squidclient.exe %2\bin\squidclient.exe copy %0\..\fake_auth\%1\fake_auth.exe %2\libexec\fake_auth.exe --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/dnsserver/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/dnsserver/dnsserver.dsp Wed Feb 14 00:57:58 2007 @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="dnsserver" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=dnsserver - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "dnsserver.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "dnsserver.mak" CFG="dnsserver - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "dnsserver - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "dnsserver - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "dnsserver - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../../include" /I "../../../src" /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "dnsserver - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../src" /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "dnsserver - Win32 Release" +# Name "dnsserver - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\src\dnsserver.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/libntlm/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/libntlmauth/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/libsnmp/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/libufs/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/nt_auth/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/pinger/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/squid/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/squidclient/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 00:55:47 2007 +++ squid/port/win32/unlinkd/.cvsignore Wed Feb 14 00:57:58 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release Index: squid/src/dnsserver.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/dnsserver.c,v retrieving revision 1.5 retrieving revision 1.5.20.1 diff -u -r1.5 -r1.5.20.1 --- squid/src/dnsserver.c 4 Sep 2001 14:27:41 -0000 1.5 +++ squid/src/dnsserver.c 8 Apr 2002 19:18:39 -0000 1.5.20.1 @@ -1,6 +1,6 @@ /* - * $Id: dnsserver.c,v 1.5 2001/09/04 14:27:41 squidadm Exp $ + * $Id: dnsserver.c,v 1.5.20.1 2002/04/08 19:18:39 serassio Exp $ * * DEBUG: section 0 DNS Resolver * AUTHOR: Harvest Derived @@ -128,6 +128,9 @@ #if HAVE_SYS_SELECT_H #include #endif +#if HAVE_GETOPT_H +#include +#endif #if HAVE_ARPA_NAMESER_H #include @@ -139,7 +142,7 @@ #include "util.h" #include "snprintf.h" -#if !defined(_SQUID_AIX_) +#if !defined(_SQUID_AIX_) && !defined(_SQUID_MSWIN_) extern int h_errno; #endif @@ -333,6 +336,14 @@ } } +#ifdef _SQUID_MSWIN_ + { + WSADATA wsaData; + + WSAStartup(2, &wsaData); + } + fflush(stderr); +#endif for (;;) { memset(request, '\0', REQ_SZ); if (fgets(request, REQ_SZ, stdin) == NULL)