[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r1359 - in /fsf/trunk/libc: ChangeLog include/locale.h locale/uselocale.c nscd/nscd_helper.c
- To: commits@xxxxxxxxxx
- Subject: [commits] r1359 - in /fsf/trunk/libc: ChangeLog include/locale.h locale/uselocale.c nscd/nscd_helper.c
- From: eglibc@xxxxxxxxxx
- Date: Sat, 03 Feb 2007 08:01:28 -0000
Author: eglibc
Date: Sat Feb 3 00:01:28 2007
New Revision: 1359
Log:
Import glibc-mainline for 2007-02-03
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/include/locale.h
fsf/trunk/libc/locale/uselocale.c
fsf/trunk/libc/nscd/nscd_helper.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Feb 3 00:01:28 2007
@@ -1,3 +1,15 @@
+2007-02-02 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * nscd/nscd_helper.c (open_socket): Minor size optimization.
+
+2007-02-02 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * include/locale.h (__uselocale): Add libc_hidden_proto.
+ * locale/uselocale.c (__uselocale): Add libc_hidden_def.
+
+ * nscd/nscd_helper.c (open_socket): Use __gettimeofday instead of
+ gettimeofday.
+
2007-02-01 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h (PTR_MANGLE): Roll value before
Modified: fsf/trunk/libc/include/locale.h
==============================================================================
--- fsf/trunk/libc/include/locale.h (original)
+++ fsf/trunk/libc/include/locale.h Sat Feb 3 00:01:28 2007
@@ -4,6 +4,7 @@
extern __typeof (uselocale) __uselocale;
libc_hidden_proto (setlocale)
+libc_hidden_proto (__uselocale)
/* This has to be changed whenever a new locale is defined. */
#define __LC_LAST 13
Modified: fsf/trunk/libc/locale/uselocale.c
==============================================================================
--- fsf/trunk/libc/locale/uselocale.c (original)
+++ fsf/trunk/libc/locale/uselocale.c Sat Feb 3 00:01:28 2007
@@ -1,5 +1,5 @@
/* uselocale -- fetch and set the current per-thread locale
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2007 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
@@ -70,4 +70,5 @@
return oldloc == &_nl_global_locale ? LC_GLOBAL_LOCALE : oldloc;
}
+libc_hidden_def (__uselocale)
weak_alias (__uselocale, uselocale)
Modified: fsf/trunk/libc/nscd/nscd_helper.c
==============================================================================
--- fsf/trunk/libc/nscd/nscd_helper.c (original)
+++ fsf/trunk/libc/nscd/nscd_helper.c Sat Feb 3 00:01:28 2007
@@ -127,6 +127,8 @@
bool first_try = true;
struct timeval tvend;
+ /* Fake initializing tvend. */
+ asm ("" : "=m" (tvend));
while (1)
{
#ifndef MSG_NOSIGNAL
@@ -145,20 +147,18 @@
/* The daemon is busy wait for it. */
int to;
+ struct timeval now;
+ (void) __gettimeofday (&now, NULL);
if (first_try)
{
- gettimeofday (&tvend, NULL);
- tvend.tv_sec += 5;
+ tvend.tv_usec = now.tv_usec;
+ tvend.tv_sec = now.tv_sec + 5;
to = 5 * 1000;
first_try = false;
}
else
- {
- struct timeval now;
- gettimeofday (&now, NULL);
- to = ((tvend.tv_sec - now.tv_sec) * 1000
- + (tvend.tv_usec - now.tv_usec) / 1000);
- }
+ to = ((tvend.tv_sec - now.tv_sec) * 1000
+ + (tvend.tv_usec - now.tv_usec) / 1000);
struct pollfd fds[1];
fds[0].fd = sock;