From: Junio C Hamano Date: Wed, 28 Oct 2009 17:56:35 GMT Subject: Re: [PATCH] imap-send.c: fix pointer to be const Message-ID: <7vhbtjo10s.fsf@alter.siamese.dyndns.org> In-Reply-To: <4AE8482F.7020807@drmicha.warpmail.net> Michael J Gruber writes: > Since this is only about warnings, maybe git 1.7.0 is the right time > frame to adjust this to the upcoming standard? This does not look like "one group wants this way, but the others want differently. We have to pick one and sacrifice the other because it is impossible to have it both ways"; there is no excuse to bring up 1.7.0 for something like this. Doesn't inclusing "ssl.h" give us some indication whether "const" is needed to allow us to use #if/#else/#endif in order to compile with headers from either versions? I.e. something like... diff --git a/imap-send.c b/imap-send.c index 3847fd1..a199db8 100644 --- a/imap-send.c +++ b/imap-send.c @@ -273,7 +273,11 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve fprintf(stderr, "SSL requested but SSL support not compiled in\n"); return -1; #else +#if (OPENSSL_VERSION_NUMBER >= 0x1000000fL) + const SSL_METHOD *meth; +#else SSL_METHOD *meth; +#endif SSL_CTX *ctx; int ret;