fix for msvc 9 build.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6644 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-12-11 15:58:20 +00:00
parent cfcc114b21
commit 067afdf3d3
6 changed files with 21 additions and 4 deletions

View File

@ -141,7 +141,7 @@ int sres_close(sres_socket_t s)
return closesocket(s);
}
#if !defined(IPPROTO_IPV6)
#if !defined(IPPROTO_IPV6) && (_WIN32_WINNT < 0x0600)
#if HAVE_SIN6
#include <tpipv6.h>
#else

View File

@ -67,7 +67,7 @@
# include <winsock2.h>
# include <ws2tcpip.h>
# if SU_HAVE_IN6
# if defined(IPPROTO_IPV6)
# if defined(IPPROTO_IPV6) || (_WIN32_WINNT >= 0x0600)
/* case 1: IPv6 defined in winsock2.h/ws2tcpip.h */
# else
/* case 2: try to use "IPv6 Tech Preview" */

View File

@ -67,6 +67,12 @@
#define MSG_NOSIGNAL (0)
#endif
#if (_WIN32_WINNT >= 0x0600)
#ifndef HAVE_MSG_TRUNC
#define HAVE_MSG_TRUNC 1
#endif
#endif
#if !HAVE_MSG_TRUNC
#define MSG_TRUNC (0)
#endif

View File

@ -196,7 +196,7 @@ static void tport_check_trunc(tport_t *tp, su_addrinfo_t *ai)
n = su_sendto(tp->tp_socket,
"TEST", 4, 0,
(void *)ai->ai_addr, ai->ai_addrlen);
(void *)ai->ai_addr, (socklen_t)ai->ai_addrlen);
if (n != 4)
return;

View File

@ -457,7 +457,13 @@
#define strncasecmp _strnicmp
#define snprintf _snprintf
#ifndef _MSC_VER
#define vsnprintf _vsnprintf
#endif
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#define srandom(x) srand((x))
#define random() rand()

View File

@ -104,7 +104,12 @@
#define snprintf _snprintf
#endif
#ifndef vsnprintf
#define vsnprintf _vsnprintf
#ifndef _MSC_VER
#define vsnprintf _vsnprintf
#endif
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#endif
#define srandom(x) srand((x))