* 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
This commit is contained in:
Ulrich Drepper 2003-02-12 22:33:22 +00:00
parent 7437cbd112
commit 2067577c71
9 changed files with 58 additions and 5 deletions

View file

@ -1,5 +1,10 @@
2003-02-12 Ulrich Drepper <drepper@redhat.com>
* 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.
* sysdeps/mips/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): Fix
masking of version index.
Patch by Lance Larsh <Lance.Larsh@oracle.com>.
@ -23,7 +28,7 @@
2003-02-08 Jim Meyering <jim@meyering.net>
* ftw.c (ftw_startup): When using FTW_CHDIR, always remember
* io/ftw.c (ftw_startup): When using FTW_CHDIR, always remember
the current directory, not just when DIR contains a slash.
Reported by Manoj Srivastava.

View file

@ -560,7 +560,12 @@ enum
# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
# endif
_CS_V6_WIDTH_RESTRICTED_ENVS
_CS_V6_WIDTH_RESTRICTED_ENVS,
# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
_CS_GNU_LIBC_VERSION,
#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
_CS_GNU_LIBPTHREAD_VERSION
#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
};
#endif

View file

@ -1,3 +1,7 @@
2003-02-12 Ulrich Drepper <drepper@redhat.com>
* sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
2003-02-10 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check

View file

@ -7,3 +7,7 @@ else
$(objpfx)tst-timer: $(objpfx)librt.a $(static-thread-library)
endif
endif
ifeq ($(subdir),posix)
CFLAGS-confstr.c += -DLIBPTHREAD_VERSION="\"$(shell sed 's/\(.*\) by .*/\1/' ../nptl/Banner)\""
endif

View file

@ -1,3 +1,7 @@
2003-02-12 Ulrich Drepper <drepper@redhat.com>
* sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
2003-02-10 Ulrich Drepper <drepper@redhat.com>
* Makefile (tests): Add tst-cancel8.

View file

@ -1,4 +1,4 @@
# Copyright (C) 2002 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -31,3 +31,7 @@ else
$(objpfx)tst-timer: $(objpfx)librt.a $(static-thread-library)
endif
endif
ifeq ($(subdir),posix)
CFLAGS-confstr.c += -DLIBPTHREAD_VERSION="\"$(shell sed 's/\(.*\) by .*/\1/' ../nptl/Banner)\""
endif

View file

@ -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;

View file

@ -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 }
};

View file

@ -560,7 +560,12 @@ enum
# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
# endif
_CS_V6_WIDTH_RESTRICTED_ENVS
_CS_V6_WIDTH_RESTRICTED_ENVS,
# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
_CS_GNU_LIBC_VERSION,
#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
_CS_GNU_LIBPTHREAD_VERSION
#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
};
#endif