提交 b36e1af3 authored 作者: Michael Jerris's avatar Michael Jerris

build tweaks

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@563 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 35fbef43
...@@ -73,6 +73,12 @@ ...@@ -73,6 +73,12 @@
#ifndef snprintf #ifndef snprintf
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif
#ifndef S_IRUSR
#define S_IRUSR _S_IREAD
#endif
#ifndef S_IWUSR
#define S_IWUSR _S_IWRITE
#endif
#undef HAVE_STRINGS_H #undef HAVE_STRINGS_H
#undef HAVE_SYS_SOCKET_H #undef HAVE_SYS_SOCKET_H
/* disable warning for zero length array in a struct */ /* disable warning for zero length array in a struct */
......
...@@ -564,7 +564,7 @@ static int print_hex(char *buf, int bsize, const unsigned char *in, const int le ...@@ -564,7 +564,7 @@ static int print_hex(char *buf, int bsize, const unsigned char *in, const int le
static int Q921LogMesg(L2TRUNK trunk, Q921LogLevel_t level, L2UCHAR received, L2UCHAR *mes, L2INT size, const char *fmt, ...) static int Q921LogMesg(L2TRUNK trunk, Q921LogLevel_t level, L2UCHAR received, L2UCHAR *mes, L2INT size, const char *fmt, ...)
{ {
char buf[Q921_LOGBUFSIZE]; char buf[Q921_LOGBUFSIZE];
L2INT len, left; size_t len, left;
va_list ap; va_list ap;
if(!trunk->Q921LogProc) if(!trunk->Q921LogProc)
...@@ -594,7 +594,7 @@ static int Q921LogMesg(L2TRUNK trunk, Q921LogLevel_t level, L2UCHAR received, L2 ...@@ -594,7 +594,7 @@ static int Q921LogMesg(L2TRUNK trunk, Q921LogLevel_t level, L2UCHAR received, L2
if(trunk->loglevel == Q921_LOG_DEBUG) { if(trunk->loglevel == Q921_LOG_DEBUG) {
char pbuf[1024]; char pbuf[1024];
L2INT pleft, poffset; size_t pleft, poffset;
L2UCHAR sapi, tei, cr; L2UCHAR sapi, tei, cr;
L2UCHAR *pmes = mes + trunk->Q921HeaderSpace; L2UCHAR *pmes = mes + trunk->Q921HeaderSpace;
struct Q921_Link *link; struct Q921_Link *link;
......
...@@ -57,6 +57,29 @@ ...@@ -57,6 +57,29 @@
#include "Q931.h" #include "Q931.h"
#ifdef _MSC_VER
#ifndef __inline__
#define __inline__ __inline
#endif
#if (_MSC_VER >= 1400) /* VC8+ */
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
#ifndef _CRT_NONSTDC_NO_DEPRECATE
#define _CRT_NONSTDC_NO_DEPRECATE
#endif
#endif
#ifndef strcasecmp
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#endif
#ifndef strncasecmp
#define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)
#endif
#ifndef snprintf
#define snprintf _snprintf
#endif
#endif
/***************************************************************************** /*****************************************************************************
Macro: Q931MoreIE Macro: Q931MoreIE
......
...@@ -43,6 +43,29 @@ ...@@ -43,6 +43,29 @@
#ifndef _Q921_PRIV_H_ #ifndef _Q921_PRIV_H_
#define _Q921_PRIV_H_ #define _Q921_PRIV_H_
#ifdef _MSC_VER
#ifndef __inline__
#define __inline__ __inline
#endif
#if (_MSC_VER >= 1400) /* VC8+ */
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
#ifndef _CRT_NONSTDC_NO_DEPRECATE
#define _CRT_NONSTDC_NO_DEPRECATE
#endif
#endif
#ifndef strcasecmp
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#endif
#ifndef strncasecmp
#define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)
#endif
#ifndef snprintf
#define snprintf _snprintf
#endif
#endif
typedef enum /* Q.921 States */ typedef enum /* Q.921 States */
{ {
Q921_STATE_STOPPED = 0, /* Trunk stopped */ Q921_STATE_STOPPED = 0, /* Trunk stopped */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论