From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dan Melnic <dmm@fb.com>
Cc: "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
Omar Sandoval <osandov@osandov.com>
Subject: Re: xfsprogs and libintl
Date: Thu, 3 Dec 2020 11:35:07 -0800 [thread overview]
Message-ID: <20201203193507.GI106272@magnolia> (raw)
In-Reply-To: <B8D4A2D8-01A0-40D6-AB89-887BD0B1F4B4@fb.com>
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
>
>
next prev parent reply other threads:[~2020-12-03 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 19:15 xfsprogs and libintl Dan Melnic
2020-12-03 19:35 ` Darrick J. Wong [this message]
2020-12-03 20:05 ` Dan Melnic
2020-12-03 20:19 ` Eric Sandeen
2020-12-03 20:38 ` Dan Melnic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201203193507.GI106272@magnolia \
--to=darrick.wong@oracle.com \
--cc=dmm@fb.com \
--cc=linux-xfs@vger.kernel.org \
--cc=osandov@osandov.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox