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

Re: [PATCH] imap-send: use Apple's Security framework for base64 encoding

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 29, 2013, 03:35 UTC
Message-ID
<20130729033533.GB2890@elie.Belkin>
In-Reply-To
<1374957092-41505-1-git-send-email-davvid@gmail.com>
Hi,
David Aguilar wrote:
Show 16 quoted lines
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -22,14 +22,11 @@
>   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
>   */
>  
> -#include "cache.h"
> -#include "exec_cmd.h"
> -#include "run-command.h"
> -#include "prompt.h"
>  #ifdef NO_OPENSSL
>  typedef void *SSL;
>  #else
>  #ifdef APPLE_COMMON_CRYPTO
> +/* git-compat-util.h overwrites ctype.h; this must be included first */
>  #include <CommonCrypto/CommonHMAC.h>
Thanks for your work on this.

Currently each translation unit of git includes git-compat-util.h or a header like cache.h that includes git-compat-util.h before doing anything else, since otherwise feature test macros are not set before the first system header is included.

The above (CommonCrypto needing to be included before some of the definitions from git-compat-util.h) suggests to me that CommonCrypto should just be included directly from git-compat-util.h in some appropriate place. That way any other header that needs CommonCrypto routines only has to include git-compat-util.h first as usual and doesn't have to worry about the order of other #includes. Could that work?

Thanks and hope that helps, Jonathan

Previous: Jeremy Huddleston SequoiaNext: David Aguilar
Message 3 of 5 in “imap-send: use Apple's Security framework for base64 encoding”
  1. imap-send: use Apple's Security framework for base64 encodingDavid Aguilar, Jul 27, 2013
  2. Jeremy Huddleston SequoiaJul 27, 2013
  3. Jonathan NiederJul 29, 2013
  4. David AguilarJul 29, 2013
  5. Junio C HamanoJul 29, 2013

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.