Ticket #70 (closed defect)

Opened 9 years ago

Last modified 9 years ago

Visual Studio 2008 fixes

Reported by: roadrunn Owned by:
Priority: normal Milestone:
Component: misc Version:
Keywords: Cc: roadrunn, bagder
Blocked By: Blocks:

Description

It seems that the new SDK that ships with Visual Studio 2008 has some incompatibilities.

As mentioned at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2031152&SiteID=1 I had to remove the define of _vsnprintf

ssize_t and unit32_t are not longer defined so I had to define then to the Win32 types that were left.

A snip from my win32/libssh2_config.h is below:

#ifdef _MSC_VER
#define snprintf _snprintf
#define ssize_t SSIZE_T
#define uint32_t UINT32
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#else
#ifdef MINGW32
#define WINSOCK_VERSION MAKEWORD(2,0)
#else
#define strncasecmp strnicmp
#define strcasecmp stricmp
#endif /* MINGW32 */
#endif /* _MSC_VER */

Change History

comment:1 Changed 9 years ago by roadrunn

A better code, from libxml2:

#ifdef _MSC_VER
#define snprintf _snprintf
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#else
#define ssize_t SSIZE_T
#define uint32_t UINT32
#endif
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#else
#ifdef MINGW32
#define WINSOCK_VERSION MAKEWORD(2,0)
#else
#define strncasecmp strnicmp
#define strcasecmp stricmp
#endif /* MINGW32 */
#endif /* _MSC_VER */

comment:2 Changed 9 years ago by bagder

Thanks, applied now. Please let me know if I did something wrong!

Note: See TracTickets for help on using tickets.