]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
build tweaks
authorMichael Jerris <mike@jerris.com>
Tue, 23 Sep 2008 16:00:26 +0000 (16:00 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 23 Sep 2008 16:00:26 +0000 (16:00 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@563 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/include/openzap.h
libs/openzap/src/isdn/Q921.c
libs/openzap/src/isdn/Q931ie.c
libs/openzap/src/isdn/include/Q921priv.h

index 11381854aafe163250b1ebb5ed41146f7232bfd7..c0b739fc0438b3590fea0cac027150007259a6b4 100644 (file)
 #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 */
index d2ed969ba9b3eb7cc1dc1d5e2389acdb3ab83ed2..a3e5ec37833534355cd565b61e3bc58ce58664bf 100644 (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;
index c93313e973a9e2fc8bd51fa71774bbc0bfd13dbf..61ffc3dcc1247b4eb72cec4c1644e7b5ff04f217 100644 (file)
 
 #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
index c355e9b20d7e75acce9c79937cecc2701ddda8be..d2d838c3994539fe6a13362b0c66bab55b9a641f 100644 (file)
 #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 */