提交 48f2ed52 authored 作者: Moises Silva's avatar Moises Silva

Fixes to compile in Windows C++ compiler


git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@913 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 2c976c9f
......@@ -175,6 +175,10 @@
#include "zap_buffer.h"
#include "zap_threadmutex.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __WINDOWS__
#define zap_sleep(x) Sleep(x)
#else
......@@ -317,10 +321,6 @@
*/
#define zap_copy_flags(dest, src, flags) (dest)->flags &= ~(flags); (dest)->flags |= ((src)->flags & (flags))
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
ZAP_STATE_CHANGE_FAIL,
ZAP_STATE_CHANGE_SUCCESS,
......
......@@ -405,6 +405,17 @@ typedef enum {
ZAP_CHANNEL_ANSWERED = (1 << 23),
ZAP_CHANNEL_MUTE = (1 << 24)
} zap_channel_flag_t;
#if defined(__cplusplus) && defined(WIN32)
// fix C2676
__inline__ zap_channel_flag_t operator|=(zap_channel_flag_t a, int32_t b) {
a = (zap_channel_flag_t)(a | b);
return a;
}
__inline__ zap_channel_flag_t operator&=(zap_channel_flag_t a, int32_t b) {
a = (zap_channel_flag_t)(a & b);
return a;
}
#endif
typedef enum {
ZSM_NONE,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论