Attached are a set of suggested patches.
Brief explanation:
Libssh2.h:
In Windows, a socket is of type SOCKET, not int.
Libssh2_priv.h:
Redundant #define inline
A one bit bit-field should be unsigned
Openssl.c:
You shouldn’t need Openssl to compile if you aren’t selecting it.
Wincng.c:
Putting the #pragma for the libraries works for both DLL and LIB versions.
_libssh2_wincng_hash_update: the parameter needs to be const to match. It is interesting that C just gives a warning for that.
pPaddingInfo value is undefined. Doc says it must be NULL if not used.
Wincng.h:
STATUS_SUCCESS unfortunately not defined if using non-driver includes.
_libssh2_wincng_hash_ctx and _libssh2_wincng_key_ctx: I found this confusing. Kind of a circular #define. I think this is more of what was intended.
Forward declarations: without these the compiler complains for each call.
Libssh2_config.h:
Pragma to suppress “possible loss of data” warnings.
New Files:
- Libssh2.sln – solution file
- Libssh2.vcxproj, libssh2.vcxproj.filters – project files for libssh2
- Tests.vcxproj, tests.vcxproj.filters – project files for tests – I haven’t tested this.
These are specifically for VS2013 and make it easy to create DLL/LIB, Debug/Release, 32/64 bit builds.
Thanks,
Bob
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel