diff -uwbNr -x '*.patch' -x lib udns-0.0.9/dnsget.c udns/dnsget.c
--- dnsget.c	2008-08-18 10:48:17.000000000 +0200
+++ dnsget.c	2008-08-14 15:05:29.000000000 +0200
@@ -25,8 +25,8 @@
 # include "config.h"
 #endif
 #ifdef WINDOWS
-#include <windows.h>
-#include <winsock2.h>
+# include <winsock2.h>          /* includes <windows.h> */
+# include <ws2tcpip.h>          /* needed for struct in6_addr */
 #else
 #include <sys/types.h>
 #include <sys/socket.h>
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/inet_XtoX.c udns/inet_XtoX.c
--- inet_XtoX.c	2008-08-18 10:48:17.000000000 +0200
+++ inet_XtoX.c	2008-08-14 15:00:06.000000000 +0200
@@ -31,6 +31,9 @@
 #else
 
 #include <errno.h>
+#ifdef WINDOWS
+#include <winsock2.h>
+#endif
 
 #ifdef TEST
 
@@ -48,9 +51,11 @@
 
 #else /* !TEST */
 
+#ifndef WINDOWS
 struct in_addr {	/* declare it here to avoid messing with headers */
   unsigned char x[4];
 };
+#endif
 
 #endif /* TEST */
 
@@ -152,7 +157,11 @@
   /* don't use AF_*: don't mess with headers */
   case 2:  /* AF_INET */  if (mjt_ntop4(src, dst, size)) return dst; break;
   case 10: /* AF_INET6 */ if (mjt_ntop6(src, dst, size)) return dst; break;
+#ifdef WINDOWS
+  default: WSASetLastError(WSAEAFNOSUPPORT); return (char*)0;
+#else
   default: errno = EAFNOSUPPORT; return (char*)0;
+#endif
   }
   errno = ENOSPC;
   return (char*)0;
@@ -268,7 +277,11 @@
   /* don't use AF_*: don't mess with headers */
   case 2  /* AF_INET  */: return mjt_pton4(src, dst);
   case 10 /* AF_INET6 */: return mjt_pton6(src, dst);
+#ifdef WINDOWS
+  default: WSASetLastError(WSAEAFNOSUPPORT); return -1;
+#else
   default: errno = EAFNOSUPPORT; return -1;
+#endif
   }
 }
 
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/udns_XtoX.c udns/udns_XtoX.c
--- udns_XtoX.c	2008-08-18 10:48:17.000000000 +0200
+++ udns_XtoX.c	2008-08-14 14:54:04.000000000 +0200
@@ -44,7 +44,7 @@
 
 #else
 
-#define inet_XtoX_prefix udns_
+#define inet_XtoX_prefix dns_
 #include "inet_XtoX.c"
 
 #endif
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/dnsget.vcproj udns/win32/dnsget.vcproj
--- win32/dnsget.vcproj	1970-01-01 01:00:00.000000000 +0100
+++ win32/dnsget.vcproj	2008-08-18 15:55:42.000000000 +0200
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="dnsget"
+	ProjectGUID="{D8A4776F-BE52-4FCE-B29A-738956538AAD}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="lib/debug"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINDOWS;UDNS_DYNAMIC_LIBRARY"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug (Static)|Win32"
+			OutputDirectory="lib/debug/static"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINDOWS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release (Static)|Win32"
+			OutputDirectory="lib/static"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_WINDOWS;WINDOWS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="lib"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				InlineFunctionExpansion="1"
+				EnableIntrinsicFunctions="true"
+				PreprocessorDefinitions="WIN32;_WINDOWS;WINDOWS;UDNS_DYNAMIC_LIBRARY"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				ProgramDatabaseFile="$(OutDir)/dnsget.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\dnsget.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/rblcheck.vcproj udns/win32/rblcheck.vcproj
--- win32/rblcheck.vcproj	1970-01-01 01:00:00.000000000 +0100
+++ win32/rblcheck.vcproj	2008-08-18 15:55:59.000000000 +0200
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="rblcheck"
+	ProjectGUID="{345F8925-0C74-4524-BF74-7C710D08DA46}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="lib/debug"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINDOWS;UDNS_DYNAMIC_LIBRARY"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug (Static)|Win32"
+			OutputDirectory="lib/debug/static"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINDOWS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release (Static)|Win32"
+			OutputDirectory="lib/static"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_WINDOWS;WINDOWS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="lib"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				InlineFunctionExpansion="1"
+				EnableIntrinsicFunctions="true"
+				PreprocessorDefinitions="WIN32;_WINDOWS;WINDOWS;UDNS_DYNAMIC_LIBRARY"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(OutDir)/udns.lib ws2_32.lib"
+				LinkIncremental="2"
+				AddModuleNamesToAssembly=""
+				ProgramDatabaseFile="$(OutDir)/rblcheck.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\rblcheck.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/udns.rc udns/win32/udns.rc
--- win32/udns.rc	1970-01-01 01:00:00.000000000 +0100
+++ win32/udns.rc	2008-08-14 15:35:57.000000000 +0200
@@ -0,0 +1,71 @@
+#define UDNS_FILEVERSION 0,0,9,0
+#define UDNS_VERSION "0,0,9,0"
+
+#include <afxres.h>
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION UDNS_FILEVERSION
+ PRODUCTVERSION UDNS_FILEVERSION
+ FILEFLAGSMASK 0x37L
+#ifdef UDNS_DYNAMIC_LIBRARY
+ FILEFLAGS VFT_DLL
+#else
+ FILEFLAGS VFT_STATIC_LIB
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x7L
+ FILESUBTYPE 0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "080004b0"
+		BEGIN
+		#ifdef UDNS_DYNAMIC_LIBRARY
+			#define FILEDESC_LIB_TYPE "Dynamic"
+		#else
+			#define FILEDESC_LIB_TYPE "Static"
+		#endif
+
+		#ifdef DNS_DEBUG_BUILD
+			#define FILEDESC_ADDINF " (Debug Version)"
+		#else
+			#define FILEDESC_ADDINF ""
+		#endif
+		#define FILEDESC "udns " FILEDESC_LIB_TYPE " Resolver Library" FILEDESC_ADDINF
+			VALUE "FileDescription", FILEDESC
+
+			VALUE "FileVersion", UDNS_VERSION
+			VALUE "InternalName", "libudns"
+			VALUE "LegalCopyright", "Copyright (C) 2005 Michael Tokarev, <mjt+udns@corpit.ru>"
+		#ifdef UDNS_DYNAMIC_LIBRARY
+			VALUE "OriginalFilename", "udns.dll"
+		#else
+			VALUE "OriginalFilename", "udns.lib"
+		#endif
+			VALUE "ProductName", "udns"
+			VALUE "ProductVersion", UDNS_VERSION
+		#ifdef DNS_DEBUG_BUILD
+			VALUE "SpecialBuild", "Debug"
+		#else
+			VALUE "SpecialBuild", ""
+		#endif
+		END
+	END
+END
+
+#endif	  // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/udns.sln udns/win32/udns.sln
--- win32/udns.sln	1970-01-01 01:00:00.000000000 +0100
+++ win32/udns.sln	2008-08-14 15:45:28.000000000 +0200
@@ -0,0 +1,51 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udns", "udns.vcproj", "{370791DC-12DB-4B0F-BDF5-7C99797D7766}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dnsget", "dnsget.vcproj", "{D8A4776F-BE52-4FCE-B29A-738956538AAD}"
+	ProjectSection(ProjectDependencies) = postProject
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766} = {370791DC-12DB-4B0F-BDF5-7C99797D7766}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rblcheck", "rblcheck.vcproj", "{345F8925-0C74-4524-BF74-7C710D08DA46}"
+	ProjectSection(ProjectDependencies) = postProject
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766} = {370791DC-12DB-4B0F-BDF5-7C99797D7766}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug (Static)|Win32 = Debug (Static)|Win32
+		Debug|Win32 = Debug|Win32
+		Release (Static)|Win32 = Release (Static)|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Debug (Static)|Win32.ActiveCfg = Debug (Static)|Win32
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Debug (Static)|Win32.Build.0 = Debug (Static)|Win32
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Debug|Win32.ActiveCfg = Debug|Win32
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Debug|Win32.Build.0 = Debug|Win32
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Release (Static)|Win32.ActiveCfg = Release (Static)|Win32
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Release (Static)|Win32.Build.0 = Release (Static)|Win32
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Release|Win32.ActiveCfg = Release|Win32
+		{370791DC-12DB-4B0F-BDF5-7C99797D7766}.Release|Win32.Build.0 = Release|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Debug (Static)|Win32.ActiveCfg = Debug (Static)|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Debug (Static)|Win32.Build.0 = Debug (Static)|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Debug|Win32.Build.0 = Debug|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Release (Static)|Win32.ActiveCfg = Release (Static)|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Release (Static)|Win32.Build.0 = Release (Static)|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Release|Win32.ActiveCfg = Release|Win32
+		{D8A4776F-BE52-4FCE-B29A-738956538AAD}.Release|Win32.Build.0 = Release|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Debug (Static)|Win32.ActiveCfg = Debug (Static)|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Debug (Static)|Win32.Build.0 = Debug (Static)|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Debug|Win32.ActiveCfg = Debug|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Debug|Win32.Build.0 = Debug|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Release (Static)|Win32.ActiveCfg = Release (Static)|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Release (Static)|Win32.Build.0 = Release (Static)|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Release|Win32.ActiveCfg = Release|Win32
+		{345F8925-0C74-4524-BF74-7C710D08DA46}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/udns.vcproj udns/win32/udns.vcproj
--- win32/udns.vcproj	1970-01-01 01:00:00.000000000 +0100
+++ win32/udns.vcproj	2008-08-18 15:55:15.000000000 +0200
@@ -0,0 +1,413 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="udns"
+	ProjectGUID="{370791DC-12DB-4B0F-BDF5-7C99797D7766}"
+	RootNamespace="udns"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug (Static)|Win32"
+			OutputDirectory="lib/debug/static"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINDOWS;DNS_LIBRARY_BUILD;DNS_STATIC_LIBRARY;DNS_DEBUG_BUILD"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="DNS_STATIC_LIBRARY DNS_DEBUG_BUILD"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release (Static)|Win32"
+			OutputDirectory="lib/static"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				InlineFunctionExpansion="1"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				PreprocessorDefinitions="WIN32;_WINDOWS;WINDOWS;DNS_LIBRARY_BUILD;DNS_STATIC_LIBRARY"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="DNS_STATIC_LIBRARY"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="lib/debug"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINDOWS;DNS_LIBRARY_BUILD;UDNS_DYNAMIC_LIBRARY"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="UDNS_DYNAMIC_LIBRARY;DNS_DEBUG_BUILD"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ws2_32.lib"
+				GenerateDebugInformation="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="lib"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				InlineFunctionExpansion="1"
+				FavorSizeOrSpeed="1"
+				PreprocessorDefinitions="WIN32;_WINDOWS;WINDOWS;DNS_LIBRARY_BUILD;UDNS_DYNAMIC_LIBRARY"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="false"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="UDNS_DYNAMIC_LIBRARY"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ws2_32.lib"
+				OptimizeReferences="2"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\udns_bl.c"
+				>
+			</File>
+			<File
+				RelativePath="udns_codes.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_dn.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_dntosp.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_init.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_misc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_parse.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_resolver.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_rr_a.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_rr_mx.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_rr_naptr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_rr_ptr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_rr_srv.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_rr_txt.c"
+				>
+			</File>
+			<File
+				RelativePath="..\udns_XtoX.c"
+				>
+			</File>
+			<File
+				RelativePath=".\win32.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="resource.h"
+				>
+			</File>
+			<File
+				RelativePath="..\udns.h"
+				>
+			</File>
+			<File
+				RelativePath="win32.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath="udns.rc"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/udns_codes.c udns/win32/udns_codes.c
--- win32/udns_codes.c	1970-01-01 01:00:00.000000000 +0100
+++ win32/udns_codes.c	2008-08-14 14:35:55.000000000 +0200
@@ -0,0 +1,171 @@
+/* Automatically generated. */
+#include "../udns.h"
+
+UDNS_DATA_API const struct dns_nameval dns_typetab[] = {
+ {DNS_T_INVALID,"INVALID"},
+ {DNS_T_A,"A"},
+ {DNS_T_NS,"NS"},
+ {DNS_T_MD,"MD"},
+ {DNS_T_MF,"MF"},
+ {DNS_T_CNAME,"CNAME"},
+ {DNS_T_SOA,"SOA"},
+ {DNS_T_MB,"MB"},
+ {DNS_T_MG,"MG"},
+ {DNS_T_MR,"MR"},
+ {DNS_T_NULL,"NULL"},
+ {DNS_T_WKS,"WKS"},
+ {DNS_T_PTR,"PTR"},
+ {DNS_T_HINFO,"HINFO"},
+ {DNS_T_MINFO,"MINFO"},
+ {DNS_T_MX,"MX"},
+ {DNS_T_TXT,"TXT"},
+ {DNS_T_RP,"RP"},
+ {DNS_T_AFSDB,"AFSDB"},
+ {DNS_T_X25,"X25"},
+ {DNS_T_ISDN,"ISDN"},
+ {DNS_T_RT,"RT"},
+ {DNS_T_NSAP,"NSAP"},
+ {DNS_T_NSAP_PTR,"NSAP_PTR"},
+ {DNS_T_SIG,"SIG"},
+ {DNS_T_KEY,"KEY"},
+ {DNS_T_PX,"PX"},
+ {DNS_T_GPOS,"GPOS"},
+ {DNS_T_AAAA,"AAAA"},
+ {DNS_T_LOC,"LOC"},
+ {DNS_T_NXT,"NXT"},
+ {DNS_T_EID,"EID"},
+ {DNS_T_NIMLOC,"NIMLOC"},
+ {DNS_T_SRV,"SRV"},
+ {DNS_T_ATMA,"ATMA"},
+ {DNS_T_NAPTR,"NAPTR"},
+ {DNS_T_KX,"KX"},
+ {DNS_T_CERT,"CERT"},
+ {DNS_T_A6,"A6"},
+ {DNS_T_DNAME,"DNAME"},
+ {DNS_T_SINK,"SINK"},
+ {DNS_T_OPT,"OPT"},
+ {DNS_T_DS,"DS"},
+ {DNS_T_NSEC,"NSEC"},
+ {DNS_T_TSIG,"TSIG"},
+ {DNS_T_IXFR,"IXFR"},
+ {DNS_T_AXFR,"AXFR"},
+ {DNS_T_MAILB,"MAILB"},
+ {DNS_T_MAILA,"MAILA"},
+ {DNS_T_ANY,"ANY"},
+ {DNS_T_ZXFR,"ZXFR"},
+ {DNS_T_MAX,"MAX"},
+ {0,0}};
+const char *dns_typename(enum dns_type code) {
+ static char nm[20];
+ switch(code) {
+ case DNS_T_INVALID: return dns_typetab[0].name;
+ case DNS_T_A: return dns_typetab[1].name;
+ case DNS_T_NS: return dns_typetab[2].name;
+ case DNS_T_MD: return dns_typetab[3].name;
+ case DNS_T_MF: return dns_typetab[4].name;
+ case DNS_T_CNAME: return dns_typetab[5].name;
+ case DNS_T_SOA: return dns_typetab[6].name;
+ case DNS_T_MB: return dns_typetab[7].name;
+ case DNS_T_MG: return dns_typetab[8].name;
+ case DNS_T_MR: return dns_typetab[9].name;
+ case DNS_T_NULL: return dns_typetab[10].name;
+ case DNS_T_WKS: return dns_typetab[11].name;
+ case DNS_T_PTR: return dns_typetab[12].name;
+ case DNS_T_HINFO: return dns_typetab[13].name;
+ case DNS_T_MINFO: return dns_typetab[14].name;
+ case DNS_T_MX: return dns_typetab[15].name;
+ case DNS_T_TXT: return dns_typetab[16].name;
+ case DNS_T_RP: return dns_typetab[17].name;
+ case DNS_T_AFSDB: return dns_typetab[18].name;
+ case DNS_T_X25: return dns_typetab[19].name;
+ case DNS_T_ISDN: return dns_typetab[20].name;
+ case DNS_T_RT: return dns_typetab[21].name;
+ case DNS_T_NSAP: return dns_typetab[22].name;
+ case DNS_T_NSAP_PTR: return dns_typetab[23].name;
+ case DNS_T_SIG: return dns_typetab[24].name;
+ case DNS_T_KEY: return dns_typetab[25].name;
+ case DNS_T_PX: return dns_typetab[26].name;
+ case DNS_T_GPOS: return dns_typetab[27].name;
+ case DNS_T_AAAA: return dns_typetab[28].name;
+ case DNS_T_LOC: return dns_typetab[29].name;
+ case DNS_T_NXT: return dns_typetab[30].name;
+ case DNS_T_EID: return dns_typetab[31].name;
+ case DNS_T_NIMLOC: return dns_typetab[32].name;
+ case DNS_T_SRV: return dns_typetab[33].name;
+ case DNS_T_ATMA: return dns_typetab[34].name;
+ case DNS_T_NAPTR: return dns_typetab[35].name;
+ case DNS_T_KX: return dns_typetab[36].name;
+ case DNS_T_CERT: return dns_typetab[37].name;
+ case DNS_T_A6: return dns_typetab[38].name;
+ case DNS_T_DNAME: return dns_typetab[39].name;
+ case DNS_T_SINK: return dns_typetab[40].name;
+ case DNS_T_OPT: return dns_typetab[41].name;
+ case DNS_T_DS: return dns_typetab[42].name;
+ case DNS_T_NSEC: return dns_typetab[43].name;
+ case DNS_T_TSIG: return dns_typetab[44].name;
+ case DNS_T_IXFR: return dns_typetab[45].name;
+ case DNS_T_AXFR: return dns_typetab[46].name;
+ case DNS_T_MAILB: return dns_typetab[47].name;
+ case DNS_T_MAILA: return dns_typetab[48].name;
+ case DNS_T_ANY: return dns_typetab[49].name;
+ case DNS_T_ZXFR: return dns_typetab[50].name;
+ case DNS_T_MAX: return dns_typetab[51].name;
+ }
+ return _dns_format_code(nm,"type",code);
+}
+
+UDNS_DATA_API const struct dns_nameval dns_classtab[] = {
+ {DNS_C_INVALID,"INVALID"},
+ {DNS_C_IN,"IN"},
+ {DNS_C_CH,"CH"},
+ {DNS_C_HS,"HS"},
+ {DNS_C_ANY,"ANY"},
+ {0,0}};
+const char *dns_classname(enum dns_class code) {
+ static char nm[20];
+ switch(code) {
+ case DNS_C_INVALID: return dns_classtab[0].name;
+ case DNS_C_IN: return dns_classtab[1].name;
+ case DNS_C_CH: return dns_classtab[2].name;
+ case DNS_C_HS: return dns_classtab[3].name;
+ case DNS_C_ANY: return dns_classtab[4].name;
+ }
+ return _dns_format_code(nm,"class",code);
+}
+
+UDNS_DATA_API const struct dns_nameval dns_rcodetab[] = {
+ {DNS_R_NOERROR,"NOERROR"},
+ {DNS_R_FORMERR,"FORMERR"},
+ {DNS_R_SERVFAIL,"SERVFAIL"},
+ {DNS_R_NXDOMAIN,"NXDOMAIN"},
+ {DNS_R_NOTIMPL,"NOTIMPL"},
+ {DNS_R_REFUSED,"REFUSED"},
+ {DNS_R_YXDOMAIN,"YXDOMAIN"},
+ {DNS_R_YXRRSET,"YXRRSET"},
+ {DNS_R_NXRRSET,"NXRRSET"},
+ {DNS_R_NOTAUTH,"NOTAUTH"},
+ {DNS_R_NOTZONE,"NOTZONE"},
+ {DNS_R_BADSIG,"BADSIG"},
+ {DNS_R_BADKEY,"BADKEY"},
+ {DNS_R_BADTIME,"BADTIME"},
+ {0,0}};
+const char *dns_rcodename(enum dns_rcode code) {
+ static char nm[20];
+ switch(code) {
+ case DNS_R_NOERROR: return dns_rcodetab[0].name;
+ case DNS_R_FORMERR: return dns_rcodetab[1].name;
+ case DNS_R_SERVFAIL: return dns_rcodetab[2].name;
+ case DNS_R_NXDOMAIN: return dns_rcodetab[3].name;
+ case DNS_R_NOTIMPL: return dns_rcodetab[4].name;
+ case DNS_R_REFUSED: return dns_rcodetab[5].name;
+ case DNS_R_YXDOMAIN: return dns_rcodetab[6].name;
+ case DNS_R_YXRRSET: return dns_rcodetab[7].name;
+ case DNS_R_NXRRSET: return dns_rcodetab[8].name;
+ case DNS_R_NOTAUTH: return dns_rcodetab[9].name;
+ case DNS_R_NOTZONE: return dns_rcodetab[10].name;
+ case DNS_R_BADSIG: return dns_rcodetab[11].name;
+ case DNS_R_BADKEY: return dns_rcodetab[12].name;
+ case DNS_R_BADTIME: return dns_rcodetab[13].name;
+ }
+ return _dns_format_code(nm,"rcode",code);
+}
\ No newline at end of file
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/win32.c udns/win32/win32.c
--- win32/win32.c	1970-01-01 01:00:00.000000000 +0100
+++ win32/win32.c	2008-08-14 15:18:19.000000000 +0200
@@ -0,0 +1,43 @@
+/* $Id:$
+ * Functions which are needed for Windows (e.g. emulations for functions which do
+ * not exist in Windows).
+ */
+
+#ifdef WINDOWS
+
+#include <time.h>
+#include <windows.h>
+
+/* -------------------------------------------------------------------
+ * gettimeofday.c
+ * by Mark Gates <mgates@nlanr.net>
+ * Copyright 1999, Board of Trustees of the University of Illinois.
+ * $Id: gettimeofday.c,v 1.3 2004/04/30 10:57:16 jschmid Exp $
+ * ------------------------------------------------------------------- */
+
+/* -------------------------------------------------------------------
+ * A (hack) implementation of gettimeofday for Windows.
+ * Since I send sec/usec in UDP packets, this made the most sense.
+ * ------------------------------------------------------------------- */
+int gettimeofday(struct timeval* tv, void* timezone)
+{
+  FILETIME time;
+  double   timed;
+
+  GetSystemTimeAsFileTime( &time );
+
+  // Apparently Win32 has units of 1e-7 sec (tenths of microsecs)
+  // 4294967296 is 2^32, to shift high word over
+  // 11644473600 is the number of seconds between
+  // the Win32 epoch 1601-Jan-01 and the Unix epoch 1970-Jan-01
+  // Tests found floating point to be 10x faster than 64bit int math.
+
+  timed = ((time.dwHighDateTime * 4294967296e-7) - 11644473600.0) +
+           (time.dwLowDateTime  * 1e-7);
+  
+  tv->tv_sec  = (long) timed;
+  tv->tv_usec = (long) ((timed - tv->tv_sec) * 1e6);
+
+  return 0;
+}
+#endif // WINDOWS
diff -uwbNr -x '*.patch' -x lib udns-0.0.9/win32/win32.h udns/win32/win32.h
--- win32/win32.h	1970-01-01 01:00:00.000000000 +0100
+++ win32/win32.h	2008-08-14 15:18:09.000000000 +0200
@@ -0,0 +1,13 @@
+/* $Id:$
+ * Functions which are needed for Windows (e.g. emulations for functions which do
+ * not exist in Windows).
+ */
+
+#ifdef WINDOWS
+#ifndef __UDNS_WIN32_H__
+#define __UDNS_WIN32_H__
+
+int gettimeofday(struct timeval* tv, void* timezone);
+
+#endif // __UDNS_WIN32_H__
+#endif // WINDOWS

