aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-12 22:33:22 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-12 22:33:22 +0000
commit2067577c713671471ec03c52425625d69a19d1b4 (patch)
treec775b263f40a8f0df5dd225780d8124a04bd1614
parent7437cbd1129b948de2c22c5d0cb853777ba6631e (diff)
downloadglibc-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
-rw-r--r--ChangeLog7
-rw-r--r--bits/confname.h7
-rw-r--r--linuxthreads/ChangeLog4
-rw-r--r--linuxthreads/sysdeps/pthread/Makefile4
-rw-r--r--nptl/ChangeLog4
-rw-r--r--nptl/sysdeps/pthread/Makefile6
-rw-r--r--posix/confstr.c18
-rw-r--r--posix/getconf.c6
-rw-r--r--sysdeps/generic/bits/confname.h7
9 files changed, 58 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b719c35..14ef6e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/bits/confname.h b/bits/confname.h
index 6cb5b3f..fe26298 100644
--- a/bits/confname.h
+++ b/bits/confname.h
@@ -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
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 7a6047a..dd1a1c2 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -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
diff --git a/linuxthreads/sysdeps/pthread/Makefile b/linuxthreads/sysdeps/pthread/Makefile
index a0d3315..6b92fbf 100644
--- a/linuxthreads/sysdeps/pthread/Makefile
+++ b/linuxthreads/sysdeps/pthread/Makefile
@@ -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
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index ef1a4fe..182d66b 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -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.
diff --git a/nptl/sysdeps/pthread/Makefile b/nptl/sysdeps/pthread/Makefile
index fade787..17f18cb 100644
--- a/nptl/sysdeps/pthread/Makefile
+++ b/nptl/sysdeps/pthread/Makefile
@@ -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
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 }
};
diff --git a/sysdeps/generic/bits/confname.h b/sysdeps/generic/bits/confname.h
index 6cb5b3f..fe26298 100644
--- a/sysdeps/generic/bits/confname.h
+++ b/sysdeps/generic/bits/confname.h
@@ -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