public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: libc-ports@sourceware.org,
	       "Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: Avoid endian.h include in MIPS string functions
Date: Sat, 19 May 2012 18:33:00 -0000	[thread overview]
Message-ID: <alpine.LFD.2.00.1205191919000.3701@eddie.linux-mips.org> (raw)
In-Reply-To: <201205060229.55306.vapier@gentoo.org>

On Sun, 6 May 2012, Mike Frysinger wrote:

> On Sunday 06 May 2012 01:55:04 Maciej W. Rozycki wrote:
> > On Thu, 26 Apr 2012, Joseph S. Myers wrote:
> > > Similar to a recent SH libc change, I've applied this patch to avoid MIPS
> > > string .S functions including <endian.h> and getting errors from C source
> > > code from that header.
> > 
> >  Hmm, <endian.h> is a user header and I could imagine software to rely on
> > it even in handcoded assembly.  And it used to work just fine.  Are you
> > sure the problematic stuff in <endian.h> or pulled by it shouldn't be
> > wrapped into:
> > 
> > #ifndef __ASSEMBLER__
> > 
> > or suchlike instead?
> 
> a patch was posted to do that, but no one responded :/
> 
> http://sourceware.org/ml/libc-alpha/2012-04/msg01141.html

 So I've had a more thorough look into it and it seems the breakage is 
inherited from BSD compatibility and <endian.h> is still usable from 
assembly sources unless __USE_BSD is in effect -- i.e. _BSD_SOURCE or 
_GNU_SOURCE, etc. -- and we build with _GNU_SOURCE so we are hit by this 
problem.  I find it odd that defining _GNU_SOURCE regresses functionality, 
but given the maintainers do not bother, I guess it'll have to stay.

 __ASSEMBLER__ is a standard GCC's cpp macro, even documented in the cpp 
manual, and I don't think our library supports any non-GCC systems these 
days anymore, so I don't really get what might be wrong with using that to 
guard headers.

  Maciej

      reply	other threads:[~2012-05-19 18:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 19:25 Joseph S. Myers
2012-04-28 10:42 ` Joseph S. Myers
2012-05-06  5:55 ` Maciej W. Rozycki
2012-05-06  6:28   ` Mike Frysinger
2012-05-19 18:33     ` Maciej W. Rozycki [this message]

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=alpine.LFD.2.00.1205191919000.3701@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    --cc=vapier@gentoo.org \
    /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).