diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-12 22:33:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-12 22:33:22 +0000 |
commit | 2067577c713671471ec03c52425625d69a19d1b4 (patch) | |
tree | c775b263f40a8f0df5dd225780d8124a04bd1614 /posix | |
parent | 7437cbd1129b948de2c22c5d0cb853777ba6631e (diff) | |
download | glibc-2067577c713671471ec03c52425625d69a19d1b4.zip glibc-2067577c713671471ec03c52425625d69a19d1b4.tar.gz glibc-2067577c713671471ec03c52425625d69a19d1b4.tar.bz2 |
Update.
* sysdeps/generic/bits/confname.h: Define _CS_GNU_LIBC_VERSION and
_CS_GNU_LIBPTHREAD_VERSION.
* posix/conststr.c: Handle these new values.
* posix/getconf.c: Likewise.
* io/ftw.c (ftw_startup): When using FTW_CHDIR, always remember
Diffstat (limited to 'posix')
-rw-r--r-- | posix/confstr.c | 18 | ||||
-rw-r--r-- | posix/getconf.c | 6 |
2 files changed, 23 insertions, 1 deletions
diff --git a/posix/confstr.c b/posix/confstr.c index fe5f38c..bc3c8b8 100644 --- a/posix/confstr.c +++ b/posix/confstr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,96,97,2000,01,02 Free Software Foundation, Inc. +/* Copyright (C) 1991,96,97,2000-2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include <unistd.h> #include <string.h> #include <confstr.h> +#include "../version.h" /* If BUF is not NULL and LEN > 0, fill in at most LEN - 1 bytes of BUF with the value corresponding to NAME and zero-terminate BUF. @@ -140,6 +141,21 @@ confstr (name, buf, len) string_len = 1; break; + case _CS_GNU_LIBC_VERSION: + string = "glibc " VERSION; + string_len = strlen (string); + + case _CS_GNU_LIBPTHREAD_VERSION: +#ifdef LIBPTHREAD_VERSION + string = LIBPTHREAD_VERSION; + string_len = strlen (string); + break; +#else + /* No thread library. */ + __set_errno (EINVAL); + return 0; +#endif + default: __set_errno (EINVAL); return 0; diff --git a/posix/getconf.c b/posix/getconf.c index 69b785c..e687225 100644 --- a/posix/getconf.c +++ b/posix/getconf.c @@ -859,6 +859,12 @@ static const struct conf vars[] = #ifdef _PC_SYMLINK_MAX { "SYMLINK_MAX", _PC_SYMLINK_MAX, PATHCONF }, #endif +#ifdef _CS_GNU_LIBC_VERSION + { "GNU_LIBC_VERSION", _CS_GNU_LIBC_VERSION, CONFSTR }, +#endif +#ifdef _CS_GNU_LIBPTHREAD_VERSION + { "GNU_LIBPTHREAD_VERSION", _CS_GNU_LIBPTHREAD_VERSION, CONFSTR }, +#endif { NULL, 0, SYSCONF } }; |