Subject: Re: win32 patch for setting errno

Re: win32 patch for setting errno

From: Daniel Stenberg <>
Date: Thu, 19 Mar 2009 13:47:29 +0100 (CET)

On Wed, 18 Mar 2009, E L wrote:

> Here is a patch against libssh2-1.0.1-20090318.tar.gz that sets errno on
> windows by defining a wrapper _libssh2_recv and _libssh2_send. I was not
> sure where it should go, so I just put it in misc.c.

Thanks. I did however remodel it somewhat to reduce code duplication and to
not use the wrapper functions for systems that don't need them (non-win32).

> in two line libssh2_packet_read was not updated to _libsssh2_packet_read

That's fine!

> mingw compiler has unistd.h that defines usleep, so I added ifndef around
> the libssh2 definition of usleep.

We don't even use usleep() so I cut out that whole part before I committed.

Please update from CVS and make sure it runs as expected!

Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial.
libssh2-devel mailing list
Received on 2009-03-19