[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9379 - in /trunk: libc/ libc/csu/ libc/include/ libc/libio/ libc/localedata/ libc/localedata/locales/ libc/login/programs/ ...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9379 - in /trunk: libc/ libc/csu/ libc/include/ libc/libio/ libc/localedata/ libc/localedata/locales/ libc/login/programs/ ...
- From: joseph@xxxxxxxxxx
- Date: Tue, 01 Dec 2009 01:39:36 -0000
Author: joseph
Date: Mon Nov 30 17:39:36 2009
New Revision: 9379
Log:
Merge changes between r9301 and r9378 from /fsf/trunk.
Added:
trunk/libc/nptl/tst-sem13.c
- copied unchanged from r9378, fsf/trunk/libc/nptl/tst-sem13.c
trunk/libc/sysdeps/unix/sysv/linux/grantpt.c
- copied unchanged from r9378, fsf/trunk/libc/sysdeps/unix/sysv/linux/grantpt.c
trunk/libc/sysdeps/unix/sysv/linux/ntp_gettimex.c
- copied unchanged from r9378, fsf/trunk/libc/sysdeps/unix/sysv/linux/ntp_gettimex.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c
- copied unchanged from r9378, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
- copied unchanged from r9378, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
- copied unchanged from r9378, fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
Modified:
trunk/libc/ChangeLog
trunk/libc/csu/elf-init.c
trunk/libc/csu/libc-start.c
trunk/libc/include/stdlib.h
trunk/libc/libio/libio.h
trunk/libc/localedata/ChangeLog
trunk/libc/localedata/locales/en_DK
trunk/libc/localedata/locales/hsb_DE
trunk/libc/localedata/locales/nl_NL
trunk/libc/login/programs/pt_chown.c
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/Makefile
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
trunk/libc/nscd/connections.c
trunk/libc/stdlib/random_r.c
trunk/libc/sunrpc/create_xid.c
trunk/libc/sysdeps/ia64/memchr.S
trunk/libc/sysdeps/unix/grantpt.c
trunk/libc/sysdeps/unix/sysv/linux/Makefile
trunk/libc/sysdeps/unix/sysv/linux/Versions
trunk/libc/sysdeps/unix/sysv/linux/bits/sched.h
trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c
trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/ptsname.c
trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h
trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
trunk/ports/ChangeLog.arm
trunk/ports/ChangeLog.hppa
trunk/ports/ChangeLog.m68k
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/mips/dl-lookup.c
trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/stat.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/stat.h
trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Mon Nov 30 17:39:36 2009
@@ -1,3 +1,99 @@
+2009-11-30 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/sched.h: Define SCHED_IDLE and
+ SCHED_RESET_ON_FORK.
+
+2009-11-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): Avoid code
+ only used on truly ancient kernel if configuration requires a more
+ recent kernel.
+
+2009-11-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #3662]
+ * stdlib/random_r.c: Fix comments for __initstate_r and __setstate_r.
+ Patch by Christopher Neufeld <glibcbugs0000@xxxxxxxxxxx>.
+
+ * sysdeps/unix/grantpt.c (pts_name): Take additional parameter,
+ pass it on to __ptsname_internal.
+ (grantpt): Pass stat64 pointer to pts_name. Remove stat call here.
+ * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): New function.
+ All the code from __ptsname_r but take additional parameter. Use that
+ instead of pointer to local stat64 variable.
+ (__ptsname_r): Call __ptsname_internal with pointer to local stat64
+ variable.
+ * include/stdlib.h: Declare __ptsname_internal.
+
+ * sysdeps/unix/grantpt.c (grantpt): Use CLOSE_ALL_FDS is available
+ before the exec.
+ * sysdeps/unix/sysv/linux/grantpt.c: New file.
+ * login/programs/pt_chown.c (main): Don't print message on errors
+ when doing real work.
+
+ * sysdeps/unix/grantpt.c (grantpt): Only get tty group information
+ once.
+
+ * csu/elf-init.c (__libc_csu_irel): New function. Code to perform
+ irel relocations split out from...
+ (__libc_csu_init): ...here.
+ * csu/libc-start.c [!SHARED]: Call __libc_csu_irel early.
+
+2009-11-23 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Use struct timespec
+ for timestamps also if __USE_XOPEN2K8.
+ * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/stat.h: Likewise.
+
+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]
+ * sysdeps/ia64/memchr.S: Don't use a simple loop on data shorter
+ than software pipeline. Properly recover from shorter read.
+
+2009-11-19 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #10958]
+ * libio/libio.h (_IO_getwc_unlocked): Check for _wide_data being
+ initialized before using it.
+ (_IO_putwc_unlocked): Likewise.
+
+ [BZ #10918]
+ * sysdeps/unix/sysv/linux/bits/sched.h (__CPU_ISSET_S): Use __const
+ in cast to not throw away const-ness of parameters.
+ (__CPU_EQUAL_S): Likewise.
+ (__CPU_OP_S): Likewise.
+
+ * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Introduce new symbol
+ F_OWNER_PGRP and mark F_OWNER_GID obsolete. The kernel people made
+ this gratuitous change and we have to keep compatibility.
+ * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+
2009-11-17 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Change misleading names
Modified: trunk/libc/csu/elf-init.c
==============================================================================
--- trunk/libc/csu/elf-init.c (original)
+++ trunk/libc/csu/elf-init.c Mon Nov 30 17:39:36 2009
@@ -72,15 +72,14 @@
/* These functions are passed to __libc_start_main by the startup code.
These get statically linked into each program. For dynamically linked
programs, this module will come from libc_nonshared.a and differs from
- the libc.a module in that it doesn't call the preinit array. */
+ the libc.a module in that it doesn't call the preinit array and performs
+ explicit IREL{,A} relocations. */
-void
-__libc_csu_init (int argc, char **argv, char **envp)
-{
- /* For dynamically linked executables the preinit array is executed by
- the dynamic linker (before initializing any shared object. */
#ifndef LIBC_NONSHARED
+void
+__libc_csu_irel (void)
+{
# ifdef USE_MULTIARCH
# ifdef ELF_MACHINE_IRELA
{
@@ -98,7 +97,17 @@
}
# endif
# endif
+}
+#endif
+
+void
+__libc_csu_init (int argc, char **argv, char **envp)
+{
+ /* For dynamically linked executables the preinit array is executed by
+ the dynamic linker (before initializing any shared object. */
+
+#ifndef LIBC_NONSHARED
/* For static executables, preinit happens right before init. */
{
const size_t size = __preinit_array_end - __preinit_array_start;
Modified: trunk/libc/csu/libc-start.c
==============================================================================
--- trunk/libc/csu/libc-start.c (original)
+++ trunk/libc/csu/libc-start.c Mon Nov 30 17:39:36 2009
@@ -24,6 +24,9 @@
#include <bp-sym.h>
extern void __libc_init_first (int argc, char **argv, char **envp);
+#ifndef SHARED
+extern void __libc_csu_irel (void);
+#endif
extern int __libc_multiple_libcs;
@@ -134,6 +137,9 @@
}
# endif
+ /* Performe IREL{,A} relocations. */
+ __libc_csu_irel ();
+
/* Initialize the thread library at least a bit since the libgcc
functions are using thread functions if these are available and
we need to setup errno. */
Modified: trunk/libc/include/stdlib.h
==============================================================================
--- trunk/libc/include/stdlib.h (original)
+++ trunk/libc/include/stdlib.h Mon Nov 30 17:39:36 2009
@@ -9,6 +9,7 @@
/* Now define the internal interfaces. */
#ifndef __Need_M_And_C
+# include <sys/stat.h>
__BEGIN_DECLS
@@ -77,6 +78,8 @@
extern char *__canonicalize_file_name (__const char *__name);
extern char *__realpath (__const char *__name, char *__resolved);
extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
+extern int __ptsname_internal (int fd, char *buf, size_t buflen,
+ struct stat64 *stp);
extern int __getpt (void);
extern int __posix_openpt (int __oflag);
Modified: trunk/libc/libio/libio.h
==============================================================================
--- trunk/libc/libio/libio.h (original)
+++ trunk/libc/libio/libio.h Mon Nov 30 17:39:36 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1995,1997-2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995,1997-2006,2007,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@xxxxxxxxxx>.
@@ -442,13 +442,15 @@
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define _IO_getwc_unlocked(_fp) \
- (_IO_BE ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end,\
- 0) \
+ (_IO_BE ((_fp)->_wide_data == NULL \
+ || ((_fp)->_wide_data->_IO_read_ptr \
+ >= (_fp)->_wide_data->_IO_read_end), 0) \
? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++)
# define _IO_putwc_unlocked(_wch, _fp) \
- (_IO_BE ((_fp)->_wide_data->_IO_write_ptr \
- >= (_fp)->_wide_data->_IO_write_end, 0) \
- ? __woverflow (_fp, _wch) \
+ (_IO_BE ((_fp)->_wide_data == NULL \
+ || ((_fp)->_wide_data->_IO_write_ptr \
+ >= (_fp)->_wide_data->_IO_write_end), 0) \
+ ? __woverflow (_fp, _wch) \
: (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))
#endif
Modified: trunk/libc/localedata/ChangeLog
==============================================================================
--- trunk/libc/localedata/ChangeLog (original)
+++ trunk/libc/localedata/ChangeLog Mon Nov 30 17:39:36 2009
@@ -1,3 +1,15 @@
+2009-11-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/hsb_DE: Define week, first_weekday, and first_workday.
+
+2009-11-23 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/en_DK: Define week, first_weekday, and first_workday.
+
+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: trunk/libc/localedata/locales/en_DK
==============================================================================
--- trunk/libc/localedata/locales/en_DK (original)
+++ trunk/libc/localedata/locales/en_DK Mon Nov 30 17:39:36 2009
@@ -85,34 +85,34 @@
LC_TIME
abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
- "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
- "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
- "<U0053><U0061><U0074>"
+ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
+ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
+ "<U0053><U0061><U0074>"
day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
- "<U004D><U006F><U006E><U0064><U0061><U0079>";/
- "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
- "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
- "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
- "<U0046><U0072><U0069><U0064><U0061><U0079>";/
- "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
+ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
+ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
+ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
+ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
+ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
+ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
- "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
- "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
- "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
- "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
- "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
+ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
+ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
+ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
+ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
- "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
- "<U004D><U0061><U0072><U0063><U0068>";/
- "<U0041><U0070><U0072><U0069><U006C>";/
- "<U004D><U0061><U0079>";/
- "<U004A><U0075><U006E><U0065>";/
- "<U004A><U0075><U006C><U0079>";/
- "<U0041><U0075><U0067><U0075><U0073><U0074>";/
- "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
- "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
- "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
- "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
+ "<U004D><U0061><U0072><U0063><U0068>";/
+ "<U0041><U0070><U0072><U0069><U006C>";/
+ "<U004D><U0061><U0079>";/
+ "<U004A><U0075><U006E><U0065>";/
+ "<U004A><U0075><U006C><U0079>";/
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
+ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
+ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
% date formats following ISO 8601-1988
d_t_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064><U0054><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064>"
@@ -122,6 +122,9 @@
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_MESSAGES
Modified: trunk/libc/localedata/locales/hsb_DE
==============================================================================
--- trunk/libc/localedata/locales/hsb_DE (original)
+++ trunk/libc/localedata/locales/hsb_DE Mon Nov 30 17:39:36 2009
@@ -197,7 +197,7 @@
% letter;accent;case;specials
order_start forward;backward/
- ;forward;position
+ ;forward;position
% <CAPITAL> or <SMALL> letters first:
@@ -2136,16 +2136,16 @@
LC_TIME
abday "<U004E><U006A>";"<U0050><U00F3>";/
- "<U0057><U0075>";"<U0053><U0072>";/
- "<U0160><U0074>";"<U0050><U006A>";/
- "<U0053><U006F>"
+ "<U0057><U0075>";"<U0053><U0072>";/
+ "<U0160><U0074>";"<U0050><U006A>";/
+ "<U0053><U006F>"
day "<U004E><U006A><U0065><U0064><U017A><U0065><U006C><U0061>";/
- "<U0050><U00F3><U006E><U0064><U017A><U0065><U006C><U0061>";/
- "<U0057><U0075><U0074><U006F><U0072><U0061>";/
- "<U0053><U0072><U006A><U0065><U0064><U0061>";/
- "<U0160><U0074><U0076><U00F3><U0072><U0074><U006B>";/
- "<U0050><U006A><U0061><U0074><U006B>";/
- "<U0053><U006F><U0062><U006F><U0074><U0061>"
+ "<U0050><U00F3><U006E><U0064><U017A><U0065><U006C><U0061>";/
+ "<U0057><U0075><U0074><U006F><U0072><U0061>";/
+ "<U0053><U0072><U006A><U0065><U0064><U0061>";/
+ "<U0160><U0074><U0076><U00F3><U0072><U0074><U006B>";/
+ "<U0050><U006A><U0061><U0074><U006B>";/
+ "<U0053><U006F><U0062><U006F><U0074><U0061>"
abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
"<U004D><U011B><U0072>";"<U0041><U0070><U0072>";/
"<U004D><U0065><U006A>";"<U004A><U0075><U006E>";/
@@ -2172,6 +2172,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: trunk/libc/localedata/locales/nl_NL
==============================================================================
--- trunk/libc/localedata/locales/nl_NL (original)
+++ trunk/libc/localedata/locales/nl_NL Mon Nov 30 17:39:36 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: trunk/libc/login/programs/pt_chown.c
==============================================================================
--- trunk/libc/login/programs/pt_chown.c (original)
+++ trunk/libc/login/programs/pt_chown.c Mon Nov 30 17:39:36 2009
@@ -154,8 +154,7 @@
# define ncap_list (sizeof (cap_list) / sizeof (cap_list[0]))
cap_t caps = cap_init ();
if (caps == NULL)
- error (FAIL_ENOMEM, errno,
- _("Failed to initialize drop of capabilities"));
+ return FAIL_ENOMEM;
/* There is no reason why these should not work. */
cap_set_flag (caps, CAP_PERMITTED, ncap_list, cap_list, CAP_SET);
@@ -166,7 +165,7 @@
cap_free (caps);
if (__builtin_expect (res != 0, 0))
- error (FAIL_EXEC, errno, _("cap_set_proc failed"));
+ return FAIL_EXEC;
}
#endif
Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Mon Nov 30 17:39:36 2009
@@ -1,3 +1,35 @@
+2009-11-27 Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
+ __gmon_start__.
+
+2009-11-27 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
+ THREAD_SELF->cancelhandling after returning from futex call.
+
+2009-11-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * tst-sem13.c: New file.
+ * Makefile (tests): Add tst-sem13.
+
+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
+ optimizations and cleanups.
+
+2009-11-18 Dinakar Guniguntala <dino@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
+ Remove redundant code. Fix cfi offsets.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
+ Fix cfi offsets.
+
2009-11-17 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
Modified: trunk/libc/nptl/Makefile
==============================================================================
--- trunk/libc/nptl/Makefile (original)
+++ trunk/libc/nptl/Makefile Mon Nov 30 17:39:36 2009
@@ -220,7 +220,7 @@
tst-once1 tst-once2 tst-once3 tst-once4 \
tst-key1 tst-key2 tst-key3 tst-key4 \
tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
- tst-sem8 tst-sem9 tst-sem10 tst-sem11 tst-sem12 \
+ tst-sem8 tst-sem9 tst-sem10 tst-sem11 tst-sem12 tst-sem13 \
tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
tst-align tst-align2 tst-align3 \
tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h Mon Nov 30 17:39:36 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: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S Mon Nov 30 17:39:36 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2006,2007,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -35,16 +35,17 @@
cfi_startproc
pushl %ebx
cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebx, 0)
pushl %esi
cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%esi, 0)
pushl %edi
cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%edi, 0)
pushl %ebp
cfi_adjust_cfa_offset(4)
- cfi_offset(%ebx, -8)
- cfi_offset(%esi, -12)
- cfi_offset(%edi, -16)
- cfi_offset(%ebp, -20)
+ cfi_rel_offset(%ebp, 0)
+ cfi_remember_state
movl 20(%esp), %ebx
@@ -120,7 +121,7 @@
cmpl $0xfffff001, %eax
jae 9f
-10: xorl %eax, %eax
+6: xorl %eax, %eax
popl %ebp
cfi_adjust_cfa_offset(-4)
cfi_restore(%ebp)
@@ -135,59 +136,51 @@
cfi_restore(%ebx)
ret
- cfi_adjust_cfa_offset(16)
- cfi_offset(%ebx, -8)
- cfi_offset(%esi, -12)
- cfi_offset(%edi, -16)
- cfi_offset(%ebp, -20)
+ cfi_restore_state
+
+ /* Initial locking failed. */
+1:
+#if cond_lock == 0
+ movl %ebx, %edx
+#else
+ leal cond_lock(%ebx), %edx
+#endif
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
+ call __lll_lock_wait
+ jmp 2b
+
.align 16
/* Unlock. */
4: LOCK
subl $1, cond_lock-cond_futex(%ebx)
- jne 5f
-
-6: xorl %eax, %eax
- popl %ebp
- cfi_adjust_cfa_offset(-4)
- cfi_restore(%ebp)
- popl %edi
- cfi_adjust_cfa_offset(-4)
- cfi_restore(%edi)
- popl %esi
- cfi_adjust_cfa_offset(-4)
- cfi_restore(%esi)
- popl %ebx
- cfi_adjust_cfa_offset(-4)
- cfi_restore(%ebx)
- ret
-
- cfi_adjust_cfa_offset(16)
- cfi_offset(%ebx, -8)
- cfi_offset(%esi, -12)
- cfi_offset(%edi, -16)
- cfi_offset(%ebp, -20)
- /* Initial locking failed. */
-1:
-#if cond_lock == 0
- movl %ebx, %edx
-#else
- leal cond_lock(%ebx), %edx
-#endif
+ je 6b
+
+ /* Unlock in loop requires wakeup. */
+5: leal cond_lock-cond_futex(%ebx), %eax
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
#endif
- cmpl $-1, dep_mutex(%ebx)
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
setne %cl
subl $1, %ecx
andl $(LLL_SHARED-LLL_PRIVATE), %ecx
#if LLL_PRIVATE != 0
addl $LLL_PRIVATE, %ecx
#endif
- call __lll_lock_wait
- jmp 2b
-
- /* Unlock in loop requires waekup. */
-5: leal cond_lock-cond_futex(%ebx), %eax
+ call __lll_unlock_wake
+ jmp 6b
+
+ /* Unlock in loop requires wakeup. */
+7: leal cond_lock-cond_futex(%ebx), %eax
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
#endif
@@ -199,21 +192,6 @@
addl $LLL_PRIVATE, %ecx
#endif
call __lll_unlock_wake
- jmp 6b
-
- /* Unlock in loop requires waekup. */
-7: leal cond_lock-cond_futex(%ebx), %eax
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex-cond_futex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_unlock_wake
jmp 8b
9: /* The futex requeue functionality is not available. */
@@ -232,7 +210,7 @@
addl $FUTEX_WAKE, %ecx
movl $SYS_futex, %eax
ENTER_KERNEL
- jmp 10b
+ jmp 6b
cfi_endproc
.size __pthread_cond_broadcast, .-__pthread_cond_broadcast
versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast,
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S Mon Nov 30 17:39:36 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -36,10 +36,11 @@
cfi_startproc
pushl %ebx
cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebx, 0)
pushl %edi
cfi_adjust_cfa_offset(4)
- cfi_offset(%ebx, -8)
- cfi_offset(%edi, -12)
+ cfi_rel_offset(%edi, 0)
+ cfi_remember_state
movl 12(%esp), %edi
@@ -75,10 +76,10 @@
/* Wake up one thread. */
pushl %esi
cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%esi, 0)
pushl %ebp
cfi_adjust_cfa_offset(4)
- cfi_offset(%esi, -16)
- cfi_offset(%ebp, -20)
+ cfi_rel_offset(%ebp, 0)
#if FUTEX_PRIVATE_FLAG > 255
xorl %ecx, %ecx
@@ -121,9 +122,7 @@
cfi_restore(%ebx)
ret
- cfi_adjust_cfa_offset(8)
- cfi_offset(%ebx, -8)
- cfi_offset(%edi, -12)
+ cfi_restore_state
7: /* %ecx should be either FUTEX_WAKE_OP or
FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall. */
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c Mon Nov 30 17:39:36 2009
@@ -1,5 +1,5 @@
-/* Special .init and .fini section support for SH. NPTL version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+/* Special .init and .fini section support for SH. NPTL version.
+ Copyright (C) 2003, 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
@@ -62,19 +62,12 @@
mov.l .L24,r1\n\
add r0,r1\n\
jsr @r1\n\
- nop\n\
- mova .L23,r0\n\
- mov.l .L23,r1\n\
- add r0,r1\n\
- jsr @r1\n\
mov r15,r14\n\
bra 1f\n\
nop\n\
.align 2\n\
.L22:\n\
.long _GLOBAL_OFFSET_TABLE_\n\
-.L23:\n\
- .long __gmon_start__@PLT\n\
.L24:\n\
.long __pthread_initialize_minimal_internal@PLT\n\
1:\n\
@@ -91,16 +84,6 @@
rts \n\
mov.l @r15+,r12\n\
END_INIT\n\
- .section .text\n\
- .align 5\n\
- .weak __gmon_start__\n\
- .type __gmon_start__,@function\n\
-__gmon_start__:\n\
- mov.l r14,@-r15\n\
- mov r15,r14\n\
- mov r14,r15\n\
- rts \n\
- mov.l @r15+,r14\n\
\n\
/*@_init_EPILOG_ENDS*/\n\
\n\
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S Mon Nov 30 17:39:36 2009
@@ -96,8 +96,8 @@
cmpxchgl %r11d, %fs:CANCELHANDLING
jnz 2b
-3: movl %r11d, %eax
- andl $(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
+ movl %r11d, %eax
+3: andl $(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
cmpl $TCB_CANCELING_BITMASK, %eax
je 4f
1: ret
@@ -111,5 +111,6 @@
addq $CANCELHANDLING, %rdi
LOAD_PRIVATE_FUTEX_WAIT (%esi)
syscall
+ movl %fs:CANCELHANDLING, %eax
jmp 3b
END(__pthread_disable_asynccancel)
Modified: trunk/libc/nscd/connections.c
==============================================================================
--- trunk/libc/nscd/connections.c (original)
+++ trunk/libc/nscd/connections.c Mon Nov 30 17:39:36 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: trunk/libc/stdlib/random_r.c
==============================================================================
--- trunk/libc/stdlib/random_r.c (original)
+++ trunk/libc/stdlib/random_r.c Mon Nov 30 17:39:36 2009
@@ -228,7 +228,7 @@
lose this information and will be able to restart with setstate.
Note: The first thing we do is save the current state, if any, just like
setstate so that it doesn't matter when initstate is called.
- Returns a pointer to the old state. */
+ Returns 0 on success, non-zero on failure. */
int
__initstate_r (seed, arg_state, n, buf)
unsigned int seed;
@@ -296,7 +296,7 @@
location into the zeroth word of the state information. Note that due
to the order in which things are done, it is OK to call setstate with the
same state as the current state
- Returns a pointer to the old state information. */
+ Returns 0 on success, non-zero on failure. */
int
__setstate_r (arg_state, buf)
char *arg_state;
Modified: trunk/libc/sunrpc/create_xid.c
==============================================================================
--- trunk/libc/sunrpc/create_xid.c (original)
+++ trunk/libc/sunrpc/create_xid.c Mon Nov 30 17:39:36 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: trunk/libc/sysdeps/ia64/memchr.S
==============================================================================
--- trunk/libc/sysdeps/ia64/memchr.S (original)
+++ trunk/libc/sysdeps/ia64/memchr.S Mon Nov 30 17:39:36 2009
@@ -71,8 +71,7 @@
cmp.ne p7, p0 = r0, r0 // clear p7
extr.u chr = in1, 0, 8 // chr = (unsigned char) in1
mov len = in2
- // use a simple loop on data shorter than software pipeline
- cmp.gtu p6, p0 = ((MEMLAT + 1) * 8), in2
+ cmp.gtu p6, p0 = 16, in2 // use a simple loop for short
(p6) br.cond.spnt .srchfew ;; // searches
sub loopcnt = 8, tmp // loopcnt = 8 - tmp
cmp.eq p6, p0 = tmp, r0
@@ -127,7 +126,16 @@
br.ret.sptk.many b0
.recovery:
- adds ret0 = -((MEMLAT + 1) * 8), ret0;;
+#if MEMLAT != 6
+# error "MEMLAT must be 6!"
+#endif
+(p[MEMLAT-6]) add ret0 = -8, ret0;;
+(p[MEMLAT-5]) add ret0 = -8, ret0;;
+(p[MEMLAT-4]) add ret0 = -8, ret0;;
+(p[MEMLAT-3]) add ret0 = -8, ret0;;
+(p[MEMLAT-2]) add ret0 = -8, ret0;;
+(p[MEMLAT-1]) add ret0 = -8, ret0;;
+(p[MEMLAT]) add ret0 = -8, ret0;;
(p[MEMLAT+1]) add ret0 = -8, ret0;;
(p[MEMLAT+2]) add ret0 = -8, ret0;;
.l4:
Modified: trunk/libc/sysdeps/unix/grantpt.c
==============================================================================
--- trunk/libc/sysdeps/unix/grantpt.c (original)
+++ trunk/libc/sysdeps/unix/grantpt.c Mon Nov 30 17:39:36 2009
@@ -38,7 +38,7 @@
this buffer, a sufficiently long buffer is allocated using malloc,
and returned in PTS. 0 is returned upon success, -1 otherwise. */
static int
-pts_name (int fd, char **pts, size_t buf_len)
+pts_name (int fd, char **pts, size_t buf_len, struct stat64 *stp)
{
int rv;
char *buf = *pts;
@@ -49,7 +49,7 @@
if (buf_len)
{
- rv = __ptsname_r (fd, buf, buf_len);
+ rv = __ptsname_internal (fd, buf, buf_len, stp);
if (rv != 0)
{
if (rv == ENOTTY)
@@ -108,15 +108,8 @@
#endif
char *buf = _buf;
struct stat64 st;
- char *grtmpbuf;
- struct group grbuf;
- size_t grbuflen = __sysconf (_SC_GETGR_R_SIZE_MAX);
- struct group *p;
- uid_t uid;
- gid_t gid;
- pid_t pid;
-
- if (__builtin_expect (pts_name (fd, &buf, sizeof (_buf)), 0))
+
+ if (__builtin_expect (pts_name (fd, &buf, sizeof (_buf), &st), 0))
{
int save_errno = errno;
@@ -126,34 +119,42 @@
return -1;
/* If the filedescriptor is no TTY, grantpt has to set errno
- to EINVAL. */
+ to EINVAL. */
if (save_errno == ENOTTY)
- __set_errno (EINVAL);
+ __set_errno (EINVAL);
else
__set_errno (save_errno);
return -1;
}
- if (__xstat64 (_STAT_VER, buf, &st) < 0)
- goto cleanup;
-
/* Make sure that we own the device. */
- uid = __getuid ();
+ uid_t uid = __getuid ();
if (st.st_uid != uid)
{
if (__chown (buf, uid, st.st_gid) < 0)
goto helper;
}
- /* Get the group ID of the special `tty' group. */
- if (grbuflen == (size_t) -1L)
- /* `sysconf' does not support _SC_GETGR_R_SIZE_MAX.
- Try a moderate value. */
- grbuflen = 1024;
- grtmpbuf = (char *) __alloca (grbuflen);
- __getgrnam_r (TTY_GROUP, &grbuf, grtmpbuf, grbuflen, &p);
- gid = p ? p->gr_gid : __getgid ();
+ static int tty_gid = -1;
+ if (__builtin_expect (tty_gid == -1, 0))
+ {
+ char *grtmpbuf;
+ struct group grbuf;
+ size_t grbuflen = __sysconf (_SC_GETGR_R_SIZE_MAX);
+ struct group *p;
+
+ /* Get the group ID of the special `tty' group. */
+ if (grbuflen == (size_t) -1L)
+ /* `sysconf' does not support _SC_GETGR_R_SIZE_MAX.
+ Try a moderate value. */
+ grbuflen = 1024;
+ grtmpbuf = (char *) __alloca (grbuflen);
+ __getgrnam_r (TTY_GROUP, &grbuf, grtmpbuf, grbuflen, &p);
+ if (p != NULL)
+ tty_gid = p->gr_gid;
+ }
+ gid_t gid = tty_gid == -1 ? __getgid () : tty_gid;
/* Make sure the group of the device is that special group. */
if (st.st_gid != gid)
@@ -174,9 +175,9 @@
goto cleanup;
/* We have to use the helper program. */
- helper:
-
- pid = __fork ();
+ helper:;
+
+ pid_t pid = __fork ();
if (pid == -1)
goto cleanup;
else if (pid == 0)
@@ -189,6 +190,10 @@
if (fd != PTY_FILENO)
if (__dup2 (fd, PTY_FILENO) < 0)
_exit (FAIL_EBADF);
+
+#ifdef CLOSE_ALL_FDS
+ CLOSE_ALL_FDS ();
+#endif
execle (_PATH_PT_CHOWN, basename (_PATH_PT_CHOWN), NULL, NULL);
_exit (FAIL_EXEC);
Modified: trunk/libc/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/Makefile (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/Makefile Mon Nov 30 17:39:36 2009
@@ -85,8 +85,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).
@@ -98,7 +98,7 @@
ifeq ($(subdir),time)
sysdep_headers += sys/timex.h
-sysdep_routines += ntp_gettime
+sysdep_routines += ntp_gettime ntp_gettimex
endif
ifeq ($(subdir),socket)
Modified: trunk/libc/sysdeps/unix/sysv/linux/Versions
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/Versions (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/Versions Mon Nov 30 17:39:36 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: trunk/libc/sysdeps/unix/sysv/linux/bits/sched.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/bits/sched.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/bits/sched.h Mon Nov 30 17:39:36 2009
@@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008
+ Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -27,11 +27,14 @@
/* Scheduling algorithms. */
-#define SCHED_OTHER 0
-#define SCHED_FIFO 1
-#define SCHED_RR 2
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
#ifdef __USE_GNU
-# define SCHED_BATCH 3
+# define SCHED_BATCH 3
+# define SCHED_IDLE 5
+
+# define SCHED_RESET_ON_FORK 0x40000000
#endif
#ifdef __USE_MISC
@@ -154,7 +157,7 @@
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu < 8 * (setsize) \
- ? ((((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
+ ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
& __CPUMASK (__cpu))) != 0 \
: 0; }))
@@ -167,8 +170,8 @@
# else
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__extension__ \
- ({ __cpu_mask *__arr1 = (cpusetp1)->__bits; \
- __cpu_mask *__arr2 = (cpusetp2)->__bits; \
+ ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
+ __const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
@@ -180,8 +183,8 @@
# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
(__extension__ \
({ cpu_set_t *__dest = (destset); \
- __cpu_mask *__arr1 = (srcset1)->__bits; \
- __cpu_mask *__arr2 = (srcset2)->__bits; \
+ __const __cpu_mask *__arr1 = (srcset1)->__bits; \
+ __const __cpu_mask *__arr2 = (srcset2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
Modified: trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h Mon Nov 30 17:39:36 2009
@@ -60,7 +60,7 @@
#else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
#endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -106,7 +106,7 @@
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
+# if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -116,14 +116,14 @@
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-#else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# endif
__ino64_t st_ino; /* File serial number. */
};
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -172,9 +172,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -165,9 +165,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/ntp_gettime.c Mon Nov 30 17:39:36 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;
Modified: trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -172,9 +172,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h Mon Nov 30 17:39:36 2009
@@ -69,27 +69,27 @@
# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
# endif
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
unsigned long int __unused4;
unsigned long int __unused5;
};
@@ -109,27 +109,27 @@
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
unsigned long int __unused4;
unsigned long int __unused5;
};
@@ -163,27 +163,27 @@
# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
# endif
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
unsigned long int __unused4;
unsigned long int __unused5;
unsigned long int __unused6;
@@ -203,27 +203,27 @@
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
unsigned long int __unused4;
unsigned long int __unused5;
unsigned long int __unused6;
Modified: trunk/libc/sysdeps/unix/sysv/linux/ptsname.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/ptsname.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/ptsname.c Mon Nov 30 17:39:36 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2001, 2002, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@xxxxxxxxxxxxxxxxxxxxxx>, 1998.
@@ -67,14 +67,10 @@
}
-/* Store at most BUFLEN characters of the pathname of the slave pseudo
- terminal associated with the master FD is open on in BUF.
- Return 0 on success, otherwise an error number. */
int
-__ptsname_r (int fd, char *buf, size_t buflen)
+__ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
{
int save_errno = errno;
- struct stat64 st;
unsigned int ptyno;
if (buf == NULL)
@@ -93,7 +89,7 @@
if (__ioctl (fd, TIOCGPTN, &ptyno) == 0)
{
/* Buffer we use to print the number in. For a maximum size for
- `int' of 8 bytes we never need more than 20 digits. */
+ `int' of 8 bytes we never need more than 20 digits. */
char numbuf[21];
const char *devpts = _PATH_DEVPTS;
const size_t devptslen = strlen (_PATH_DEVPTS);
@@ -121,21 +117,23 @@
return ERANGE;
}
- if (__fxstat64 (_STAT_VER, fd, &st) < 0)
+ if (__fxstat64 (_STAT_VER, fd, stp) < 0)
return errno;
/* Check if FD really is a master pseudo terminal. */
- if (! MASTER_P (st.st_rdev))
+ if (! MASTER_P (stp->st_rdev))
{
__set_errno (ENOTTY);
return ENOTTY;
}
- ptyno = minor (st.st_rdev);
+ ptyno = minor (stp->st_rdev);
+#if __LINUX_KERNEL_VERSION >= 131443
/* This is for the old BSD pseudo terminals. As of Linux
- 2.1.115 these are no longer supported. */
- if (major (st.st_rdev) == 4)
+ 2.1.115 these are no longer supported. */
+ if (major (stp->st_rdev) == 4)
ptyno -= 128;
+#endif
if (ptyno / 16 >= strlen (__libc_ptyname1))
{
@@ -149,12 +147,12 @@
p[2] = '\0';
}
- if (__xstat64 (_STAT_VER, buf, &st) < 0)
+ if (__xstat64 (_STAT_VER, buf, stp) < 0)
return errno;
/* Check if the name we're about to return really corresponds to a
slave pseudo terminal. */
- if (! S_ISCHR (st.st_mode) || ! SLAVE_P (st.st_rdev))
+ if (! S_ISCHR (stp->st_mode) || ! SLAVE_P (stp->st_rdev))
{
/* This really is a configuration problem. */
__set_errno (ENOTTY);
@@ -164,4 +162,15 @@
__set_errno (save_errno);
return 0;
}
+
+
+/* Store at most BUFLEN characters of the pathname of the slave pseudo
+ terminal associated with the master FD is open on in BUF.
+ Return 0 on success, otherwise an error number. */
+int
+__ptsname_r (int fd, char *buf, size_t buflen)
+{
+ struct stat64 st;
+ return __ptsname_internal (fd, buf, buflen, &st);
+}
weak_alias (__ptsname_r, ptsname_r)
Modified: trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -187,9 +187,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h Mon Nov 30 17:39:36 2009
@@ -56,7 +56,7 @@
int pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,27 +109,27 @@
# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
# endif
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
# ifndef __USE_FILE_OFFSET64
unsigned long int __unused4;
unsigned long int __unused5;
@@ -153,27 +153,27 @@
int pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
long int __unused[3];
@@ -195,27 +195,27 @@
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
__ino64_t st_ino; /* File serial number. */
};
# endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -172,9 +172,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -191,9 +191,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h Mon Nov 30 17:39:36 2009
@@ -60,7 +60,7 @@
#else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
#endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -89,9 +89,9 @@
struct stat64
{
__dev_t st_dev; /* Device. */
-#if __WORDSIZE == 64
+# if __WORDSIZE == 64
unsigned short int __pad1;
-#endif
+# endif
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
@@ -103,7 +103,7 @@
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
+# if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -113,17 +113,17 @@
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# endif
unsigned long int __unused4;
unsigned long int __unused5;
};
Modified: trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sys/timex.h Mon Nov 30 17:39:36 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
Modified: trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -186,9 +186,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h Mon Nov 30 17:39:36 2009
@@ -78,7 +78,7 @@
#else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
#endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -116,30 +116,30 @@
struct stat64
{
__dev_t st_dev; /* Device. */
-#if __WORDSIZE == 64
+# if __WORDSIZE == 64
__ino64_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-#else
+# else
unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-#endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-#if __WORDSIZE == 64
+# if __WORDSIZE == 64
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
-#ifdef __USE_MISC
+# if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -149,22 +149,22 @@
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#if __WORDSIZE == 64
+# endif
+# if __WORDSIZE == 64
long int __unused[3];
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
};
#endif
Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Mon Nov 30 17:39:36 2009
@@ -1,3 +1,13 @@
+2009-11-19 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Introduce new symbol
+ F_OWNER_PGRP and mark F_OWNER_GID obsolete.
+
+2009-11-19 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PSELECT,
+ __ASSUME_PPOLL): Don't undefine for kernel 2.6.32 and later.
+
2009-11-18 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Change misleading
Modified: trunk/ports/ChangeLog.hppa
==============================================================================
--- trunk/ports/ChangeLog.hppa (original)
+++ trunk/ports/ChangeLog.hppa Mon Nov 30 17:39:36 2009
@@ -1,3 +1,14 @@
+2009-11-25 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
+ Use correct alignment for pthread_mutex_t, pthread_cond_t,
+ and pthread_rwlock_t.
+
+2009-11-22 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings
+ by casting oldval to int.
+
2009-11-15 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
[BZ #6676]
Modified: trunk/ports/ChangeLog.m68k
==============================================================================
--- trunk/ports/ChangeLog.m68k (original)
+++ trunk/ports/ChangeLog.m68k Mon Nov 30 17:39:36 2009
@@ -1,3 +1,13 @@
+2009-11-23 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Use struct timespec
+ for timestamps also if __USE_XOPEN2K8.
+
+2009-11-19 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Introduce new symbol
+ F_OWNER_PGRP and mark F_OWNER_GID obsolete.
+
2009-11-18 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Change misleading
Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Mon Nov 30 17:39:36 2009
@@ -1,3 +1,25 @@
+2009-12-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
+ (posix_fadvise): Remove.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: New.
+
+2009-12-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/dl-lookup.c: Update from generic version.
+
+2009-11-23 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/stat.h: Use struct timespec
+ for timestamps also if __USE_XOPEN2K8.
+
+2009-11-19 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Introduce new symbol
+ F_OWNER_PGRP and mark F_OWNER_GID obsolete.
+
2009-11-18 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Change misleading
Modified: trunk/ports/sysdeps/mips/dl-lookup.c
==============================================================================
--- trunk/ports/sysdeps/mips/dl-lookup.c (original)
+++ trunk/ports/sysdeps/mips/dl-lookup.c Mon Nov 30 17:39:36 2009
@@ -329,16 +329,16 @@
definition we have to use it. */
void enter (struct unique_sym *table, size_t size,
unsigned int hash, const char *name,
- const ElfW(Sym) *sym, const struct link_map *map)
+ const ElfW(Sym) *sym, struct link_map *map)
{
size_t idx = hash % size;
size_t hash2 = 1 + hash % (size - 2);
while (1)
{
- if (table[idx].hashval == 0)
+ if (table[idx].name == NULL)
{
table[idx].hashval = hash;
- table[idx].name = strtab + sym->st_name;
+ table[idx].name = name;
if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
{
table[idx].sym = ref;
@@ -348,7 +348,13 @@
{
table[idx].sym = sym;
table[idx].map = map;
+
+ if (map->l_type == lt_loaded)
+ /* Make sure we don't unload this object by
+ setting the appropriate flag. */
+ map->l_flags_1 |= DF_1_NODELETE;
}
+
return;
}
@@ -380,8 +386,7 @@
return 1;
}
- if (entries[idx].hashval == 0
- && entries[idx].name == NULL)
+ if (entries[idx].name == NULL)
break;
idx += hash2;
@@ -389,10 +394,14 @@
idx -= size;
}
- if (size * 3 <= tab->n_elements)
+ if (size * 3 <= tab->n_elements * 4)
{
/* Expand the table. */
- size_t newsize = _dl_higher_prime_number (size);
+#ifdef RTLD_CHECK_FOREIGN_CALL
+ /* This must not happen during runtime relocations. */
+ assert (!RTLD_CHECK_FOREIGN_CALL);
+#endif
+ size_t newsize = _dl_higher_prime_number (size + 1);
struct unique_sym *newentries
= calloc (sizeof (struct unique_sym), newsize);
if (newentries == NULL)
@@ -403,19 +412,25 @@
}
for (idx = 0; idx < size; ++idx)
- if (entries[idx].hashval != 0)
+ if (entries[idx].name != NULL)
enter (newentries, newsize, entries[idx].hashval,
entries[idx].name, entries[idx].sym,
entries[idx].map);
tab->free (entries);
tab->size = newsize;
+ size = newsize;
entries = tab->entries = newentries;
tab->free = free;
}
}
else
{
+#ifdef RTLD_CHECK_FOREIGN_CALL
+ /* This must not happen during runtime relocations. */
+ assert (!RTLD_CHECK_FOREIGN_CALL);
+#endif
+
#define INITIAL_NUNIQUE_SYM_TABLE 31
size = INITIAL_NUNIQUE_SYM_TABLE;
entries = calloc (sizeof (struct unique_sym), size);
@@ -427,7 +442,8 @@
tab->free = free;
}
- enter (entries, size, new_hash, strtab + sym->st_name, sym, map);
+ enter (entries, size, new_hash, strtab + sym->st_name, sym,
+ (struct link_map *) map);
++tab->n_elements;
__rtld_lock_unlock_recursive (tab->lock);
@@ -609,6 +625,10 @@
struct link_map_reldeps *newp;
unsigned int max
= undef_map->l_reldepsmax ? undef_map->l_reldepsmax * 2 : 10;
+
+#ifdef RTLD_PREPARE_FOREIGN_CALL
+ RTLD_PREPARE_FOREIGN_CALL;
+#endif
newp = malloc (sizeof (*newp) + max * sizeof (struct link_map *));
if (newp == NULL)
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -172,9 +172,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h Mon Nov 30 17:39:36 2009
@@ -59,6 +59,8 @@
#include_next <kernel-features.h>
-/* These syscalls are not implemented yet for ARM. */
-#undef __ASSUME_PSELECT
-#undef __ASSUME_PPOLL
+/* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32. */
+#if __LINUX_KERNEL_VERSION < 0x020620
+# undef __ASSUME_PSELECT
+# undef __ASSUME_PPOLL
+#endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h Mon Nov 30 17:39:36 2009
@@ -98,7 +98,7 @@
int ret; \
ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
/* Return 1 if it was already acquired. */ \
- (ret != oldval); \
+ (ret != (int)oldval); \
})
#else
# error __ASSUME_LWS_CAS is required to build glibc.
Modified: trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h Mon Nov 30 17:39:36 2009
@@ -64,7 +64,7 @@
{
struct __pthread_mutex_s
{
- int __lock;
+ int __lock __attribute__ ((aligned(16)));
unsigned int __count;
int __owner;
/* KIND must stay at this position in the structure to maintain
@@ -113,7 +113,7 @@
start of the 4-word lock structure, the next four words
are set all to 1 by the Linuxthreads
PTHREAD_COND_INITIALIZER. */
- int __lock;
+ int __lock __attribute__ ((aligned(16)));
/* Tracks the initialization of this structure:
0 initialized with NPTL PTHREAD_COND_INITIALIZER.
1 initialized with Linuxthreads PTHREAD_COND_INITIALIZER.
@@ -161,7 +161,7 @@
start of the 4-word 16-byte aligned lock structure. The
next four words are all set to 1 by the Linuxthreads
PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */
- int __compat_padding[4];
+ int __compat_padding[4] __attribute__ ((aligned(16)));
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -171,9 +171,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/stat.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/stat.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/stat.h Mon Nov 30 17:39:36 2009
@@ -61,7 +61,7 @@
#else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
#endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -107,7 +107,7 @@
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
+# if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -117,14 +117,14 @@
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-#else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# endif
__ino64_t st_ino; /* File serial number. */
};
#endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h Mon Nov 30 17:39:36 2009
@@ -185,9 +185,10 @@
/* Owner types. */
enum __pid_type
{
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_GID /* Process group. */
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
};
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/stat.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/stat.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/stat.h Mon Nov 30 17:39:36 2009
@@ -61,7 +61,7 @@
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
#endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -105,24 +105,24 @@
unsigned long int st_rdev; /* Device number, if device. */
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-#else
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# else
__time_t st_atime; /* Time of last access. */
long int __reserved0;
__time_t st_mtime; /* Time of last modification. */
long int __reserved1;
__time_t st_ctime; /* Time of last status change. */
long int __reserved2;
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
long int st_pad3;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
@@ -152,7 +152,7 @@
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
#endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -196,24 +196,24 @@
__dev_t st_rdev;
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
[... 41 lines stripped ...]