> # c library 5
> - if ( -e "/lib/libc.so.5" ) {
> - ( $v_libc5 = `/lib/libc.so.5`) =~ m/GNU C Library .+ version (\S+),/;
> - $v_libc5 = $1;
> - } else {
> - $v_libc5 = "not found";
> + opendir LIBDIR, "/lib" or die "/lib/ not found, very strange";
> + my @allfiles = readdir LIBDIR;
> + closedir LIBDIR;
> + $v_libc5 = 'not found';
> + foreach (sort @allfiles) {
> + m/libc.so.(5\S+)/ and $v_libc5 = $1;
> }
> + closedir LIBDIR;
This won't work everywhere either. Red Hat systems (maybe others)
have libc5 out of the way in a separate subdir. Your best bet is to
use ldconfig:
/sbin/ldconfig -p|grep libc.so.5
which produces something like
libc.so.5 (libc5) => /usr/i486-linux-libc5/lib/libc.so.5
and then look in that directory (/usr/i486-linux-libc5/lib).
-- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/