Subject: RE: Windows issues with latest snapshot

RE: Windows issues with latest snapshot

From: Neil Gierman <ngierman_at_roadrunn.com>
Date: Sun, 14 Jun 2009 20:02:42 -0500

> From: Daniel Stenberg [mailto:daniel_at_haxx.se]
> Sent: Sunday, June 14, 2009 4:02 PM
>
> Isn't it enough to raise the check at line 74 to be <= 1500 instead of
> 1400?
> It seems odd to duplicate that section.

Yes updating that line in libssh2.h line 74 to be <= 1500 instead of <= 1400
also fixes the problem

>
> I don't even understand what this means. How are these functions
> different
> than all the other functions libssh2 have marked with LIBSSH2_API to be
> part
> of its API/ABI ?
>

I took another look and noticed one difference between the other API/ABI
files that compile just fine and this one that doesn't.

Other files do not include "libssh2.h", they only include "libssh2_priv.h",
I removed the include of "libssh2.h" in hostkey.c (and knownhost.c that I
forgot to include after the merge) and now everything compiles cleanly.

I do not have a Linux machine handy so I don't know if these modifications
to hostkey and knownhost will cause problems in other OS's.

Below is the patch to all files that now compile cleanly on Visual Studio
2008.

Left base folder: C:\libssh2-1.1.1-20090613
Right base folder: C:\libssh2-1.1
--- include\libssh2.h 2009-06-12 21:02:23.000000000 -0500
+++ include\libssh2.h 2009-06-14 19:47:30.000000000 -0500
@@ -68,13 +68,13 @@
 
 #if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
 # include <sys/bsdskt.h>
 typedef unsigned int uint32_t;
 #endif
 
-#if defined(LIBSSH2_WIN32) && defined(_MSC_VER) && (_MSC_VER <= 1400)
+#if defined(LIBSSH2_WIN32) && defined(_MSC_VER) && (_MSC_VER <= 1500)
 typedef unsigned __int64 libssh2_uint64_t;
 typedef __int64 libssh2_int64_t;
 typedef unsigned int uint32_t;
 #ifndef _SSIZE_T_DEFINED
 typedef int ssize_t;
 #define _SSIZE_T_DEFINED
--- src\hostkey.c 2009-05-20 08:08:43.000000000 -0500
+++ src\hostkey.c 2009-06-14 19:50:53.000000000 -0500
@@ -33,13 +33,12 @@
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  * OF SUCH DAMAGE.
  */
 
-#include "libssh2.h"
 #include "libssh2_priv.h"
 #include "misc.h"
 
 /* Needed for struct iovec on some platforms */
 #ifdef HAVE_SYS_UIO_H
 #include <sys/uio.h>
--- src\knownhost.c 2009-06-10 21:02:03.000000000 -0500
+++ src\knownhost.c 2009-06-14 19:51:21.000000000 -0500
@@ -33,13 +33,12 @@
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  * OF SUCH DAMAGE.
  */
 
-#include "libssh2.h"
 #include "libssh2_priv.h"
 #include "misc.h"
 
 struct known_host {
     struct list_node node;
     char *name; /* points to the name or the hash (allocated) */

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-06-15