From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Nick Stokes <randomaccessiterator@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: g++ cross distro compilation problem
Date: Thu, 20 Jan 2011 20:01:00 -0000 [thread overview]
Message-ID: <AANLkTikdxEOtUNtRwO0m-yFhU4Ji53Z+9oRPs18mn1WD@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikbaz1tq9wY=1C-zjneMubOpgTnByUey19TAuFi@mail.gmail.com>
On 20 January 2011 19:57, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 20 January 2011 19:28, Nick Stokes wrote:
>>
>> Great! This indeed revealed it. In /usr/include/locale.h (same
>> location, line 133, in both distros actually) there is #ifdef
>> __USE_GNU on CentOS version, which is #ifdef __USE_XOPEN2K8 in
>> SUSE's version. So, in fact if I define `__USE_XOPEN2K8' while
>> compiling on SUSE, it works. Hmm, go figure.. This can not be the
>> right way to do this. What am I missing?
>
> I don't know why they're different (on my glibc 2.12 system the
> uselocale definition is guarded by __USE_GNU, just like your CentOS
> system) but it looks like you've found the solution.
>
> Users are not supposed to use the __USE_XXX macros, instead you should
> define _GNU_SOURCE to enable __USE_GNU and _POSIX_C_SOURCE=200809L (or
> greater) to enable __USE_XOPEN2K8.
It looks as though you can also define _XOPEN_SOURCE=700 (or greater)
to set __USE_XOPEN2K8
Either way, you should use one of those standard feature test macros,
not the __USE_XOPEN2K8 one which is an internal implementation
details, see man feature_test_macros for more details.
next prev parent reply other threads:[~2011-01-20 20:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 0:39 Nick Stokes
2011-01-19 0:57 ` Ian Lance Taylor
2011-01-19 1:14 ` Jonathan Wakely
2011-01-19 1:17 ` Jonathan Wakely
2011-01-19 23:27 ` Nick Stokes
2011-01-20 0:47 ` Jonathan Wakely
2011-01-20 15:53 ` Nick Stokes
2011-01-20 16:40 ` Jonathan Wakely
2011-01-20 19:29 ` Nick Stokes
2011-01-20 19:58 ` Jonathan Wakely
2011-01-20 20:01 ` Jonathan Wakely [this message]
2011-01-21 0:57 ` Nick Stokes
2011-01-21 2:03 ` Nick Stokes
2011-01-21 9:16 ` Jonathan Wakely
2011-01-21 14:35 ` Nick Stokes
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=AANLkTikdxEOtUNtRwO0m-yFhU4Ji53Z+9oRPs18mn1WD@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=randomaccessiterator@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).