bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Relocatable packages, once again


From: Paolo Bonzini
Subject: Re: Relocatable packages, once again
Date: Wed, 11 Feb 2009 16:38:27 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

>> For programs' resources instead the resources should be found in a path
>> related to the program's path.  You can also use the relocatable.c file
>> here.  In general, this part is easier to do since most platforms
>> including Mac OS X have a way to find the executable.
>>
> _NSGetExecutable returned garbage last time I used it, so I'd favour the
> same method as for libraries: libdl.

On Tiger I get:

        (gdb) p (char *) malloc(256)
        $1 = 0x4009a0 ""
        (gdb) p (int *) malloc(4)
        $2 = (int *) 0x400aa0
        (gdb) set *$2 = 256
        (gdb) p (int) _NSGetExecutablePath ($1, $2)
        $3 = 0
        (gdb) p $1
        $4 = 0x4009a0 "/sw/bin/ls"

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]