talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 8338a74ceb2417a295c42f77c4b2cbe933376c79
parent 39b7d49b0dbd7aa014484153e79380a0fcb28fb7
Author: Colin Leroy <colin@colino.net>
Date:   Fri, 25 Apr 2008 22:31:28 +0000

2008-04-25 [colin]	3.4.0cvs14

	* src/addrindex.h
	* src/common/ssl_certificate.c
		Patch by Marcus: Fix Win32 build
	* src/common/ssl.c
		Fix build with GnuTLS/no pthread, thanks
		to Marcus

Diffstat:
MChangeLog | 9+++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/addrindex.h | 5+++++
Msrc/common/ssl.c | 10+++++++---
Msrc/common/ssl_certificate.c | 12++++++------
6 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,12 @@ +2008-04-25 [colin] 3.4.0cvs14 + + * src/addrindex.h + * src/common/ssl_certificate.c + Patch by Marcus: Fix Win32 build + * src/common/ssl.c + Fix build with GnuTLS/no pthread, thanks + to Marcus + 2008-04-25 [colin] 3.4.0cvs13 * src/summaryview.c diff --git a/PATCHSETS b/PATCHSETS @@ -3309,3 +3309,4 @@ ( cvs diff -u -r 1.149.2.89 -r 1.149.2.90 src/inc.c; cvs diff -u -r 1.29.2.13 -r 1.29.2.14 src/inc.h; cvs diff -u -r 1.12.2.15 -r 1.12.2.16 src/ldif.c; cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/ldif.h; ) > 3.4.0cvs11.patchset ( cvs diff -u -r 1.155.2.84 -r 1.155.2.85 src/Makefile.am; diff -u /dev/null src/w32-logo.ico; diff -u /dev/null src/w32-resource.rc; ) > 3.4.0cvs12.patchset ( cvs diff -u -r 1.395.2.365 -r 1.395.2.366 src/summaryview.c; ) > 3.4.0cvs13.patchset +( cvs diff -u -r 1.9.2.14 -r 1.9.2.15 src/addrindex.h; cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/common/ssl.c; cvs diff -u -r 1.4.2.26 -r 1.4.2.27 src/common/ssl_certificate.c; ) > 3.4.0cvs14.patchset diff --git a/configure.ac b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=4 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=13 +EXTRA_VERSION=14 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/addrindex.h b/src/addrindex.h @@ -91,6 +91,11 @@ struct _AddressInterface { void (*stopSearch)( void * ); }; +#ifdef G_OS_WIN32 +/* W32 headers define INTERFACE to "struct". */ +#undef interface +#endif + typedef struct _AddressDataSource AddressDataSource; struct _AddressDataSource { AddrItemObject obj; diff --git a/src/common/ssl.c b/src/common/ssl.c @@ -123,14 +123,14 @@ static gint SSL_connect_nb(SSL *ssl) static gint SSL_connect_nb(gnutls_session ssl) #endif { +#ifdef USE_GNUTLS + int result; +#endif #ifdef USE_PTHREAD thread_data *td = g_new0(thread_data, 1); pthread_t pt; pthread_attr_t pta; void *res = NULL; -#ifdef USE_GNUTLS - int result; -#endif time_t start_time = time(NULL); gboolean killed = FALSE; @@ -179,7 +179,11 @@ static gint SSL_connect_nb(gnutls_session ssl) return SSL_connect(ssl); #else do { +#ifdef USE_PTHRED result = gnutls_handshake(td->ssl); +#else + result = gnutls_handshake(ssl); +#endif } while (result == GNUTLS_E_AGAIN || result == GNUTLS_E_INTERRUPTED); #endif #endif diff --git a/src/common/ssl_certificate.c b/src/common/ssl_certificate.c @@ -33,16 +33,16 @@ #include <string.h> #endif #include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> #include <stdio.h> -#include <netdb.h> #include <glib.h> #include <glib/gi18n.h> - #ifdef G_OS_WIN32 -#include "winsock2.h" -#endif +# include <winsock2.h> +#else +# include <sys/socket.h> +# include <netinet/in.h> +# include <netdb.h> +#endif /* G_OS_WIN32 */ #include "ssl_certificate.h" #include "utils.h" #include "log.h"