public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Damien Zammit <damien@zamaudio.com>
Cc: libc-alpha <libc-alpha@sourceware.org>
Subject: Re: Host endian independence
Date: Tue, 27 Aug 2019 15:54:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.21.1908271544290.18629@digraph.polyomino.org.uk> (raw)
In-Reply-To: <18c8a820-b2c4-8ab2-58d1-8d8c851dbf01@zamaudio.com>

On Sat, 24 Aug 2019, Damien Zammit wrote:

> Please see attached patches for proof of concept, which remove
> dependence on BYTE_ORDER for two subfolders of glibc.

I don't think these changes are appropriate.

I think we should make more use of the *existing* byte-swap interfaces, 
such as be32toh and be64toh in <endian.h>, rather than inventing new ones.  
By using those interfaces, tzfile.c, for example, could lose some of its 
existing endian checks (that would be a very small local change to the 
implementations of the decode and decode64 functions, larger changes are 
not needed and make the code less clean because the logical information 
that certain data is stored in the files in big-endian format is best kept 
local to the implementations of those two functions, rather than 
hardcoding that information in lots of places with read_be32 and read_be64 
names).  (I'm not convinced that any changes in this area beyond very 
minimal use of bswap_32 would improve the catgets code.)

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2019-08-27 15:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-24  4:14 Damien Zammit
2019-08-27 15:54 ` Joseph Myers [this message]
2019-08-29  4:45   ` Damien Zammit
2019-08-29 16:43     ` Joseph Myers
2019-08-30  9:16     ` Yann Droneaud
2019-08-30 10:19   ` Florian Weimer
2019-08-30 16:22     ` Joseph Myers
2019-09-01  9:26       ` Damien Zammit
2019-09-02  7:12         ` Florian Weimer
2019-09-02  7:14       ` Florian Weimer

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.DEB.2.21.1908271544290.18629@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=damien@zamaudio.com \
    --cc=libc-alpha@sourceware.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).