Re: [PATCH 2/4] git-imap-send: Add support for SSL.

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

 



Robert Shearman <robertshearman@xxxxxxxxx> writes:

> diff --git a/imap-send.c b/imap-send.c
> index 24d76a7..26d1dba 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -23,6 +23,12 @@
>   */
>  
>  #include "cache.h"
> +#ifdef NO_OPENSSL
> +typedef void *SSL;
> +#else
> +# include <openssl/ssl.h>
> +# include <openssl/err.h>
> +#endif

This unfortunately is causing compilation issues.  <openssl/ssl.h> wants
to include <ctype.h> and gets upset by seeing our isalpha() and friends
that are defined indirectly in "cache.h" expanded.

In <ctype.h> (on FC9), isCHARACTERISTC() are defined like this:

	#define __exctype(name) extern int name (int) __THROW
	...
        __exctype (isalnum);
        __exctype (isalpha);

but we have been using our own locale agonistic and signed-chars safe
macros defined in git-compat-util.h.  Including <ctype.h> breaks at the
syntax level, but more importantly if the system <ctype.h> redefines
isalpha() and friends as macro, then it would break _our_ code that expect
these macros are the sane_ctype[] based ones we have.

A hack like the one attached below would make it "work" but it is too
ugly.  Probably we need to bite the bullet and rename ours not to
collide, so that external library headers can safely include <ctype.h>.

Sigh...

diff --git a/git-compat-util.h b/git-compat-util.h
index 8c7e114..0af6406 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -302,6 +302,7 @@ static inline int has_extension(const char *filename, const char *ext)
 }
 
 /* Sane ctype - no locale, and works with signed chars */
+#define _CTYPE_H
 #undef isspace
 #undef isdigit
 #undef isalpha




--
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]

  Powered by Linux