xfsprogs and libintl

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

 



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.
/* 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

Thanks,

Dan






[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux