[PATCH] lib: have two definitions of NOTMUCH_DEPRECATED macro

Justus Winter 4winter at informatik.uni-hamburg.de
Tue Mar 1 08:46:18 PST 2016


Quoting Jani Nikula (2015-12-29 12:52:20)
> > __has_extension() replacement was modeled after __has_attribute()
> > definition in compat/function-attributes.h. Thanks Justus.

Hum, I didn't even recall doing that.

> > +/* clang provides this macro to test for support for language
> > + * extensions. If it isn't defined, this provides a compatibility
> > + * macro for other compilers.
> > + */
> > +#ifndef __has_extension
> > +#define __has_extension(x) 0
> > +#endif
> 
> This file is included by the users of the library, and thus this
> definition leaks to our users. It might cause problems if the users have
> different expectations for handling ifndef __has_extension. I don't
> think we should define things outside of our namespace in notmuch.h.

Indeed, even more so since the __ namespace is reserved.  But that
should be easy to fix, right?  Simply pick a less problematic name for
the new macro.

I'd love to see this issue fixed.

Cheers,
Justus


More information about the notmuch mailing list