• 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
Re: build numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build numbers


  • Subject: Re: build numbers
  • From: J Nozzi <email@hidden>
  • Date: Thu, 16 Sep 2004 09:55:46 -0400


Wow, great detail, thanks. Gives a good background on it.

 - J


On Sep 16, 2004, at 9:42 AM, M. Uli Kusterer wrote:

At 8:20 Uhr -0400 16.09.2004, J Nozzi wrote:
On Sep 16, 2004, at 8:03 AM, M. Uli Kusterer wrote:

__DATE__ and __TIME__ are official preprocessor macros.

On that note, where might one find documentation that provides a list of useful preprocessor macros like these? I've only recently begun making use of this (and don't know why I didn't start sooner) and it'd be nice to have a good cheat sheet of pre-defined macros.

Depends. These two (and __FILE__ and __LINE__) are part of the ANSI/ISO C standard, so you'll find them in any good C reference. And even my not really good C/C++ quick reference includes them. If you have K&R (2nd Ed., Prentice Hall), they're all listed on page 233.


For others, you'll want to check the compiler docs. E.g. CodeWarrior defines a constant named something like __MWERKS__ that lets you detect whether you're being compiled with CodeWarrior.

Another good source if you don't mind reading code is /usr/include/TargetConditionals.h -- it contains code that checks for all sorts of compiler features by different compilers. But note that this is a Mac-specific header. Part of this used to be in <ConditionalMacros.h> under MacOS 9, and <TargetConditionals.h> is a Carbon-specific MacOS X header, AFAIK. (Note: I just checked, and it looks like Apple finally stripped all the other compilers from this file -- so it's not really that interesting anymore)

A quick google for "builtin macro" or "predefined macro" also brings up some nice things:

http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/cpp/ Common-Predefined-Macros.html
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

_______________________________________________ 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
References: 
 >build numbers (From: Christian Schneider <email@hidden>)
 >Re: build numbers (From: Steve Checkoway <email@hidden>)
 >Re: build numbers (From: Christian Schneider <email@hidden>)
 >Re: build numbers (From: "M. Uli Kusterer" <email@hidden>)
 >Re: build numbers (From: J Nozzi <email@hidden>)
 >Re: build numbers (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: build numbers
  • Next by Date: Re: preference problem
  • Previous by thread: Re: build numbers
  • Next by thread: Re: build numbers
  • Index(es):
    • Date
    • Thread