• 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: determine whether an ancillary program/task can run
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determine whether an ancillary program/task can run


  • Subject: Re: determine whether an ancillary program/task can run
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Fri, 02 Sep 2011 07:44:58 -0300

On 02/09/2011, at 00:13, Ken Thomases wrote:

> On Sep 1, 2011, at 6:42 PM, Rainer Brockerhoff wrote:
>
>> On 01/09/2011, at 20:17, email@hidden wrote:
>>> From: Martin Wierschin <email@hidden>
>>> Date: 1 de setembro de 2011 19:11:24 BRT
>>> To: Dave DeLong <email@hidden>
>>> Cc: Cocoa Dev List <email@hidden>
>>>
>>> Offhand does anyone know how to inspect the architecture(s) of a plain executable file? I've been googling for a little bit and haven't hit upon anything that works yet.
>>
>> Sure, that's easy to do. Define a C function like this:
>>
>> #include <mach-o/fat.h>
>> char* FindMachoHeader(char* input, cpu_type_t cpu) {
>> ...
> You might be interested in the functions listed in the arch(3) man page.
> http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/arch.3.html

Right, the arch(3) function would do for the OP. For my special case, I didn't use them when I wrote that function because I wanted to do further processing on the executable, not just check if the architecture was there.

--
Rainer Brockerhoff  <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/blog

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: determine whether an ancillary program/task can run (From: Rainer Brockerhoff <email@hidden>)
 >Re: determine whether an ancillary program/task can run (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: NSScrollView animation (animate scroll point)
  • Next by Date: Re: Core Data Xcode 4 question
  • Previous by thread: Re: determine whether an ancillary program/task can run
  • Next by thread: Replacement for MethodReplacement?
  • Index(es):
    • Date
    • Thread