From 08aa1ef2e8bbd8acb20cedaf52e93768f8b12b4a Mon Sep 17 00:00:00 2001 From: Damien Stuart Date: Sun, 9 Aug 2009 17:14:08 +0000 Subject: [PATCH] Updates to accommodate the Windows build. git-svn-id: file:///home/mbr/svn/fwknop/trunk@131 510a4753-2344-4c79-9c09-4d669213fbeb --- client/http_resolve_host.c | 12 +++++- client/utils.h | 6 +-- win32/fwknop-client.vcproj | 46 ++++++++++++--------- win32/libfko.vcproj | 84 +++++++++++++++++++------------------- 4 files changed, 83 insertions(+), 65 deletions(-) diff --git a/client/http_resolve_host.c b/client/http_resolve_host.c index 96de26d7..0f3b24ab 100644 --- a/client/http_resolve_host.c +++ b/client/http_resolve_host.c @@ -25,7 +25,17 @@ ***************************************************************************** */ #include "fwknop_common.h" -#include +#include "utils.h" + +#ifdef WIN32 + #include + #include +#else + #if HAVE_SYS_SOCKET_H + #include + #endif + #include +#endif int resolve_ip_http(fko_cli_options_t *options) diff --git a/client/utils.h b/client/utils.h index a0573442..dde341c6 100644 --- a/client/utils.h +++ b/client/utils.h @@ -33,9 +33,9 @@ void hex_dump(unsigned char *data, int size); #ifdef WIN32 - /* Function prototypes we need for Windows - */ - size_t strlcat(char *dst, const char *src, size_t siz); + /* Function prototypes we need for Windows + */ + size_t strlcat(char *dst, const char *src, size_t siz); size_t strlcpy(char *dst, const char *src, size_t siz); #endif diff --git a/win32/fwknop-client.vcproj b/win32/fwknop-client.vcproj index 4d82b461..9148b2c5 100644 --- a/win32/fwknop-client.vcproj +++ b/win32/fwknop-client.vcproj @@ -41,7 +41,7 @@ + + @@ -462,24 +466,28 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + + diff --git a/win32/libfko.vcproj b/win32/libfko.vcproj index 03099ee5..6bd9fd5c 100644 --- a/win32/libfko.vcproj +++ b/win32/libfko.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" EnableIntrinsicFunctions="false" - AdditionalIncludeDirectories=".;..\fko;..\src" + AdditionalIncludeDirectories=".;..\lib;..\client" PreprocessorDefinitions="DLL_EXPORTS;WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" ExceptionHandling="0" @@ -117,7 +117,7 @@ Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="false" - AdditionalIncludeDirectories=".;..\fko;..\src" + AdditionalIncludeDirectories=".;..\lib;..\client" PreprocessorDefinitions="DLL_EXPORTS;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -185,7 +185,7 @@ Name="VCCLCompilerTool" Optimization="0" EnableIntrinsicFunctions="false" - AdditionalIncludeDirectories=".;..\fko;..\src" + AdditionalIncludeDirectories=".;..\lib;..\client" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" ExceptionHandling="0" @@ -251,7 +251,7 @@ Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="false" - AdditionalIncludeDirectories=".;..\fko;..\src" + AdditionalIncludeDirectories=".;..\lib;..\client" PreprocessorDefinitions="WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -314,7 +314,7 @@ Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="false" - AdditionalIncludeDirectories=".;..\fko;..\src" + AdditionalIncludeDirectories=".;..\lib;..\client" PreprocessorDefinitions="WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -360,67 +360,67 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > @@ -462,11 +462,11 @@ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" >