• 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: How to get the Mac OS X version?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the Mac OS X version?


  • Subject: Re: How to get the Mac OS X version?
  • From: Rosyna <email@hidden>
  • Date: Sat, 8 Sep 2001 07:12:29 -0700

sw_vers outputs the information all nice and pretty in the terminal. If you don't care about the build number, you can use Carbon's gestalt.

SInt32 vers;
Gestalt(gestaltSystemVersion,&vers);
if (vers >= 0x00001010)
// do stuff

the above version is 10.1. 10.0.4 is 0x00001004

Ack, at 1/1/70, steg said:

How to get the version of the system? any idea?

--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insane People


  • Follow-Ups:
    • Re: How to get the Mac OS X version?
      • From: Finlay Dobbie <email@hidden>
  • Prev by Date: Re: Locking Files?
  • Next by Date: Re: Mac OS X 10.1 File Name Extension Guidelines
  • Previous by thread: Re: How to get the Mac OS X version?
  • Next by thread: Re: How to get the Mac OS X version?
  • Index(es):
    • Date
    • Thread