]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add stdio.h include for msvc, remove truncating cast warning, change to dynamic runti...
authorMichael Jerris <mike@jerris.com>
Wed, 12 Apr 2006 15:25:26 +0000 (15:25 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 12 Apr 2006 15:25:26 +0000 (15:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1125 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_platform.h
src/mod/loggers/mod_console/mod_console.vcproj
src/switch_core.c
src/switch_log.c
w32/vsnet/FreeSwitchConsole.vcproj

index 5cf538de8e6832b70522684d135f91d1f48fd4af..cffc599b200deef60c4e3af1d2bac972ecb959b8 100644 (file)
@@ -42,6 +42,8 @@ extern "C" {
 #pragma warning (disable:810 869 981 279 1469 188)
 #endif
 
+#include <stdio.h>
+
 #ifdef _MSC_VER
 
 #ifndef FREESWITCHCORE_EXPORTS
@@ -104,7 +106,6 @@ typedef unsigned long       in_addr_t;
 #define PACKED __attribute__ ((__packed__))
 #endif
 #include <sys/types.h>
-#include <stdio.h>
 #include <inttypes.h>
 #ifndef getpid
 #include <unistd.h>
index eff6e1319cae3e21c5ae0a691edd301aa6906e80..2938751a24f32cc936e8d3429cee7111d916cdd0 100644 (file)
@@ -45,7 +45,7 @@
                                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="1"\r
+                               RuntimeLibrary="3"\r
                                UsePrecompiledHeader="0"\r
                                WarningLevel="4"\r
                                WarnAsError="true"\r
                                Name="VCCLCompilerTool"\r
                                AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"\r
-                               RuntimeLibrary="0"\r
+                               RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
                                WarningLevel="4"\r
                                WarnAsError="true"\r
index 7aafd5520e59ae5dc3bba73ad84013a0868e0546..f6097310c001f575159fa9f27f898e949896ec88 100644 (file)
@@ -29,6 +29,8 @@
  * switch_core.c -- Main Core Library
  *
  */
+
+#include <stdio.h>
 #include <switch.h>
 //#define DEBUG_ALLOC
 
index 7b3e57d5f0d37b36ff496ffdcf3db28096a1921a..93bad6c36b8371912ad7668c8240a93f582bad89 100644 (file)
@@ -164,7 +164,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file,
                
                len = (uint32_t)(strlen(extra_fmt) + strlen(date) + strlen(filep) + 32 + strlen(func) + strlen(fmt));
                new_fmt = malloc(len+1);
-               snprintf(new_fmt, len, extra_fmt, date, LEVELS[level], filep, line, func, (char) 128, fmt);
+               snprintf(new_fmt, len, extra_fmt, date, LEVELS[level], filep, line, func, 128, fmt);
                fmt = new_fmt;
        }
 
@@ -182,7 +182,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file,
                if (channel == SWITCH_CHANNEL_ID_LOG_CLEAN) {
                        content = data;
                } else {
-                       content = strchr(data, (char)128);
+                       content = strchr(data, 128);
                }
 
                if (channel == SWITCH_CHANNEL_ID_EVENT) {
index c7a8e471544103bacfe9e866ba243ab20ff43e09..bfd558c1e1184955ab2b68029bb0506f71096cc5 100644 (file)
@@ -45,7 +45,7 @@
                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="1"\r
+                               RuntimeLibrary="3"\r
                                UsePrecompiledHeader="0"\r
                                WarningLevel="4"\r
                                WarnAsError="true"\r
                                Name="VCCLCompilerTool"\r
                                AdditionalIncludeDirectories="&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\libs\include&quot;"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
-                               RuntimeLibrary="0"\r
+                               RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
                                WarningLevel="4"\r
                                WarnAsError="true"\r