On Fri, 20 Jun 2003, Jens Rieks wrote:

> > (Which in itself tickles and scares the bejesus out of me.)  Is there a
> > good way of finding the standard C library on a Unix system other than
> > hard-wiring it in like this?
> Yes. Parrot is linked with the standard C library. You can get a handle for
> the own executable by passing a NULL pointer to dlopen. You can also use this
> handle to call libc functions.

Ahh, clever.  That's likely to work for systems which use the dlopen()
dynamic loading interface.  I don't know if it will also work on HP-UX,
AIX, and Mac, though there's likely some equivalent trick.  (Similarly,
non-Unix systems such as Win32, VMS, and OS/2 will need some
platform-specific trick, though I realize the original query was limited
to Unix systems.)

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to