mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
add stdio.h include for msvc, remove truncating cast warning, change to dynamic runtime on msvc. You can not pass FILE * between mods with differrent runtimes on msvc.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1125 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
53706b9fe2
commit
9ac4da17f6
@ -42,6 +42,8 @@ extern "C" {
|
|||||||
#pragma warning (disable:810 869 981 279 1469 188)
|
#pragma warning (disable:810 869 981 279 1469 188)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
#ifndef FREESWITCHCORE_EXPORTS
|
#ifndef FREESWITCHCORE_EXPORTS
|
||||||
@ -104,7 +106,6 @@ typedef unsigned long in_addr_t;
|
|||||||
#define PACKED __attribute__ ((__packed__))
|
#define PACKED __attribute__ ((__packed__))
|
||||||
#endif
|
#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#ifndef getpid
|
#ifndef getpid
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="4"
|
WarningLevel="4"
|
||||||
WarnAsError="true"
|
WarnAsError="true"
|
||||||
@ -124,7 +124,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include""
|
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="4"
|
WarningLevel="4"
|
||||||
WarnAsError="true"
|
WarnAsError="true"
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
* switch_core.c -- Main Core Library
|
* switch_core.c -- Main Core Library
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
//#define DEBUG_ALLOC
|
//#define DEBUG_ALLOC
|
||||||
|
|
||||||
|
@ -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));
|
len = (uint32_t)(strlen(extra_fmt) + strlen(date) + strlen(filep) + 32 + strlen(func) + strlen(fmt));
|
||||||
new_fmt = malloc(len+1);
|
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;
|
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) {
|
if (channel == SWITCH_CHANNEL_ID_LOG_CLEAN) {
|
||||||
content = data;
|
content = data;
|
||||||
} else {
|
} else {
|
||||||
content = strchr(data, (char)128);
|
content = strchr(data, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel == SWITCH_CHANNEL_ID_EVENT) {
|
if (channel == SWITCH_CHANNEL_ID_EVENT) {
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="4"
|
WarningLevel="4"
|
||||||
WarnAsError="true"
|
WarnAsError="true"
|
||||||
@ -123,7 +123,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories=""$(InputDir)include";"$(InputDir)..\libs\include""
|
AdditionalIncludeDirectories=""$(InputDir)include";"$(InputDir)..\libs\include""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="4"
|
WarningLevel="4"
|
||||||
WarnAsError="true"
|
WarnAsError="true"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user