• 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
NS_BUILD_32_LIKE_64
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NS_BUILD_32_LIKE_64


  • Subject: NS_BUILD_32_LIKE_64
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 11 Jun 2011 14:54:39 +0700

When I define NS_BUILD_32_LIKE_64=1 I can simply write:

NSUInteger u = 12;
NSLog(@"u = %lu", u );

Otherwise I would need to use a cast like:
NSLog(@"u = %lu", (unsigned long)u );

or even more clumsy:

#if __LP64__
	NSLog(@"u = %lu", u );
#else
	NSLog(@"u = %u", u );
#endif

The 64-Bit Transition Guide for Cocoa just says:
"The NS_BUILD_32_LIKE_64 macro is useful when binary compatibility is not a concern, such as when building an application."

So: why is this NS_BUILD_32_LIKE_64 not always defined (as default) and what binary compatibility issues I have to be aware of?


Kind regards,

Gerriet.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NS_BUILD_32_LIKE_64
      • From: Quincey Morris <email@hidden>
    • Re: NS_BUILD_32_LIKE_64
      • From: Lee Ann Rucker <email@hidden>
  • Prev by Date: Printing graphics plus text
  • Next by Date: Re: NS_BUILD_32_LIKE_64
  • Previous by thread: Re: Printing graphics plus text
  • Next by thread: Re: NS_BUILD_32_LIKE_64
  • Index(es):
    • Date
    • Thread