On Thu, Dec 03, 2020 at 07:15:39PM +0000, Dan Melnic wrote: > Hi, > > If we compile some code both with libintl.h and libxfs/xfsprogs, we can end up, based on the include order, with the > # define textdomain(d) do { } while (0) > before: > extern char *textdomain (const char *__domainname) __THROW; > > This will cause a compile error. > I think the ENABLE_GETTEXT check should not leak into any public headers. What public header file? $ grep textdomain /usr/include/xfs/ $ grep ENABLE_GETTEXT /usr/include/xfs/ $ > /* Define if you want gettext (I18N) support */ > #undef ENABLE_GETTEXT > #ifdef ENABLE_GETTEXT > # include <libintl.h> > # define _(x) gettext(x) > # define N_(x) x > #else > # define _(x) (x) > # define N_(x) x > # define textdomain(d) do { } while (0) > # define bindtextdomain(d,dir) do { } while (0) > #endif > > https://github.com/osandov/xfsprogs/blob/master/include/platform_defs.h.in#L48 platform_defs.h is private to the xfsprogs code base; what are you doing? Confused, --D > > Thanks, > > Dan > >