Subject: version.c and libssh2.h inclusion

version.c and libssh2.h inclusion

From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 27 Mar 2009 14:51:38 +0100

Hi,

When compiling HEAD on Cygwin I get the following warning:

version.c: In function `libssh2_version':
version.c:50: warning: function 'libssh2_version' is defined after
prior declaration as dllimport: attribute ignored

The fact is that when LIBSSH2_WIN32 is defined LIBSSH2_API needs to be
defined differently for external and internal library consumption.

Including libssh2_priv.h instead of libssh2.h in version.c fixes the
issue for me.

Index: src/version.c
===================================================================
RCS file: /cvsroot/libssh2/libssh2/src/version.c,v
retrieving revision 1.1
diff -u -r1.1 version.c
--- src/version.c 23 Feb 2009 16:22:46 -0000 1.1
+++ src/version.c 27 Mar 2009 13:28:56 -0000
@@ -35,7 +35,7 @@
  *
  */

-#include "libssh2.h"
+#include "libssh2_priv.h"

 /*
   libssh2_version() can be used like this:

-- 
-=[Yang]=-
------------------------------------------------------------------------------
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-03-27