From ed7ba53b0884fd706d58ad0d63afc7d92e3bc78e Mon Sep 17 00:00:00 2001 From: skarg Date: Tue, 23 Aug 2011 21:05:34 +0000 Subject: [PATCH] Fixed compile errors for Borland compiler. --- bacnet-stack/lib/makefile.b32 | 4 +++- bacnet-stack/ports/win32/timer.c | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/lib/makefile.b32 b/bacnet-stack/lib/makefile.b32 index 5ef5a5cd..99afa8d2 100644 --- a/bacnet-stack/lib/makefile.b32 +++ b/bacnet-stack/lib/makefile.b32 @@ -74,7 +74,8 @@ CORE3_SRC = $(BACNET_CORE)\arf.c \ $(BACNET_CORE)\timesync.c \ $(BACNET_CORE)\whohas.c \ $(BACNET_CORE)\whois.c \ - $(BACNET_CORE)\wp.c + $(BACNET_CORE)\wp.c \ + $(BACNET_CORE)\wpm.c CORE4_SRC = $(BACNET_CORE)\bacdevobjpropref.c \ $(BACNET_CORE)\bacpropstates.c \ @@ -96,6 +97,7 @@ HANDLER_SRC = \ $(BACNET_HANDLER)\h_rpm.c \ $(BACNET_HANDLER)\h_rpm_a.c \ $(BACNET_HANDLER)\h_wp.c \ + $(BACNET_HANDLER)\h_wpm.c \ $(BACNET_HANDLER)\h_arf.c \ $(BACNET_HANDLER)\h_arf_a.c \ $(BACNET_HANDLER)\h_awf.c \ diff --git a/bacnet-stack/ports/win32/timer.c b/bacnet-stack/ports/win32/timer.c index 564e82fd..01415d5b 100644 --- a/bacnet-stack/ports/win32/timer.c +++ b/bacnet-stack/ports/win32/timer.c @@ -37,7 +37,7 @@ /* Offset between Windows epoch 1/1/1601 and Unix epoch 1/1/1970 in 100 nanosec units */ -#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) +#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) || defined(__BORLANDC__) #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 #else #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL @@ -49,6 +49,13 @@ static volatile uint32_t Millisecond_Counter[MAX_MILLISECOND_TIMERS]; /* Windows timer period - in milliseconds */ static uint32_t Timer_Period = 1; +#if defined(__BORLANDC__) +struct timezone { + int tz_minuteswest; /* minutes W of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; +#endif + /************************************************************************* * Description: simulate the gettimeofday Linux function * Returns: zero