• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
GCC 4.0 GetKeys() and BigEndianLong for Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 4.0 GetKeys() and BigEndianLong for Intel


  • Subject: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • From: "MacArthur, Ian (SELEX) (UK)" <email@hidden>
  • Date: Thu, 16 Jun 2005 09:48:59 +0100
  • Thread-topic: Xcode-users Digest, Vol 2, Issue 281

>
> Sorry I wasn't clear enough there.  BigEndianLong is a long on
> PowerPC and a struct on Intel.  Here's the Intel definition, from
> Endian.h:
>
> struct BigEndianLong {
>    long                bigEndianValue;
> };
> typedef struct BigEndianLong            BigEndianLong;
>
> So you want to swap theKeys[1].bigEndianValue on little-endian
> systems, not theKeys[1].


Ouch!
I guess it's way to late to get it changed now, but that strikes me as exactly the sort of thing that will be a pain.
There's no real reason *why* it has to be a struct rather than just a long, I guess, but it forces us to use target specific code and to know the detail of the underlying implementation. Seems a shame. If it was just a long, we could simply call htonl()  (for example) and get the Right Thing on *any* architecture.
Oh well.

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
      • From: Eric Albert <email@hidden>
    • Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
      • From: Jonas Maebe <email@hidden>
  • Prev by Date: CopyCStringToPascal
  • Next by Date: Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • Previous by thread: Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • Next by thread: Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • Index(es):
    • Date
    • Thread