1 diff -urN libssh2-0.18.orig/configure.in libssh2-0.18.mingw/configure.in
2 --- libssh2-0.18.orig/configure.in 2007-07-31 10:55:29.000000000 +0100
3 +++ libssh2-0.18.mingw/configure.in 2008-11-10 14:12:07.000000000 +0000
6 AC_INIT(libssh2, [-], libssh2-devel@lists.sourceforge.net)
7 AC_CONFIG_SRCDIR([src])
8 -AC_CONFIG_HEADER([src/libssh2_config.h example/simple/config.h])
9 +AC_CONFIG_HEADER([src/libssh2_config.h])
12 dnl SED is needed by some of the tools
13 diff -urN libssh2-0.18.orig/example/simple/config.h.in libssh2-0.18.mingw/example/simple/config.h.in
14 --- libssh2-0.18.orig/example/simple/config.h.in 2007-07-31 11:02:51.000000000 +0100
15 +++ libssh2-0.18.mingw/example/simple/config.h.in 1970-01-01 01:00:00.000000000 +0100
17 -/* src/libssh2_config.h.in. Generated from configure.in by autoheader. */
19 -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
20 - systems. This function is required for `alloca.c' support on those systems.
22 -#undef CRAY_STACKSEG_END
24 -/* Define to 1 if using `alloca.c'. */
27 -/* Define to 1 if you have `alloca', as a function or macro. */
30 -/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
34 -/* Define to 1 if you have the <arpa/inet.h> header file. */
35 -#undef HAVE_ARPA_INET_H
37 -/* disabled non-blocking sockets */
38 -#undef HAVE_DISABLED_NONBLOCKING
40 -/* Define to 1 if you have the <dlfcn.h> header file. */
43 -/* Define to 1 if you have the <errno.h> header file. */
46 -/* Define to 1 if you have the <fcntl.h> header file. */
49 -/* use FIONBIO for non-blocking sockets */
52 -/* Define to 1 if you have the `gettimeofday' function. */
53 -#undef HAVE_GETTIMEOFDAY
55 -/* Define to 1 if you have the <inttypes.h> header file. */
56 -#undef HAVE_INTTYPES_H
58 -/* use ioctlsocket() for non-blocking sockets */
59 -#undef HAVE_IOCTLSOCKET
61 -/* use Ioctlsocket() for non-blocking sockets */
62 -#undef HAVE_IOCTLSOCKET_CASE
64 -/* Define if you have the gcrypt library. */
65 -#undef HAVE_LIBGCRYPT
67 -/* Define to 1 if you have the <memory.h> header file. */
70 -/* Define to 1 if you have the <netinet/in.h> header file. */
71 -#undef HAVE_NETINET_IN_H
73 -/* use O_NONBLOCK for non-blocking sockets */
74 -#undef HAVE_O_NONBLOCK
76 -/* Define to 1 if you have the `poll' function. */
79 -/* Define to 1 if you have the `select' function. */
82 -/* use SO_NONBLOCK for non-blocking sockets */
83 -#undef HAVE_SO_NONBLOCK
85 -/* Define to 1 if you have the <stdint.h> header file. */
88 -/* Define to 1 if you have the <stdio.h> header file. */
91 -/* Define to 1 if you have the <stdlib.h> header file. */
94 -/* Define to 1 if you have the <strings.h> header file. */
95 -#undef HAVE_STRINGS_H
97 -/* Define to 1 if you have the <string.h> header file. */
100 -/* Define to 1 if you have the <sys/ioctl.h> header file. */
101 -#undef HAVE_SYS_IOCTL_H
103 -/* Define to 1 if you have the <sys/select.h> header file. */
104 -#undef HAVE_SYS_SELECT_H
106 -/* Define to 1 if you have the <sys/socket.h> header file. */
107 -#undef HAVE_SYS_SOCKET_H
109 -/* Define to 1 if you have the <sys/stat.h> header file. */
110 -#undef HAVE_SYS_STAT_H
112 -/* Define to 1 if you have the <sys/time.h> header file. */
113 -#undef HAVE_SYS_TIME_H
115 -/* Define to 1 if you have the <sys/types.h> header file. */
116 -#undef HAVE_SYS_TYPES_H
118 -/* Define to 1 if you have the <sys/uio.h> header file. */
119 -#undef HAVE_SYS_UIO_H
121 -/* Define to 1 if you have the <unistd.h> header file. */
122 -#undef HAVE_UNISTD_H
124 -/* Enable "none" cipher -- NOT RECOMMENDED */
125 -#undef LIBSSH2_CRYPT_NONE
127 -/* Enable newer diffie-hellman-group-exchange-sha1 syntax */
128 -#undef LIBSSH2_DH_GEX_NEW
130 -/* Compile in zlib support */
131 -#undef LIBSSH2_HAVE_ZLIB
134 -#undef LIBSSH2_LIBGCRYPT
136 -/* Enable "none" MAC -- NOT RECOMMENDED */
137 -#undef LIBSSH2_MAC_NONE
139 -/* Name of package */
142 -/* Define to the address where bug reports for this package should be sent. */
143 -#undef PACKAGE_BUGREPORT
145 -/* Define to the full name of this package. */
148 -/* Define to the full name and version of this package. */
149 -#undef PACKAGE_STRING
151 -/* Define to the one symbol short name of this package. */
152 -#undef PACKAGE_TARNAME
154 -/* Define to the version of this package. */
155 -#undef PACKAGE_VERSION
157 -/* If using the C implementation of alloca, define if you know the
158 - direction of stack growth for your system; otherwise it will be
159 - automatically deduced at runtime.
160 - STACK_DIRECTION > 0 => grows toward higher addresses
161 - STACK_DIRECTION < 0 => grows toward lower addresses
162 - STACK_DIRECTION = 0 => direction of growth unknown */
163 -#undef STACK_DIRECTION
165 -/* Define to 1 if you have the ANSI C header files. */
168 -/* Version number of package */
171 -/* Define to 1 if your processor stores words with the most significant byte
172 - first (like Motorola and SPARC, unlike Intel and VAX). */
173 -#undef WORDS_BIGENDIAN
175 -/* Number of bits in a file offset, on hosts where this is settable. */
176 -#undef _FILE_OFFSET_BITS
178 -/* Define for large files, on AIX-style hosts. */
181 -/* Define to empty if `const' does not conform to ANSI C. */
184 -/* Define to `__inline__' or `__inline' if that's what the C compiler
185 - calls it, or to nothing if 'inline' is not supported under any name. */
189 diff -urN libssh2-0.18.orig/example/simple/Makefile.am libssh2-0.18.mingw/example/simple/Makefile.am
190 --- libssh2-0.18.orig/example/simple/Makefile.am 2007-08-12 22:39:55.000000000 +0100
191 +++ libssh2-0.18.mingw/example/simple/Makefile.am 2008-11-10 14:13:22.000000000 +0000
194 sftpdir sftpdir_nonblock
196 -INCLUDES = -I. -I$(top_srcdir)/include
197 +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include
198 LDADD = $(top_builddir)/src/libssh2.la
200 diff -urN libssh2-0.18.orig/example/simple/scp.c libssh2-0.18.mingw/example/simple/scp.c
201 --- libssh2-0.18.orig/example/simple/scp.c 2007-08-12 22:39:55.000000000 +0100
202 +++ libssh2-0.18.mingw/example/simple/scp.c 2008-11-10 14:18:13.000000000 +0000
204 * Sample showing how to do a simple SCP transfer.
208 +#include "libssh2_config.h"
211 #ifdef HAVE_WINSOCK2_H
212 diff -urN libssh2-0.18.orig/example/simple/scp_nonblock.c libssh2-0.18.mingw/example/simple/scp_nonblock.c
213 --- libssh2-0.18.orig/example/simple/scp_nonblock.c 2007-09-24 13:15:45.000000000 +0100
214 +++ libssh2-0.18.mingw/example/simple/scp_nonblock.c 2008-11-10 14:22:21.000000000 +0000
216 * Sample showing how to do SCP transfers in a non-blocking manner.
220 +#include "libssh2_config.h"
223 #ifdef HAVE_WINSOCK2_H
224 diff -urN libssh2-0.18.orig/example/simple/scp_write.c libssh2-0.18.mingw/example/simple/scp_write.c
225 --- libssh2-0.18.orig/example/simple/scp_write.c 2007-08-12 22:39:56.000000000 +0100
226 +++ libssh2-0.18.mingw/example/simple/scp_write.c 2008-11-10 14:19:32.000000000 +0000
228 * Sample showing how to do a simple SCP transfer.
232 +#include "libssh2_config.h"
235 #ifdef HAVE_WINSOCK2_H
236 diff -urN libssh2-0.18.orig/example/simple/scp_write_nonblock.c libssh2-0.18.mingw/example/simple/scp_write_nonblock.c
237 --- libssh2-0.18.orig/example/simple/scp_write_nonblock.c 2007-08-12 22:39:56.000000000 +0100
238 +++ libssh2-0.18.mingw/example/simple/scp_write_nonblock.c 2008-11-10 14:22:13.000000000 +0000
240 * Sample showing how to do a simple SCP transfer.
244 +#include "libssh2_config.h"
248 diff -urN libssh2-0.18.orig/example/simple/sftp.c libssh2-0.18.mingw/example/simple/sftp.c
249 --- libssh2-0.18.orig/example/simple/sftp.c 2007-09-24 13:14:18.000000000 +0100
250 +++ libssh2-0.18.mingw/example/simple/sftp.c 2008-11-10 14:15:47.000000000 +0000
252 * "sftp 192.168.0.1 user password /tmp/secrets -p|-i|-k"
256 +#include "libssh2_config.h"
258 #include <libssh2_sftp.h>
260 diff -urN libssh2-0.18.orig/example/simple/sftpdir.c libssh2-0.18.mingw/example/simple/sftpdir.c
261 --- libssh2-0.18.orig/example/simple/sftpdir.c 2007-08-12 22:39:56.000000000 +0100
262 +++ libssh2-0.18.mingw/example/simple/sftpdir.c 2008-11-10 14:18:41.000000000 +0000
264 * "sftpdir 192.168.0.1 user password /tmp/secretdir"
268 +#include "libssh2_config.h"
270 #include <libssh2_sftp.h>
272 diff -urN libssh2-0.18.orig/example/simple/sftpdir_nonblock.c libssh2-0.18.mingw/example/simple/sftpdir_nonblock.c
273 --- libssh2-0.18.orig/example/simple/sftpdir_nonblock.c 2007-08-12 22:39:56.000000000 +0100
274 +++ libssh2-0.18.mingw/example/simple/sftpdir_nonblock.c 2008-11-10 14:23:35.000000000 +0000
276 * "sftpdir 192.168.0.1 user password /tmp/secretdir"
280 +#include "libssh2_config.h"
282 #include <libssh2_sftp.h>
284 diff -urN libssh2-0.18.orig/example/simple/sftp_mkdir.c libssh2-0.18.mingw/example/simple/sftp_mkdir.c
285 --- libssh2-0.18.orig/example/simple/sftp_mkdir.c 2007-08-12 22:39:56.000000000 +0100
286 +++ libssh2-0.18.mingw/example/simple/sftp_mkdir.c 2008-11-10 14:18:33.000000000 +0000
288 * "sftp 192.168.0.1 user password /tmp/sftp_mkdir"
292 +#include "libssh2_config.h"
294 #include <libssh2_sftp.h>
296 diff -urN libssh2-0.18.orig/example/simple/sftp_mkdir_nonblock.c libssh2-0.18.mingw/example/simple/sftp_mkdir_nonblock.c
297 --- libssh2-0.18.orig/example/simple/sftp_mkdir_nonblock.c 2007-08-12 22:39:56.000000000 +0100
298 +++ libssh2-0.18.mingw/example/simple/sftp_mkdir_nonblock.c 2008-11-10 14:23:03.000000000 +0000
300 * "sftp 192.168.0.1 user password /tmp/sftp_write_nonblock.c"
304 +#include "libssh2_config.h"
306 #include <libssh2_sftp.h>
308 diff -urN libssh2-0.18.orig/example/simple/sftp_nonblock.c libssh2-0.18.mingw/example/simple/sftp_nonblock.c
309 --- libssh2-0.18.orig/example/simple/sftp_nonblock.c 2007-08-12 22:39:56.000000000 +0100
310 +++ libssh2-0.18.mingw/example/simple/sftp_nonblock.c 2008-11-10 14:22:30.000000000 +0000
312 * "sftp 192.168.0.1 user password /tmp/secrets"
316 +#include "libssh2_config.h"
318 #include <libssh2_sftp.h>
320 diff -urN libssh2-0.18.orig/example/simple/sftp_RW_nonblock.c libssh2-0.18.mingw/example/simple/sftp_RW_nonblock.c
321 --- libssh2-0.18.orig/example/simple/sftp_RW_nonblock.c 2007-08-12 22:39:56.000000000 +0100
322 +++ libssh2-0.18.mingw/example/simple/sftp_RW_nonblock.c 2008-11-10 14:23:18.000000000 +0000
324 * Using the SFTP server running on 127.0.0.1
328 +#include "libssh2_config.h"
330 #include <libssh2_sftp.h>
332 diff -urN libssh2-0.18.orig/example/simple/sftp_write.c libssh2-0.18.mingw/example/simple/sftp_write.c
333 --- libssh2-0.18.orig/example/simple/sftp_write.c 2007-08-12 22:39:56.000000000 +0100
334 +++ libssh2-0.18.mingw/example/simple/sftp_write.c 2008-11-10 14:19:09.000000000 +0000
336 * "sftp 192.168.0.1 user password sftp_write.c /tmp/secrets"
340 +#include "libssh2_config.h"
342 #include <libssh2_sftp.h>
344 diff -urN libssh2-0.18.orig/example/simple/sftp_write_nonblock.c libssh2-0.18.mingw/example/simple/sftp_write_nonblock.c
345 --- libssh2-0.18.orig/example/simple/sftp_write_nonblock.c 2007-08-12 22:39:56.000000000 +0100
346 +++ libssh2-0.18.mingw/example/simple/sftp_write_nonblock.c 2008-11-10 14:22:44.000000000 +0000
348 * "sftp 192.168.0.1 user password sftp_write_nonblock.c /tmp/sftp_write_nonblock.c"
352 +#include "libssh2_config.h"
354 #include <libssh2_sftp.h>
356 diff -urN libssh2-0.18.orig/example/simple/ssh2.c libssh2-0.18.mingw/example/simple/ssh2.c
357 --- libssh2-0.18.orig/example/simple/ssh2.c 2007-08-12 22:39:56.000000000 +0100
358 +++ libssh2-0.18.mingw/example/simple/ssh2.c 2008-11-10 14:14:32.000000000 +0000
360 * "ssh2 host user password [-p|-i|-k]"
364 +#include "libssh2_config.h"
366 #include <libssh2_sftp.h>
368 +#ifdef HAVE_WINDOWS_H
369 +# include <windows.h>
371 #ifdef HAVE_WINSOCK2_H
372 # include <winsock2.h>