[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r11306 - in /branches/eglibc-2_12: libc/ libc/sysdeps/i386/i686/multiarch/ libc/sysdeps/unix/sysv/linux/ ports/ ports/sysdep...
- To: commits@xxxxxxxxxx
- Subject: [commits] r11306 - in /branches/eglibc-2_12: libc/ libc/sysdeps/i386/i686/multiarch/ libc/sysdeps/unix/sysv/linux/ ports/ ports/sysdep...
- From: joseph@xxxxxxxxxx
- Date: Thu, 19 Aug 2010 20:34:23 -0000
Author: joseph
Date: Thu Aug 19 13:34:22 2010
New Revision: 11306
Log:
Merge changes between r11186 and r11305 from /fsf/glibc-2_12-branch.
Modified:
branches/eglibc-2_12/libc/ChangeLog
branches/eglibc-2_12/libc/sysdeps/i386/i686/multiarch/strspn.S
branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin.c
branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin_r.c
branches/eglibc-2_12/ports/ChangeLog.mips
branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n32/sysdep.h
branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n64/sysdep.h
branches/eglibc-2_12/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
Modified: branches/eglibc-2_12/libc/ChangeLog
==============================================================================
--- branches/eglibc-2_12/libc/ChangeLog (original)
+++ branches/eglibc-2_12/libc/ChangeLog Thu Aug 19 13:34:22 2010
@@ -1,3 +1,26 @@
+2010-08-19 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/strspn.S [!SHARED]: Fix SSE4.2 check.
+
+2010-08-06 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
+ Also fail if tpwd after pwuid call is NULL.
+
+2010-06-21 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
+ Restore proper fallback handling.
+
+2010-06-19 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): Handle
+ OOM in getpwuid_r correctly. Return error number when the caller
+ should return, otherwise -1.
+ (getlogin_r): Adjust to return also for result of __getlogin_r_loginuid
+ call returning > 0 value.
+ * sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
+
2010-07-27 Andreas Schwab <schwab@xxxxxxxxxx>
* version.h (VERSION): Bump for 2.12.1 release.
Modified: branches/eglibc-2_12/libc/sysdeps/i386/i686/multiarch/strspn.S
==============================================================================
--- branches/eglibc-2_12/libc/sysdeps/i386/i686/multiarch/strspn.S (original)
+++ branches/eglibc-2_12/libc/sysdeps/i386/i686/multiarch/strspn.S Thu Aug 19 13:34:22 2010
@@ -1,5 +1,5 @@
/* Multiple versions of strspn
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009,2010 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -65,7 +65,7 @@
jne 1f
call __init_cpu_features
1: leal __strspn_ia32, %eax
- testl $index_SSE2, CPUID_OFFSET+index_SSE4_2+__cpu_features
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
jz 2f
leal __strspn_sse42, %eax
2: ret
Modified: branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin.c
==============================================================================
--- branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin.c (original)
+++ branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin.c Thu Aug 19 13:34:22 2010
@@ -32,8 +32,9 @@
char *
getlogin (void)
{
- if (__getlogin_r_loginuid (name, sizeof (name)) == 0)
- return name;
+ int res = __getlogin_r_loginuid (name, sizeof (name));
+ if (res >= 0)
+ return res == 0 ? name : NULL;
return getlogin_fd0 ();
}
Modified: branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin_r.c
==============================================================================
--- branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin_r.c (original)
+++ branches/eglibc-2_12/libc/sysdeps/unix/sysv/linux/getlogin_r.c Thu Aug 19 13:34:22 2010
@@ -27,6 +27,10 @@
#undef getlogin_r
+/* Try to determine login name from /proc/self/loginuid and return 0
+ if successful. If /proc/self/loginuid cannot be read return -1.
+ Otherwise return the error number. */
+
int
attribute_hidden
__getlogin_r_loginuid (name, namesize)
@@ -35,7 +39,7 @@
{
int fd = open_not_cancel_2 ("/proc/self/loginuid", O_RDONLY);
if (fd == -1)
- return 1;
+ return -1;
/* We are reading a 32-bit number. 12 bytes are enough for the text
representation. If not, something is wrong. */
@@ -51,37 +55,38 @@
|| (uidbuf[n] = '\0',
uid = strtoul (uidbuf, &endp, 10),
endp == uidbuf || *endp != '\0'))
- return 1;
+ return -1;
size_t buflen = 1024;
char *buf = alloca (buflen);
bool use_malloc = false;
struct passwd pwd;
struct passwd *tpwd;
+ int result = 0;
int res;
- while ((res = __getpwuid_r (uid, &pwd, buf, buflen, &tpwd)) != 0)
+ while ((res = __getpwuid_r (uid, &pwd, buf, buflen, &tpwd)) == ERANGE)
if (__libc_use_alloca (2 * buflen))
- extend_alloca (buf, buflen, 2 * buflen);
+ buf = extend_alloca (buf, buflen, 2 * buflen);
else
{
buflen *= 2;
char *newp = realloc (use_malloc ? buf : NULL, buflen);
if (newp == NULL)
{
- fail:
- if (use_malloc)
- free (buf);
- return 1;
+ result = ENOMEM;
+ goto out;
}
buf = newp;
use_malloc = true;
}
- if (tpwd == NULL)
- goto fail;
+ if (res != 0 || tpwd == NULL)
+ {
+ result = -1;
+ goto out;
+ }
- int result = 0;
size_t needed = strlen (pwd.pw_name) + 1;
if (needed > namesize)
{
@@ -109,8 +114,9 @@
char *name;
size_t namesize;
{
- if (__getlogin_r_loginuid (name, namesize) == 0)
- return 0;
+ int res = __getlogin_r_loginuid (name, namesize);
+ if (res >= 0)
+ return res;
return getlogin_r_fd0 (name, namesize);
}
Modified: branches/eglibc-2_12/ports/ChangeLog.mips
==============================================================================
--- branches/eglibc-2_12/ports/ChangeLog.mips (original)
+++ branches/eglibc-2_12/ports/ChangeLog.mips Thu Aug 19 13:34:22 2010
@@ -1,3 +1,14 @@
+2010-08-13 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
+ (__ASSUME_GETDENTS64_SYSCALL): Undefine for n32 ABI before 2.6.35.
+
+2010-08-13 Chandrakala Chavva <cchavva@xxxxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Add 'nop' in
+ jump delay slot.
+ * sysdeps/unix/mips/mips64/n32/sysdep.h (PSEUDO): Ditto.
+
2010-05-21 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c,
Modified: branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n32/sysdep.h
==============================================================================
--- branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n32/sysdep.h (original)
+++ branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n32/sysdep.h Thu Aug 19 13:34:22 2010
@@ -45,6 +45,7 @@
.set noreorder; \
.align 2; \
99: j __syscall_error; \
+ nop; \
ENTRY(name) \
.set noreorder; \
li v0, SYS_ify(syscall_name); \
Modified: branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n64/sysdep.h
==============================================================================
--- branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n64/sysdep.h (original)
+++ branches/eglibc-2_12/ports/sysdeps/unix/mips/mips64/n64/sysdep.h Thu Aug 19 13:34:22 2010
@@ -45,6 +45,7 @@
.set noreorder; \
.align 2; \
99: j __syscall_error; \
+ nop; \
ENTRY(name) \
.set noreorder; \
li v0, SYS_ify(syscall_name); \
Modified: branches/eglibc-2_12/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
==============================================================================
--- branches/eglibc-2_12/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h (original)
+++ branches/eglibc-2_12/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h Thu Aug 19 13:34:22 2010
@@ -38,3 +38,9 @@
#endif
#include_next <kernel-features.h>
+
+/* The n32 syscall ABI did not have a getdents64 syscall until
+ 2.6.35. */
+#if _MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623
+# undef __ASSUME_GETDENTS64_SYSCALL
+#endif