git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vietor Liu <vietor@vxwo.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: [PATCH] imap-send.c: fix pointer to be const
Date: Thu, 29 Oct 2009 08:13:12 +0800	[thread overview]
Message-ID: <1256775193.2040.6.camel@localhost.localdomain> (raw)
In-Reply-To: <7vhbtjo10s.fsf@alter.siamese.dyndns.org>

On Wed, 2009-10-28 at 10:56 -0700, Junio C Hamano wrote:
> Michael J Gruber <git@drmicha.warpmail.net> 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;
>  

It's better than my patch, thanks.

  reply	other threads:[~2009-10-29  0:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28  5:09 [PATCH] imap-send.c: fix pointer to be const Vietor Liu
2009-10-28  6:26 ` Junio C Hamano
2009-10-28  7:05   ` Vietor Liu
2009-10-28 13:33     ` Michael J Gruber
2009-10-28 17:56       ` Junio C Hamano
2009-10-29  0:13         ` Vietor Liu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-10-28  7:24 Vietor Liu
2009-10-28  7:25 ` Junio C Hamano
2009-10-28  7:48   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256775193.2040.6.camel@localhost.localdomain \
    --to=vietor@vxwo.org \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).