[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8115 - in /fsf/trunk/libc: ./ dirent/ include/ nscd/ sysdeps/unix/sysv/linux/i386/
- To: commits@xxxxxxxxxx
- Subject: [commits] r8115 - in /fsf/trunk/libc: ./ dirent/ include/ nscd/ sysdeps/unix/sysv/linux/i386/
- From: eglibc@xxxxxxxxxx
- Date: Tue, 17 Mar 2009 07:02:31 -0000
Author: eglibc
Date: Tue Mar 17 00:02:30 2009
New Revision: 8115
Log:
Import glibc-mainline for 2009-03-17
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/dirent/scandir64.c
fsf/trunk/libc/include/dirent.h
fsf/trunk/libc/nscd/connections.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/alphasort64.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/olddirent.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/versionsort64.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Mar 17 00:02:30 2009
@@ -1,3 +1,21 @@
+2009-03-16 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * include/dirent.h: Yet more changes to match sort function type
+ change.
+ * sysdeps/unix/sysv/linux/i386/alphasort64.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/olddirent.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/versionsort64.c: Likewise.
+
+2009-03-16 Thomas Schwinge <tschwinge@xxxxxxx>
+
+ * dirent/scandir64.c (scandir64): Adjust declaration to type change.
+
+2009-03-16 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * nscd/connections.c (restart): Try to preserve the process name
+ by reading the /proc/self/exe symlink and using the return name.
+ Patch by Jeff Bastian <jbastian@xxxxxxxxxx>.
+
2009-03-15 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #9733]
Modified: fsf/trunk/libc/dirent/scandir64.c
==============================================================================
--- fsf/trunk/libc/dirent/scandir64.c (original)
+++ fsf/trunk/libc/dirent/scandir64.c Tue Mar 17 00:02:30 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009 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
@@ -25,6 +25,7 @@
int scandir64 (__const char *__restrict __dir,
struct dirent64 ***__restrict __namelist,
int (*__selector) (__const struct dirent64 *),
- int (*__cmp) (__const void *, __const void *));
+ int (*__cmp) (__const struct dirent64 **,
+ __const struct dirent64 **));
#include <dirent/scandir.c>
Modified: fsf/trunk/libc/include/dirent.h
==============================================================================
--- fsf/trunk/libc/include/dirent.h (original)
+++ fsf/trunk/libc/include/dirent.h Tue Mar 17 00:02:30 2009
@@ -17,14 +17,16 @@
extern int __scandir64 (__const char * __dir,
struct dirent64 *** __namelist,
int (*__selector) (__const struct dirent64 *),
- int (*__cmp) (__const void *, __const void *));
+ int (*__cmp) (__const struct dirent64 **,
+ __const struct dirent64 **));
extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes)
internal_function;
extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes)
internal_function;
-extern int __alphasort64 (const void *a, const void *b)
+extern int __alphasort64 (const struct dirent64 **a, const struct dirent64 **b)
__attribute_pure__;
-extern int __versionsort64 (const void *a, const void *b)
+extern int __versionsort64 (const struct dirent64 **a,
+ const struct dirent64 **b)
__attribute_pure__;
extern DIR *__alloc_dir (int fd, bool close_fd, const struct stat64 *statp)
internal_function;
Modified: fsf/trunk/libc/nscd/connections.c
==============================================================================
--- fsf/trunk/libc/nscd/connections.c (original)
+++ fsf/trunk/libc/nscd/connections.c Tue Mar 17 00:02:30 2009
@@ -1418,7 +1418,22 @@
}
/* The preparations are done. */
- execv ("/proc/self/exe", argv);
+#ifdef PATH_MAX
+ char pathbuf[PATH_MAX];
+#else
+ char pathbuf[256];
+#endif
+ /* Try to exec the real nscd program so the process name (as reported
+ in /proc/PID/status) will be 'nscd', but fall back to /proc/self/exe
+ if readlink fails */
+ ssize_t n = readlink ("/proc/self/exe", pathbuf, sizeof (pathbuf) - 1);
+ if (n == -1)
+ execv ("/proc/self/exe", argv);
+ else
+ {
+ pathbuf[n] = '\0';
+ execv (pathbuf, argv);
+ }
/* If we come here, we will never be able to re-exec. */
dbg_log (_("re-exec failed: %s; disabling paranoia mode"),
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/alphasort64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/alphasort64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/alphasort64.c Tue Mar 17 00:02:30 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997,1998,2000,2004,2009 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
@@ -20,10 +20,9 @@
#include <string.h>
int
-__alphasort64 (const void *a, const void *b)
+__alphasort64 (const struct dirent64 **a, const struct dirent64 **b)
{
- return strcoll ((*(const struct dirent64 **) a)->d_name,
- (*(const struct dirent64 **) b)->d_name);
+ return strcoll ((*a)->d_name, (*b)->d_name);
}
#include <shlib-compat.h>
@@ -35,14 +34,15 @@
#include <sysdeps/unix/sysv/linux/i386/olddirent.h>
int
-__old_alphasort64 (const void *a, const void *b);
+__old_alphasort64 (const struct __old_dirent64 **a,
+ const struct __old_dirent64 **b);
int
attribute_compat_text_section
-__old_alphasort64 (const void *a, const void *b)
+__old_alphasort64 (const struct __old_dirent64 **a,
+ const struct __old_dirent64 **b)
{
- return strcoll ((*(const struct __old_dirent64 **) a)->d_name,
- (*(const struct __old_dirent64 **) b)->d_name);
+ return strcoll ((*a)->d_name, (*b)->d_name);
}
compat_symbol (libc, __old_alphasort64, alphasort64, GLIBC_2_1);
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/olddirent.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/olddirent.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/olddirent.h Tue Mar 17 00:02:30 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009 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
@@ -39,6 +39,7 @@
int __old_scandir64 (__const char * __dir,
struct __old_dirent64 *** __namelist,
int (*__selector) (__const struct __old_dirent64 *),
- int (*__cmp) (__const void *, __const void *));
+ int (*__cmp) (__const struct __old_dirent64 **,
+ __const struct __old_dirent64 **));
#endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/versionsort64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/versionsort64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/versionsort64.c Tue Mar 17 00:02:30 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1997,1998,2000,2004,2009 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
@@ -20,10 +20,9 @@
#include <string.h>
int
-__versionsort64 (const void *a, const void *b)
+__versionsort64 (const struct dirent64 **a, const struct dirent64 **b)
{
- return __strverscmp ((*(const struct dirent64 **) a)->d_name,
- (*(const struct dirent64 **) b)->d_name);
+ return __strverscmp ((*a)->d_name, (*b)->d_name);
}
#include <shlib-compat.h>
@@ -35,14 +34,15 @@
#include <sysdeps/unix/sysv/linux/i386/olddirent.h>
int
-__old_versionsort64 (const void *a, const void *b);
+__old_versionsort64 (const struct __old_dirent64 **a,
+ const struct __old_dirent64 **b);
int
attribute_compat_text_section
-__old_versionsort64 (const void *a, const void *b)
+__old_versionsort64 (const struct __old_dirent64 **a,
+ const struct __old_dirent64 **b)
{
- return __strverscmp ((*(const struct __old_dirent64 **) a)->d_name,
- (*(const struct __old_dirent64 **) b)->d_name);
+ return __strverscmp ((*a)->d_name, (*b)->d_name);
}
compat_symbol (libc, __old_versionsort64, versionsort64, GLIBC_2_1);