From 85d442615e76eddd6e549b8da0110e75466e2170 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 24 Jul 2006 04:31:28 +0000 Subject: [PATCH] fix C linkage when using templates issue when building C++ modules in msvc that stems from including some windows header files inside of an extern C block, when building with C++. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2070 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch.h | 2 -- src/include/switch_apr.h | 4 ++-- src/include/switch_platform.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/include/switch.h b/src/include/switch.h index af9db6b0d9..63e23c3665 100644 --- a/src/include/switch.h +++ b/src/include/switch.h @@ -43,7 +43,6 @@ #define END_EXTERN_C #endif -BEGIN_EXTERN_C //Need to include this before any other includes (MSVC Bug) #include @@ -75,7 +74,6 @@ BEGIN_EXTERN_C #include #include -END_EXTERN_C /** \mainpage FreeSWITCH * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application diff --git a/src/include/switch_apr.h b/src/include/switch_apr.h index db23f32557..f90282ec47 100644 --- a/src/include/switch_apr.h +++ b/src/include/switch_apr.h @@ -39,8 +39,6 @@ #ifndef SWITCH_APR_H #define SWITCH_APR_H -BEGIN_EXTERN_C - #include #include #include @@ -65,6 +63,8 @@ BEGIN_EXTERN_C #include #include +BEGIN_EXTERN_C + /* The pieces of apr we allow ppl to pass around between modules we typedef into our namespace and wrap all the functions any other apr code should be as hidden as possible. diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index 9557dc193a..aadd8343df 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -65,7 +65,7 @@ BEGIN_EXTERN_C * C4819: The file contains a character that cannot be represented in the current code page * C4132: 'object' : const object should be initialized (fires innapropriately for prototyped forward declaration of cost var) */ -#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706 4055 4214 4819 4132) +#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706 4055 4214 4819 4132 4510 4512 4610) #if (_MSC_VER >= 1400) // VC8+ #ifndef _CRT_SECURE_NO_DEPRECATE