diff options
| author | 2012-02-27 15:33:51 +0000 | |
|---|---|---|
| committer | 2012-02-27 15:33:51 +0000 | |
| commit | 79a548fbe8c2dda75ffdd23aba5b66c8ba21964d (patch) | |
| tree | 8f1c580f7b8aa0846a83896a9b0b24e26bfda5f2 | |
| parent | another compilation fix for win32 (diff) | |
| download | KVIrc-79a548fbe8c2dda75ffdd23aba5b66c8ba21964d.tar.gz KVIrc-79a548fbe8c2dda75ffdd23aba5b66c8ba21964d.tar.bz2 KVIrc-79a548fbe8c2dda75ffdd23aba5b66c8ba21964d.zip | |
fixed #440 for osx; updated INSTALL-Win32.txt for openssl>=1.0
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6078 17fca916-40b9-46aa-a4ea-0a15b648b75c
| -rw-r--r-- | doc/INSTALL-Win32.txt | 24 | ||||
| -rw-r--r-- | src/kvilib/net/KviSSL.cpp | 20 |
2 files changed, 27 insertions, 17 deletions
diff --git a/doc/INSTALL-Win32.txt b/doc/INSTALL-Win32.txt index 6fa50ab09..9374fbfd5 100644 --- a/doc/INSTALL-Win32.txt +++ b/doc/INSTALL-Win32.txt @@ -108,23 +108,19 @@ Prerequisites Newer OpenSSL versions from www.slproweb.com need a specific version of Microsoft Visual Studio 2008 runtimes to work (this sucks): so if you plan to create a redistributable kvirc package, our advice is to compile - OpenSSL by yourself using MinGW and then use your libs. + OpenSSL by yourself using MinGW/MSYS and then use your libs. To compile OpenSSL by yourself: - download the latest source from http://www.openssl.org - - unpack it somewhere (say C:\Devel\OpenSSL) - - open a command prompt and go to C:\Devel\OpenSSL - - run "perl ./Configure mingw shared" - - run "make" - - If it complains about undefined DSSPUBKEY or CERT_STORE_SOMETHING_* - in e_capi.c or it complains about undefined references to - "CryptEnumProviders*" in the linking phase then open engines/e_capi.c - and put - - #define OPENSSL_NO_CAPIENG 1 - - at the top. Then restart "make". + - move it somewhere inside the msys root directory (C:\MinGW\msys\1.0\) + - open the MinGW shell and locate the package + - unpack the package (you need to do it from the MinGW shell since it + contains symlinks) + - enter in the created directory + - run "./config shared" + - run "make" and then "make install" + - grab the entire installation directory (eg: C:\MinGW\msys\1.0\local\ssl) + and copy it in a more accessible path (like C:\OpenSSL) Whatever way you choose, install OpenSSL somewhere (like C:\OpenSSL) and remember the path. diff --git a/src/kvilib/net/KviSSL.cpp b/src/kvilib/net/KviSSL.cpp index a146cc652..dcc1a043c 100644 --- a/src/kvilib/net/KviSSL.cpp +++ b/src/kvilib/net/KviSSL.cpp @@ -40,6 +40,7 @@ #include <stdio.h> #if !(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)) + // linux, mac #include <signal.h> #endif @@ -308,9 +309,22 @@ void KviSSL::shutdown() { if(m_pSSL) { - #if !(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)) - //avoid to die on a SIGPIPE if the connection has close (SSL_shutdown can call send()) - //see bug #440 + //avoid to die on a SIGPIPE if the connection has close (SSL_shutdown can call send()) + //see bug #440 + + #if defined(COMPILE_ON_OSX) + // SIG_IGN is ignored under osx, need to use sigprocmask + sigset_t x; + sigemptyset (&x); + sigaddset(&x, SIGPIPE); + sigprocmask(SIG_BLOCK, &x, NULL) + + SSL_shutdown(m_pSSL); + + sigprocmask(SIG_UNBLOCK, &x, NULL) + + #elif !(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)) + // ignore SIGPIPE signal( SIGPIPE, SIG_IGN ); // At least attempt to shutdown the connection gracefully SSL_shutdown(m_pSSL); |
