Bugs item #1946268, was opened at 2008-04-19 04:32
Message generated for change (Settings changed) made by bagder
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: Closed
>Resolution: Fixed
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: Daniel Stenberg (bagder)
Date: 2008-09-29 21:00

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

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

Comment By: Neil Gierman (roadrunn)
Date: 2008-04-19 05: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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to