Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 12 Feb 2003 22:33:22 +0000 (22:33 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 12 Feb 2003 22:33:22 +0000 (22:33 +0000)
* 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

ChangeLog
bits/confname.h
linuxthreads/ChangeLog
linuxthreads/sysdeps/pthread/Makefile
nptl/ChangeLog
nptl/sysdeps/pthread/Makefile
posix/confstr.c
posix/getconf.c
sysdeps/generic/bits/confname.h

index b719c35..14ef6e5 100644 (file)
--- 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.
 
index 6cb5b3f..fe26298 100644 (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
index 7a6047a..dd1a1c2 100644 (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
index a0d3315..6b92fbf 100644 (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
index ef1a4fe..182d66b 100644 (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.
index fade787..17f18cb 100644 (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
index fe5f38c..bc3c8b8 100644 (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;
index 69b785c..e687225 100644 (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 }
   };
index 6cb5b3f..fe26298 100644 (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