• 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: command-line test for 64-bit hardware?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command-line test for 64-bit hardware?


  • Subject: Re: command-line test for 64-bit hardware?
  • From: Steve Checkoway <email@hidden>
  • Date: Thu, 6 Sep 2007 05:27:08 -0700


On Sep 5, 2007, at 12:32 PM, Kyle Sluder wrote:

`sysctl -n hw.optional.x86_64' will give you what you want.  Though,
since this is going to be used from a shell, you'll probably want to
wrap it in a test, because sysctl returns 0 for no and 1 for yes.

Are you saying that on intel, sysctl returns the opposite of the standard values?
steve$ sysctl -n hw.optional.x86_64
second level name optional in hw.optional.x86_64 is invalid
steve$ echo $?
1
steve$ sysctl -n hw.ncpu
2
steve$ echo $?
0


steve$ if sysctl -n hw.optional.x86_64 2>/dev/null; then echo x86_64; else echo not; fi
not


Seems like it works for me (on ppc).

--
Steve Checkoway



Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: command-line test for 64-bit hardware?
      • From: "Kyle Sluder" <email@hidden>
References: 
 >Re: command-line test for 64-bit hardware? (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: printf functions fail with non-ascii characters
  • Next by Date: Re: command-line test for 64-bit hardware
  • Previous by thread: Re: command-line test for 64-bit hardware?
  • Next by thread: Re: command-line test for 64-bit hardware?
  • Index(es):
    • Date
    • Thread