From 699c263d0473ea0e084793d86b3d917d0f3dbbeb Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 17 May 2007 04:16:52 +0000 Subject: [PATCH] more windows build tweaks git-svn-id: http://svn.openzap.org/svn/openzap/trunk@12 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/freetdm/openzap.vcproj | 6 ++++-- libs/freetdm/src/zap_wanpipe.c | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/libs/freetdm/openzap.vcproj b/libs/freetdm/openzap.vcproj index 6cb321a698..f6ca7e8c6d 100644 --- a/libs/freetdm/openzap.vcproj +++ b/libs/freetdm/openzap.vcproj @@ -45,7 +45,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" - DisableLanguageExtensions="true" + DisableLanguageExtensions="false" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="4" @@ -110,7 +110,7 @@ AdditionalIncludeDirectories="src/include" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" RuntimeLibrary="2" - DisableLanguageExtensions="true" + DisableLanguageExtensions="false" RuntimeTypeInfo="false" UsePrecompiledHeader="0" WarningLevel="4" @@ -185,6 +185,7 @@ > diff --git a/libs/freetdm/src/zap_wanpipe.c b/libs/freetdm/src/zap_wanpipe.c index cea8594bac..945382c412 100644 --- a/libs/freetdm/src/zap_wanpipe.c +++ b/libs/freetdm/src/zap_wanpipe.c @@ -31,11 +31,38 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define WANPIPE_TDM_API 1 + +#ifndef __WINDOWS__ +#if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32) +#define __WINDOWS__ +#endif +#endif + #include "openzap.h" #include "zap_wanpipe.h" + +#ifdef __WINDOWS__ +#ifdef _MSC_VER +/* disable warning for zero length array in a struct */ +/* this will cause errors on c99 and ansi compliant compilers and will need to be fixed in the wanpipe header files */ +#pragma warning(disable:4200) +#endif +#include +#include +#include +#include +typedef unsigned __int16 u_int16_t; +typedef unsigned __int32 u_int32_t; +#endif + #include #include #include +#ifdef __WINDOWS__ +#include +#include +#endif #include #include #include