On Wed, Dec 3, 2014 at 5:04 AM, David Aguilar [off-list ref] wrote:
On Tue, Dec 02, 2014 at 10:09:35PM -0500, Eric Sunshine wrote:
quoted
The potentially lesser evil would be this small patch (minus Gmail
whitespace damage) which disables the deprecation warnings only for
Apple's headers:
----- >8 -----
diff --git a/git-compat-util.h b/git-compat-util.h
index 400e921..709e84f 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -211,6 +211,8 @@ extern char *gitbasename(char *);
#endif
#ifndef NO_OPENSSL
+#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
+#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
#include <openssl/ssl.h>
#include <openssl/err.h>
#endif
----- >8 -----
Considering that Mac OS X is now at 10.10 and these deprecations
commenced with Mac OS X 10.7 in July 2011 (3.5 years ago), and Apple
still has not provided drop-in CommonCrypto equivalents, it seems
unlikely that they will do so any time soon. Consequently, suppressing
these otherwise unavoidable warnings may be the best we can do.
I'm willing to formalize and submit this as a proper patch if it's not
considered too disgusting by the powers-that-be.
Tweaking those internal #defines can only come back to bite us
in the future when the functions are finally ripped out.
If Apple ever does remove those deprecated functions, the build will
break badly regardless of whether or not the Apple-specific
deprecation warnings are suppressed. This patch does not make the
situation any worse, so I don't understand the argument.
If a full set of drop-in equivalents was available, on the other hand,
then your argument would make perfect sense, but it does not seem
apply to the current situation since there is no evidence that Apple
will be providing those replacements any time soon (or ever).