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

Re: LSB-os 1.0.2.1 beta



"Rajit K. Sarkar" <rksarkar@yahoo.com> writes:

> + echo Attempting to determine version of glibc on the
> system:
> Attempting to determine version of glibc on the system:
> ++ ls -1 '/lib/libc-*'
> ++ cut -f2 -d-
> ++ cut -f2 -d.
> + MINOR_LIBC_VERSION=
> + '[' -z ']'
> + echo '** WARNING: Library name is not versioned. Assuming
> glibc 2.2 **'
> ** WARNING: Library name is not versioned. Assuming glibc
> 2.2 **
> + MINOR_LIBC_VERSION=2
> + MINOR_LIBC_VERSION=2
> + '[' 2 -eq 2 ']'
> + echo Appears to be a glibc 2.2
> Appears to be a glibc 2.2

That test is pretty bogus.  There're better alternatives, I propose to
use the following small program:

#include <gnu/libc-version.h>
#include <stdio.h>

int
main (void)
{
  printf ("GNU libc version: %s\n", gnu_get_libc_version());
  return 0;
}

It prints on one of my systems:
$ ./a.out 
GNU libc version: 2.2.2

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



Reply to: