[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9325 - in /fsf/trunk/libc: ./ localedata/ localedata/locales/ nptl/ nptl/sysdeps/unix/sysv/linux/i386/ nscd/ sunrpc/ sysdep...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9325 - in /fsf/trunk/libc: ./ localedata/ localedata/locales/ nptl/ nptl/sysdeps/unix/sysv/linux/i386/ nscd/ sunrpc/ sysdep...
- From: eglibc@xxxxxxxxxx
- Date: Mon, 23 Nov 2009 08:04:34 -0000
Author: eglibc
Date: Mon Nov 23 00:04:30 2009
New Revision: 9325
Log:
Import glibc-mainline for 2009-11-23
Added:
fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettimex.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/locales/nl_NL
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
fsf/trunk/libc/nscd/connections.c
fsf/trunk/libc/sunrpc/create_xid.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
fsf/trunk/libc/sysdeps/unix/sysv/linux/Versions
fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon Nov 23 00:04:30 2009
@@ -1,3 +1,20 @@
+2009-11-22 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * nscd/connections.c (restart): Try harder to re-exec.
+
+ * sunrpc/create_xid.c (_create_xid): Reinitialize state after fork.
+
+ * sysdeps/unix/sysv/linux/ntp_gettimex.c: New file.
+ * sysdeps/unix/sysv/linux/Makefile: Add rules to build ntp_gettimex.
+ * sysdeps/unix/sysv/linux/Versions: Export ntp_gettimex for GLIBC_2.12.
+ * sysdeps/unix/sysv/linux/sys/timex.h (ntptimeval): Add tai member and
+ some placeholders. Redirect ntp_gettime to ntp_gettimex.
+ * sysdeps/unix/sysv/linux/ntp_gettime.c: Adjust for header change.
+
+ * sysdeps/unix/sysv/linux/sys/timex.h (MOD_TAI, MOD_MICRO, MOD_NANO):
+ Define.
+ (STA_RONLY): Add STA_NANO, STA_MODE, and STA_CLK.
+
2009-11-18 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #10162]
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Mon Nov 23 00:04:30 2009
@@ -1,3 +1,7 @@
+2009-11-22 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/nl_NL: Define week, first_weekday, and first_workday.
+
2009-10-30 Ulrich Drepper <drepper@xxxxxxxxxx>
* locales/it_CH: Fix typos in last change.
Modified: fsf/trunk/libc/localedata/locales/nl_NL
==============================================================================
--- fsf/trunk/libc/localedata/locales/nl_NL (original)
+++ fsf/trunk/libc/localedata/locales/nl_NL Mon Nov 23 00:04:30 2009
@@ -88,33 +88,33 @@
LC_TIME
abday "<U007A><U006F>";"<U006D><U0061>";"<U0064><U0069>";/
- "<U0077><U006F>";"<U0064><U006F>";"<U0076><U0072>";/
- "<U007A><U0061>"
+ "<U0077><U006F>";"<U0064><U006F>";"<U0076><U0072>";/
+ "<U007A><U0061>"
day "<U007A><U006F><U006E><U0064><U0061><U0067>";/
- "<U006D><U0061><U0061><U006E><U0064><U0061><U0067>";/
- "<U0064><U0069><U006E><U0073><U0064><U0061><U0067>";/
- "<U0077><U006F><U0065><U006E><U0073><U0064><U0061><U0067>";/
- "<U0064><U006F><U006E><U0064><U0065><U0072><U0064><U0061><U0067>";/
- "<U0076><U0072><U0069><U006A><U0064><U0061><U0067>";/
- "<U007A><U0061><U0074><U0065><U0072><U0064><U0061><U0067>"
+ "<U006D><U0061><U0061><U006E><U0064><U0061><U0067>";/
+ "<U0064><U0069><U006E><U0073><U0064><U0061><U0067>";/
+ "<U0077><U006F><U0065><U006E><U0073><U0064><U0061><U0067>";/
+ "<U0064><U006F><U006E><U0064><U0065><U0072><U0064><U0061><U0067>";/
+ "<U0076><U0072><U0069><U006A><U0064><U0061><U0067>";/
+ "<U007A><U0061><U0074><U0065><U0072><U0064><U0061><U0067>"
abmon "<U006A><U0061><U006E>";"<U0066><U0065><U0062>";/
- "<U006D><U0072><U0074>";"<U0061><U0070><U0072>";/
- "<U006D><U0065><U0069>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0075><U0067>";/
- "<U0073><U0065><U0070>";"<U006F><U006B><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0065><U0063>"
+ "<U006D><U0072><U0074>";"<U0061><U0070><U0072>";/
+ "<U006D><U0065><U0069>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0075><U0067>";/
+ "<U0073><U0065><U0070>";"<U006F><U006B><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0065><U0063>"
mon "<U006A><U0061><U006E><U0075><U0061><U0072><U0069>";/
- "<U0066><U0065><U0062><U0072><U0075><U0061><U0072><U0069>";/
- "<U006D><U0061><U0061><U0072><U0074>";/
- "<U0061><U0070><U0072><U0069><U006C>";/
- "<U006D><U0065><U0069>";/
- "<U006A><U0075><U006E><U0069>";/
- "<U006A><U0075><U006C><U0069>";/
- "<U0061><U0075><U0067><U0075><U0073><U0074><U0075><U0073>";/
- "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
- "<U006F><U006B><U0074><U006F><U0062><U0065><U0072>";/
- "<U006E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
- "<U0064><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
+ "<U0066><U0065><U0062><U0072><U0075><U0061><U0072><U0069>";/
+ "<U006D><U0061><U0061><U0072><U0074>";/
+ "<U0061><U0070><U0072><U0069><U006C>";/
+ "<U006D><U0065><U0069>";/
+ "<U006A><U0075><U006E><U0069>";/
+ "<U006A><U0075><U006C><U0069>";/
+ "<U0061><U0075><U0067><U0075><U0073><U0074><U0075><U0073>";/
+ "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
+ "<U006F><U006B><U0074><U006F><U0062><U0065><U0072>";/
+ "<U006E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
+ "<U0064><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002D><U0025><U006D><U002D><U0025><U0079>"
t_fmt "<U0025><U0054>"
@@ -123,6 +123,10 @@
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+
+week 7;19971130;4
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Mon Nov 23 00:04:30 2009
@@ -1,3 +1,8 @@
+2009-11-22 Roland McGrath <roland@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
+ instead of recapitulating its contents.
+
2009-11-18 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h Mon Nov 23 00:04:30 2009
@@ -1,5 +1,5 @@
-/* System-specific settings for dynamic linker code. IA-32 version.
- Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
+/* System-specific settings for dynamic linker code. i386 version.
+ Copyright (C) 2002,2003,2008,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
@@ -18,56 +18,11 @@
02111-1307 USA. */
#ifndef _DL_SYSDEP_H
-#define _DL_SYSDEP_H 1
+# include "i686/dl-sysdep.h"
-/* This macro must be defined to either 0 or 1.
-
- If 1, then an errno global variable hidden in ld.so will work right with
- all the errno-using libc code compiled for ld.so, and there is never a
- need to share the errno location with libc. This is appropriate only if
- all the libc functions that ld.so uses are called without PLT and always
- get the versions linked into ld.so rather than the libc ones. */
-
-#ifdef IS_IN_rtld
-# define RTLD_PRIVATE_ERRNO 1
-#else
-# define RTLD_PRIVATE_ERRNO 0
-#endif
-
-/* Traditionally system calls have been made using int $0x80. A
- second method was introduced which, if possible, will use the
- sysenter/syscall instructions. To signal the presence and where to
- find the code the kernel passes an AT_SYSINFO value in the
- auxiliary vector to the application.
- sysenter/syscall is not useful on i386 through i586, but the dynamic
+/* sysenter/syscall is not useful on i386 through i586, but the dynamic
linker and dl code in libc.a has to be able to load i686 compiled
libraries. */
-#define NEED_DL_SYSINFO 1
-#undef USE_DL_SYSINFO
-
-#if defined NEED_DL_SYSINFO && !defined __ASSEMBLER__
-extern void _dl_sysinfo_int80 (void) attribute_hidden;
-# define DL_SYSINFO_DEFAULT (uintptr_t) _dl_sysinfo_int80
-# define DL_SYSINFO_IMPLEMENTATION \
- asm (".text\n\t" \
- ".type _dl_sysinfo_int80,@function\n\t" \
- ".hidden _dl_sysinfo_int80\n\t" \
- CFI_STARTPROC "\n" \
- "_dl_sysinfo_int80:\n\t" \
- "int $0x80;\n\t" \
- "ret;\n\t" \
- CFI_ENDPROC "\n" \
- ".size _dl_sysinfo_int80,.-_dl_sysinfo_int80\n\t" \
- ".previous;");
-#endif
-
-
-/* The _dl_discover_osversion function is so far only needed in sysconf
- to check for kernels later than 2.6.23. */
-#if !defined __ASSEMBLER__ && __LINUX_KERNEL_VERSION < 0x020617
-/* Get version of the OS. */
-extern int _dl_discover_osversion (void) attribute_hidden;
-# define HAVE_DL_DISCOVER_OSVERSION 1
-#endif
+# undef USE_DL_SYSINFO
#endif /* dl-sysdep.h */
Modified: fsf/trunk/libc/nscd/connections.c
==============================================================================
--- fsf/trunk/libc/nscd/connections.c (original)
+++ fsf/trunk/libc/nscd/connections.c Mon Nov 23 00:04:30 2009
@@ -1426,15 +1426,14 @@
#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 */
+ if readlink or the exec with the result of the readlink call fails. */
ssize_t n = readlink ("/proc/self/exe", pathbuf, sizeof (pathbuf) - 1);
- if (n == -1)
- execv ("/proc/self/exe", argv);
- else
+ if (n != -1)
{
pathbuf[n] = '\0';
execv (pathbuf, argv);
}
+ execv ("/proc/self/exe", 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/sunrpc/create_xid.c
==============================================================================
--- fsf/trunk/libc/sunrpc/create_xid.c (original)
+++ fsf/trunk/libc/sunrpc/create_xid.c Mon Nov 23 00:04:30 2009
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 2000, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxxxxxxxxxxxxxx>, 1998.
@@ -27,7 +27,7 @@
__libc_lock_define_initialized (static, createxid_lock)
-static int is_initialized;
+static pid_t is_initialized;
static struct drand48_data __rpc_lrand48_data;
unsigned long
@@ -37,13 +37,15 @@
__libc_lock_lock (createxid_lock);
- if (!is_initialized)
+ pid_t pid = getpid ();
+ if (is_initialized != pid)
{
struct timeval now;
__gettimeofday (&now, (struct timezone *) 0);
- __srand48_r (now.tv_sec ^ now.tv_usec, &__rpc_lrand48_data);
- is_initialized = 1;
+ __srand48_r (now.tv_sec ^ now.tv_usec ^ pid,
+ &__rpc_lrand48_data);
+ is_initialized = pid;
}
lrand48_r (&__rpc_lrand48_data, &res);
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile Mon Nov 23 00:04:30 2009
@@ -84,8 +84,8 @@
$(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h $(+force)
$(make-target-directory)
if test -r $@ && cmp -s $< $@; \
- then echo 'bits/syscall.h unchanged'; \
- else $(INSTALL_DATA) $< $@; fi
+ then echo 'bits/syscall.h unchanged'; \
+ else $(INSTALL_DATA) $< $@; fi
ifndef no_deps
# Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
@@ -97,7 +97,7 @@
ifeq ($(subdir),time)
sysdep_headers += sys/timex.h
-sysdep_routines += ntp_gettime
+sysdep_routines += ntp_gettime ntp_gettimex
endif
ifeq ($(subdir),socket)
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/Versions
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/Versions (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/Versions Mon Nov 23 00:04:30 2009
@@ -144,6 +144,8 @@
GLIBC_2.12 {
#errlist-compat 134
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+
+ ntp_gettimex;
}
GLIBC_PRIVATE {
# functions used in other libraries
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c Mon Nov 23 00:04:30 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 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
@@ -16,7 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define ntp_gettime ntp_gettime_redirect
+
#include <sys/timex.h>
+
+#undef ntp_gettime
#ifndef MOD_OFFSET
# define modes mode
@@ -27,8 +31,7 @@
int
-ntp_gettime (ntv)
- struct ntptimeval *ntv;
+ntp_gettime (struct ntptimeval *ntv)
{
struct timex tntx;
int result;
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettimex.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettimex.c (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettimex.c Mon Nov 23 00:04:30 2009
@@ -1,0 +1,46 @@
+/* Copyright (C) 1999, 2002, 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/timex.h>
+
+#ifndef MOD_OFFSET
+# define modes mode
+#endif
+
+
+extern int INTUSE(__adjtimex) (struct timex *__ntx);
+
+
+int
+ntp_gettimex (struct ntptimeval *ntv)
+{
+ struct timex tntx;
+ int result;
+
+ tntx.modes = 0;
+ result = INTUSE(__adjtimex) (&tntx);
+ ntv->time = tntx.time;
+ ntv->maxerror = tntx.maxerror;
+ ntv->esterror = tntx.esterror;
+ ntv->tai = tntx.tai;
+ ntv->__unused1 = 0;
+ ntv->__unused2 = 0;
+ ntv->__unused3 = 0;
+ ntv->__unused4 = 0;
+ return result;
+}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h Mon Nov 23 00:04:30 2009
@@ -24,11 +24,19 @@
/* These definitions from linux/timex.h as of 2.6.30. */
+#define NTP_API 4 /* NTP API version */
+
struct ntptimeval
{
struct timeval time; /* current time (ro) */
long int maxerror; /* maximum error (us) (ro) */
long int esterror; /* estimated error (us) (ro) */
+ long int tai; /* TAI offset (ro) */
+
+ long int __unused1;
+ long int __unused2;
+ long int __unused3;
+ long int __unused4;
};
struct timex
@@ -85,6 +93,9 @@
#define MOD_TIMECONST ADJ_TIMECONST
#define MOD_CLKB ADJ_TICK
#define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */
+#define MOD_TAI ADJ_TAI
+#define MOD_MICRO ADJ_MICRO
+#define MOD_NANO ADJ_NANO
/* Status codes (timex.status) */
@@ -108,8 +119,9 @@
#define STA_MODE 0x4000 /* mode (0 = PLL, 1 = FLL) (ro) */
#define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */
+/* Read-only bits */
#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
- STA_PPSERROR | STA_CLOCKERR) /* read-only bits */
+ STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
/* Clock states (time_state) */
#define TIME_OK 0 /* clock synchronized, no leap second */
@@ -128,7 +140,13 @@
extern int __adjtimex (struct timex *__ntx) __THROW;
extern int adjtimex (struct timex *__ntx) __THROW;
-extern int ntp_gettime (struct ntptimeval *__ntv) __THROW;
+#if defined __GNUC__ && __GNUC__ >= 2
+extern int ntp_gettime (struct ntptimeval *__ntv)
+ __asm__ ("ntp_gettimex") __THROW;
+#else
+extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
+# define ntp_gettime ntp_gettimex
+#endif
extern int ntp_adjtime (struct timex *__tntx) __THROW;
__END_DECLS