From ccffaad03ce8d293d41fc7fcb55a13d91a65384e Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 12 Dec 2007 02:10:52 +0000 Subject: [PATCH] fix msvc build. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6692 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_platform.h | 4 ++++ src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c | 8 ++++---- src/mod/formats/mod_local_stream/mod_local_stream.c | 3 +-- w32/Library/FreeSwitchCore.2008.vcproj | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index f266d9b902..5766620f5f 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -215,6 +215,10 @@ typedef intptr_t switch_ssize_t; #define SWITCH_INT64_T_FMT "I64d" #define SWITCH_UINT64_T_FMT "I64u" +#ifndef TIME_T_FMT +#define TIME_T_FMT "ld" +#endif + #else #ifndef SWITCH_SSIZE_T_FMT #define SWITCH_SSIZE_T_FMT (sizeof (switch_ssize_t) == sizeof (long) ? "ld" : sizeof (switch_ssize_t) == sizeof (int) ? "d" : "lld") diff --git a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c index b2e164117b..45a538a0ff 100644 --- a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c +++ b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c @@ -238,12 +238,12 @@ static switch_status_t my_on_hangup(switch_core_session_t *session) switch_channel_set_variable(channel, "end_uepoch", tmp); uduration = caller_profile->times->hungup - caller_profile->times->created; - duration = tt_hungup - tt_created; - mduration = mtt_hungup - mtt_created; + duration = (int32_t)(tt_hungup - tt_created); + mduration = (int32_t)(mtt_hungup - mtt_created); if (caller_profile->times->answered) { - billsec = tt_hungup - tt_answered; - billmsec = mtt_hungup - mtt_answered; + billsec = (int32_t)(tt_hungup - tt_answered); + billmsec = (int32_t)(mtt_hungup - mtt_answered); billusec = caller_profile->times->hungup - caller_profile->times->answered; } } diff --git a/src/mod/formats/mod_local_stream/mod_local_stream.c b/src/mod/formats/mod_local_stream/mod_local_stream.c index 70843b9dc6..b687bc206c 100644 --- a/src/mod/formats/mod_local_stream/mod_local_stream.c +++ b/src/mod/formats/mod_local_stream/mod_local_stream.c @@ -104,8 +104,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void snprintf(path_buf, sizeof(path_buf), "%s%s%s", source->location, SWITCH_PATH_SEPARATOR, fname); if (switch_stristr(".loc", path_buf)) { - int fd; - ssize_t bytes; + int fd, bytes; char *p; if ((fd = open(path_buf, O_RDONLY)) < 0) { diff --git a/w32/Library/FreeSwitchCore.2008.vcproj b/w32/Library/FreeSwitchCore.2008.vcproj index 78db6e7114..9b31ca4198 100644 --- a/w32/Library/FreeSwitchCore.2008.vcproj +++ b/w32/Library/FreeSwitchCore.2008.vcproj @@ -45,6 +45,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src;..\..\libs\win32\sqlite;..\..\libs\pcre;..\..\libs\stfu" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;PCRE_STATIC" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -501,11 +502,11 @@ >