diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-17 22:03:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-17 22:03:00 -0800 |
commit | a62e733be6abf88f76bdcb6c5eeef34f43860c8c (patch) | |
tree | 587698bd79f0316272771eb3c75ed4e73ba3b07e /compat | |
parent | Merge git://git.bogomips.org/git-svn (diff) | |
parent | Windows: use BLK_SHA1 again (diff) | |
download | tgif-a62e733be6abf88f76bdcb6c5eeef34f43860c8c.tar.xz |
Merge branch 'ef/msys-imap'
* ef/msys-imap:
Windows: use BLK_SHA1 again
MSVC: Enable OpenSSL, and translate -lcrypto
mingw: enable OpenSSL
mingw: wrap SSL_set_(w|r)fd to call _get_osfhandle
imap-send: build imap-send on Windows
imap-send: fix compilation-error on Windows
imap-send: use run-command API for tunneling
imap-send: use separate read and write fds
imap-send: remove useless uid code
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.h | 21 | ||||
-rw-r--r-- | compat/vcbuild/scripts/clink.pl | 3 |
2 files changed, 24 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index 5b5258bceb..6907345f90 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -124,6 +124,27 @@ static inline int waitpid(pid_t pid, int *status, unsigned options) return -1; } +#ifndef NO_OPENSSL +#include <openssl/ssl.h> +static inline int mingw_SSL_set_fd(SSL *ssl, int fd) +{ + return SSL_set_fd(ssl, _get_osfhandle(fd)); +} +#define SSL_set_fd mingw_SSL_set_fd + +static inline int mingw_SSL_set_rfd(SSL *ssl, int fd) +{ + return SSL_set_rfd(ssl, _get_osfhandle(fd)); +} +#define SSL_set_rfd mingw_SSL_set_rfd + +static inline int mingw_SSL_set_wfd(SSL *ssl, int fd) +{ + return SSL_set_wfd(ssl, _get_osfhandle(fd)); +} +#define SSL_set_wfd mingw_SSL_set_wfd +#endif + /* * implementations of missing functions */ diff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl index f9528c0ea1..8a2112f22f 100644 --- a/compat/vcbuild/scripts/clink.pl +++ b/compat/vcbuild/scripts/clink.pl @@ -29,6 +29,9 @@ while (@ARGV) { push(@args, "zlib.lib"); } elsif ("$arg" eq "-liconv") { push(@args, "iconv.lib"); + } elsif ("$arg" eq "-lcrypto") { + push(@args, "libeay32.lib"); + push(@args, "ssleay32.lib"); } elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") { $arg =~ s/^-L/-LIBPATH:/; push(@args, $arg); |