Re: glibc and getgrouplist



Pavel Tsekov wrote:
Hello,

On Thu, 21 Jul 2005, Leonard den Ottolander wrote:


How does one test for the availability of glibc in configure.ac, and for
glibc's version next?


Please, don't do this. The check should be made at runtime and not
configure time. Andrew's approach seems better to me. And it is not only
2.3.2 - also other versions are affected:

What about this?

#ifndef HAVE_GNU_GET_LIBC_VERSION
#  define may_use_getgrouplist() (TRUE)
#else
#  include <gnu/libc-version.h>
#  define may_use_getgrouplist() \
        (strcmp(gnu_get_libc_version(), "2.3.3") > 0)
#endif

Roland



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