www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Patches for Windows, Wincng, Visual Studio

Re: Patches for Windows, Wincng, Visual Studio

From: Marc Hoersken <info_at_marc-hoersken.de>
Date: Sun, 18 May 2014 13:10:43 +0200

Hello Bob,

thanks again for your patches. I applied slight modifications of the
following patches:


On 08.04.2014 23:36, Bob Kast wrote:
> 0001-Add-Visual-Studio-2013-solution-project-files.patch:
> I understand that you are working on a cmake system that will create Visual
> Studio project files. Until that time, I have a patch that includes project
> files for VS2013. It can be something temporary or it can be something used
> as a model for creating the cmake files.

I am holding back the following patches until we figured out an approach
to generate Visual Studio project files:


My preference would be something like the Visual Studio files and
generation scripts Steve Holme did for curl.
See the following mailinglist posts to the curl-library mailinglist for
more information:

 http://thread.gmane.org/gmane.comp.web.curl.library/42126 (complete thread)

> 0001-Use-secure-versions-of-CRT-library.patch:
> Libssh2 uses deprecated versions of the run-time library. This patch updates
> that so they use the secure versions. For my changes to correctly compile on
> non-Windows systems, you need to add the following defines. I was not sure
> where these should be added:
> #define SNPRINTF snprintf
> #define VSNPRINTF vsnprintf

I think we need more feedback/information regarding the following
patches before they can be merged:

  I agree that libssh2 should use the secure string formatting functions
if they are available.
  I am just not sure if macros and various ifdefs are the best approach.
  Maybe we can create internal snprintf and vsnprintf wrapper functions
  Like curlx: https://github.com/bagder/curl/blob/master/lib/curlx.h

  I checked the generated libssh2-1.dll and there were no exports
besides the libssh2 API functions.
  Why do you think this patch is necessary and to which build scenario
does it apply?

  It's definitely a good idea to use OutputDebugString instead of
fprintf, but maybe there
  should be a separate define for that instead of using the following:
   "#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)"

Would you mind to elaborate a little bit on the changes and adapt the
code style to the existing libssh2 code?

Thanks in advance.

Best regards,
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2014-05-18

the libssh2 team