git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH, resent] fix openssl headers conflicting with custom SHA1 implementations

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 1, 2008, 16:10 UTC
Message-ID
<20081001161047.GG21310@spearce.org>
In-Reply-To
<20081001160418.GA13917@coredump.intra.peff.net>
Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> On Wed, Oct 01, 2008 at 08:54:58AM -0700, Shawn O. Pearce wrote:
> 
> > I think its easy enough to just rename our SHA_CTX and SHA_*
> > functions to something more git specific.  Since its mostly a global
> 
> I think that is the cleanest and simplest solution. As for merging pain,
> I think Junio would generally do a mechanical change like this as the
> first thing after a release. However, in this case, I think we might
> want it sooner if the conflict is causing breakage.

Oh, yea, that's probably true. But with ARM broken according to Nico I'd almost just want this fixed in the upcoming 1.6.1 release. Its simple enough to do. We can even do something like this during the transition period until right before the 1.6.1 final:

diff --git a/cache.h b/cache.h
index 46f82bd..e77adf9 100644
--- a/cache.h
+++ b/cache.h
@@ -5,6 +5,10 @@
 #include "strbuf.h"
 #include "hash.h"
 
+#define SHA_CTX     not_the_SHA_CTX_you_are_looking_for
+#define SHA1_Init   not_the_SHA1_Init_you_are_looking_for
+#define SHA1_Update not_the_SHA1_Update_you_are_looking_for
+#define SHA1_Final  not_the_SHA1_Final_you_are_looking_for
 #include SHA1_HEADER
 #include <zlib.h>

and we'll catch anything using the old symbol name.  Only cache.h
includes the SHA1_HEADER so anyone using the (old) SHA_* functions
would hit these #defines and fall over the undefined symbol.
-- 
Shawn.
Previous: Jeff KingNext: Nicolas Pitre
Message 8 of 11 in “fix openssl headers conflicting with custom SHA1 implementations”
  1. fix openssl headers conflicting with custom SHA1 implementationsNicolas Pitre, Sep 30, 2008
  2. Shawn O. PearceSep 30, 2008
  3. Nicolas PitreSep 30, 2008
  4. Shawn O. PearceSep 30, 2008
  5. Jeff KingOct 1, 2008
  6. Shawn O. PearceOct 1, 2008
  7. Jeff KingOct 1, 2008
  8. Shawn O. PearceOct 1, 2008
  9. Nicolas PitreOct 1, 2008
  10. Shawn O. PearceOct 1, 2008
  11. fix openssl headers conflicting with custom SHA1 implementationsNicolas Pitre, Oct 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.