summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-17 22:03:00 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-17 22:03:00 -0800
commita62e733be6abf88f76bdcb6c5eeef34f43860c8c (patch)
tree587698bd79f0316272771eb3c75ed4e73ba3b07e /compat
parentMerge git://git.bogomips.org/git-svn (diff)
parentWindows: use BLK_SHA1 again (diff)
downloadtgif-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.h21
-rw-r--r--compat/vcbuild/scripts/clink.pl3
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);