diff --git a/bacnet-stack/demo/Makefile b/bacnet-stack/demo/Makefile index 6bd69a8f..44694266 100644 --- a/bacnet-stack/demo/Makefile +++ b/bacnet-stack/demo/Makefile @@ -40,6 +40,7 @@ endif ifeq (${BACNET_PORT},win32) TARGET_EXT = .exe SYSTEM_LIB=-lws2_32,-lgcc,-lm,-liphlpapi,-lwinmm +DEFINES += -D_NO_OLDNAMES endif #build for release (default) or debug DEBUGGING = diff --git a/bacnet-stack/demo/mstpcap/main.c b/bacnet-stack/demo/mstpcap/main.c index 6fa04605..f5ab98e1 100644 --- a/bacnet-stack/demo/mstpcap/main.c +++ b/bacnet-stack/demo/mstpcap/main.c @@ -53,6 +53,10 @@ /* I-Am decoding */ #include "iam.h" +#ifdef _WIN32 +#define strncasecmp(x,y,z) _strnicmp(x,y,z) +#endif + /* define our Data Link Type for libPCAP */ #define DLT_BACNET_MS_TP 165 /* local min/max macros */ diff --git a/bacnet-stack/demo/object/device-client.c b/bacnet-stack/demo/object/device-client.c index 76ffcd92..d5918023 100644 --- a/bacnet-stack/demo/object/device-client.c +++ b/bacnet-stack/demo/object/device-client.c @@ -50,6 +50,12 @@ /* include the device object */ #include "device.h" /* me */ +#if defined(__BORLANDC__) || defined(_WIN32) +/* seems to not be defined in time.h as specified by The Open Group */ +/* difference from UTC and local standard time */ +long int timezone; +#endif + /* note: you really only need to define variables for properties that are writable or that may change. The properties that are constant can be hard coded diff --git a/bacnet-stack/demo/object/device.c b/bacnet-stack/demo/object/device.c index 596aacf2..c8167f97 100644 --- a/bacnet-stack/demo/object/device.c +++ b/bacnet-stack/demo/object/device.c @@ -75,9 +75,9 @@ #endif /* defined(BAC_UCI) */ -#if defined(__BORLANDC__) -/* seems to not be defined in time.h as specified by The Open Group */ -/* difference from UTC and local standard time */ +#if defined(__BORLANDC__) || defined(_WIN32) +/* Not included in time.h as specified by The Open Group */ +/* Difference from UTC and local standard time */ long int timezone; #endif diff --git a/bacnet-stack/demo/object/gw_device.c b/bacnet-stack/demo/object/gw_device.c index 84e3109d..985535f1 100644 --- a/bacnet-stack/demo/object/gw_device.c +++ b/bacnet-stack/demo/object/gw_device.c @@ -61,7 +61,7 @@ /* os specfic includes */ #include "timer.h" -#if defined(__BORLANDC__) +#if defined(__BORLANDC__) || defined(_WIN32) /* seems to not be defined in time.h as specified by The Open Group */ /* difference from UTC and local standard time */ long int timezone; @@ -79,8 +79,12 @@ bool Routed_Device_Write_Property_Local( #if !defined(BAC_ROUTING) +#ifdef _MSC_VER +#pragma message This file should not be included in the build unless BAC_ROUTING is enabled. +#else #warning This file should not be included in the build unless BAC_ROUTING is enabled. #endif +#endif /**************************************************************************** ************* BACnet Routing Functionality (Optional) ********************** diff --git a/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet Stack Development.sln b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet Stack Development.sln new file mode 100644 index 00000000..1cf7a39c --- /dev/null +++ b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet Stack Development.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BACnet_Handler_Library", "BACnet_Handler_Library\BACnet_Handler_Library.vcxproj", "{2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BACnet_Object_Definitions", "BACnet_Object_Definitions\BACnet_Object_Definitions.vcxproj", "{6D42B11A-84DA-46DB-9D08-319329D51473}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BACnet_Stack_Library", "BACnet_Stack_Library\BACnet_Stack_Library.vcxproj", "{D0875CC6-8B68-404C-ABD7-823FE0C084DD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Debug|x64.ActiveCfg = Debug|x64 + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Debug|x64.Build.0 = Debug|x64 + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Debug|x86.ActiveCfg = Debug|Win32 + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Debug|x86.Build.0 = Debug|Win32 + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Release|x64.ActiveCfg = Release|x64 + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Release|x64.Build.0 = Release|x64 + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Release|x86.ActiveCfg = Release|Win32 + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF}.Release|x86.Build.0 = Release|Win32 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Debug|x64.ActiveCfg = Debug|x64 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Debug|x64.Build.0 = Debug|x64 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Debug|x86.ActiveCfg = Debug|Win32 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Debug|x86.Build.0 = Debug|Win32 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Release|x64.ActiveCfg = Release|x64 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Release|x64.Build.0 = Release|x64 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Release|x86.ActiveCfg = Release|Win32 + {6D42B11A-84DA-46DB-9D08-319329D51473}.Release|x86.Build.0 = Release|Win32 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Debug|x64.ActiveCfg = Debug|x64 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Debug|x64.Build.0 = Debug|x64 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Debug|x86.ActiveCfg = Debug|Win32 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Debug|x86.Build.0 = Debug|Win32 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Release|x64.ActiveCfg = Release|x64 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Release|x64.Build.0 = Release|x64 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Release|x86.ActiveCfg = Release|Win32 + {D0875CC6-8B68-404C-ABD7-823FE0C084DD}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Handler_Library/BACnet_Handler_Library.vcxproj b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Handler_Library/BACnet_Handler_Library.vcxproj new file mode 100644 index 00000000..999d6bda --- /dev/null +++ b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Handler_Library/BACnet_Handler_Library.vcxproj @@ -0,0 +1,212 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2001A15D-2D0E-4FFA-8B90-5E7938AE6ECF} + Win32Proj + BACnet_Handler_Library + true + true + 10.0.10240.0 + + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + true + Unicode + + + StaticLibrary + false + v140 + true + true + Unicode + + + + + + + + + + + + + + + + + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + + + + Level4 + Disabled + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;_DEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\include;..\..\..\..\ports\win32;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + ProgramDatabase + Async + 4214;4244;4267;4189;4100;4701 + + + Windows + true + + + + + + + Level4 + Disabled + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;_DEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\include;..\..\..\..\ports\win32;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + 4214;4244;4267;4189;4100;4701 + + + Windows + true + + + + + Level4 + + + MaxSpeed + true + true + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;NDEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\include;..\..\..\..\ports\win32;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + Async + 4214;4244;4267;4189;4100;4701 + + + Windows + true + true + true + + + + + Level4 + + + MaxSpeed + true + true + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;NDEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\include;..\..\..\..\ports\win32;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + 4214;4244;4267;4189;4100;4701 + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Handler_Library/BACnet_Handler_Library.vcxproj.filters b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Handler_Library/BACnet_Handler_Library.vcxproj.filters new file mode 100644 index 00000000..07406818 --- /dev/null +++ b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Handler_Library/BACnet_Handler_Library.vcxproj.filters @@ -0,0 +1,163 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Object_Definitions/BACnet_Object_Definitions.vcxproj b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Object_Definitions/BACnet_Object_Definitions.vcxproj new file mode 100644 index 00000000..ee750af3 --- /dev/null +++ b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Object_Definitions/BACnet_Object_Definitions.vcxproj @@ -0,0 +1,221 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6D42B11A-84DA-46DB-9D08-319329D51473} + Win32Proj + BACnet_Object_Definitions + true + 10.0.10240.0 + + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + true + Unicode + + + StaticLibrary + false + v140 + true + true + Unicode + + + + + + + + + + + + + + + + + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + $(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath); + + + + + + Level4 + Disabled + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;BACAPP_ALL_DEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\ports\win32;..\..\..\..\include;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + ProgramDatabase + Async + 4244;4100;4701 + + + Windows + true + + + + + + + + + + + Level4 + Disabled + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;_DEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\ports\win32;..\..\..\..\include;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + 4244;4100;4701 + + + Windows + true + + + + + + + + + Level4 + + + MaxSpeed + true + true + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;BACAPP_ALLNDEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\ports\win32;..\..\..\..\include;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + Async + 4244;4100;4701 + + + Windows + true + true + true + + + + + + + + + Level4 + + + MaxSpeed + true + true + WIN32;BACDL_BIP;USE_INADDR=0;BACAPP_ALL;NDEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\..\..\ports\win32;..\..\..\..\include;..\..\..\..\demo\object;%(AdditionalIncludeDirectories) + 4244;4100;4701 + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Object_Definitions/BACnet_Object_Definitions.vcxproj.filters b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Object_Definitions/BACnet_Object_Definitions.vcxproj.filters new file mode 100644 index 00000000..e40f4eed --- /dev/null +++ b/bacnet-stack/ports/win32/Microsoft Visual Studio 2015/BACnet_Object_Definitions/BACnet_Object_Definitions.vcxproj.filters @@ -0,0 +1,141 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/bacnet-stack/ports/win32/stdbool.h b/bacnet-stack/ports/win32/stdbool.h index 4466038e..387e6851 100644 --- a/bacnet-stack/ports/win32/stdbool.h +++ b/bacnet-stack/ports/win32/stdbool.h @@ -14,7 +14,9 @@ the values 0 and 1. */ /* We choose 8 bit to match C++ */ /* It must also promote to integer */ +#if _MSC_VER < 1600 typedef int8_t _Bool; +#endif /* _MSC_VER < 1600 VS 2010 and earlier */ #endif /* ISO C Standard: 7.16 Boolean type */