Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC 4.0 GetKeys() and BigEndianLong for Intel




On Jun 15, 2005, at 11:03 AM, Eric Albert wrote:

On Jun 15, 2005, at 10:29 AM, Ken Baer wrote:

Anyway, when building for little-endian systems (#if __LITTLE_ENDIAN__), you should read the BigEndianLong value, use OSSwapBigToHostInt32 or the swapping function of your choice to put its field into a regular int, and then use it the way you otherwise would.

Thanks for the quick reply.

I still have an error though.  Here's the code.

   KeyMap theKeys;
   GetKeys( theKeys );
#if (__LITTLE_ENDIAN__)
   UInt32 keys = CFSwapInt32BigToHost( theKeys[1] );
#else
   UInt32 keys = theKeys[1];
#endif

The error I get is:
error: cannot convert 'BigEndianLong' to 'uint32_t' for argument '1' to 'uint32_t CFSwapInt32BigToHost(uint32_t)'

Is there some other function I should be using for dealing with the BigEndianLong type?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >GCC 4.0 GetKeys() and BigEndianLong for Intel (From: Ken Baer <email@hidden>)
 >Re: GCC 4.0 GetKeys() and BigEndianLong for Intel (From: Eric Albert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.