Re: [PATCH] imap-send.c: fix pointer to be const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> 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;
 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]