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: preprocessor definition identifying Mac OS X version



> > Is there somewhere (presumably among the headers in /usr/include) a
> > preprocessor definition I can use to know what version of Mac OS X
> > some C source code is being compiled on ?
> >
> > Thanks,
> > Aurelien

Hi,

You could run 'uname -r -s' and save the result to a header file, like:

echo #define OS \"`uname -r -s`\" > os.h

There's always the autoconf option, but this is quick and simple.

David Fang

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

This email sent to email@hidden

References: 
 >Re: preprocessor definition identifying Mac OS X version (From: Tommy Nordgren <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.