Subject: [libssh2] [ libssh2-Bugs-1946268 ] Visual Studio 2008 fixes

[libssh2] [ libssh2-Bugs-1946268 ] Visual Studio 2008 fixes

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 18 Apr 2008 20:11:24 -0700

Bugs item #1946268, was opened at 2008-04-18 21:32
Message generated for change (Comment added) made by roadrunn
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1946268&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: misc
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Neil Gierman (roadrunn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Visual Studio 2008 fixes

Initial Comment:
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 */

----------------------------------------------------------------------

>Comment By: Neil Gierman (roadrunn)
Date: 2008-04-18 22:11

Message:
Logged In: YES
user_id=414183
Originator: YES

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 */

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1946268&group_id=125852

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2008-04-19