build tweaks

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@563 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2008-09-23 16:00:26 +00:00
parent 35fbef4373
commit b36e1af380
4 changed files with 54 additions and 2 deletions

View File

@ -73,6 +73,12 @@
#ifndef snprintf
#define snprintf _snprintf
#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_SYS_SOCKET_H
/* disable warning for zero length array in a struct */

View File

@ -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, ...)
{
char buf[Q921_LOGBUFSIZE];
L2INT len, left;
size_t len, left;
va_list ap;
if(!trunk->Q921LogProc)
@ -594,7 +594,7 @@ static int Q921LogMesg(L2TRUNK trunk, Q921LogLevel_t level, L2UCHAR received, L2
if(trunk->loglevel == Q921_LOG_DEBUG) {
char pbuf[1024];
L2INT pleft, poffset;
size_t pleft, poffset;
L2UCHAR sapi, tei, cr;
L2UCHAR *pmes = mes + trunk->Q921HeaderSpace;
struct Q921_Link *link;

View File

@ -57,6 +57,29 @@
#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

View File

@ -43,6 +43,29 @@
#ifndef _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 */
{
Q921_STATE_STOPPED = 0, /* Trunk stopped */