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

long Tigers


  • Subject: long Tigers
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 13 May 2005 12:17:03 +0200

Tiger has cleaned up some definitions. This is a good thing. But it confuses my compilers.

E.g. in /usr/include/mach-o/loader.h
Panther:
struct mach_header {
	unsigned long	magic;
... }

Tiger:
struct mach_header {
	uint32_t	magic;
... }

When I have:
fprintf( stderr, "magic %#x\n", __FUNCTION__, head1->magic);
the Panther compiler rightly complains: "unsigned int format, long unsinged int arg".


And when I switch to "%#lx" the Tiger compiler says: "format "%#lx expects 'long unsigned int' but argument has type 'uint32_t'"

What is the clever way to make it compile both on Panther and Tiger without switching the warning off? And preferably without hundreds of #ifdefs.

(By the way: what kind of #ifdef could I use? #ifdef TIGER probably does not work).


Kind regards,

Gerriet.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: long Tigers
      • From: Clark Cox <email@hidden>
    • Re: long Tigers
      • From: j o a r <email@hidden>
  • Prev by Date: Re: recvmsg() in Tiger
  • Next by Date: Re: NSPopupButton in NSTableView column header
  • Previous by thread: Re: NSDeleteCharacter when expected NSBackspaceCharacter
  • Next by thread: Re: long Tigers
  • Index(es):
    • Date
    • Thread