On Mon, 16 Jun 2003, Clinton A. Pierce wrote:

>       loadlib P1, "/lib/libc.so.6"
>       dlfunc P0, P1, "system", "it"
>       set I0, 1
>       set S5, "ls"
>       invoke
>       end
>
> (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?

Not that I know of.  You can get perl5's guess by looking at
$Config{libc}, but that value could be empty or wrong. If you want to be
either amused or amazed, you can look at the complex gyrations perl5's
Configure tries to go through to find the C library, but even that isn't
always right. Further, perl5's Configure only looks for the libc name if
it is necessary.  Often, it is sufficient (for Configure's purpose) to let
the compiler find the C library.  As one example, it's conceivable that
the compiler might use the C library in either /lib32/ for /lib64/,
depending on compiler flags and environment variables.

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to