summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-11-24 16:24:59 +0100
committerAndreas Schwab <schwab@redhat.com>2009-11-24 16:24:59 +0100
commit13cada74709e88387c4f086d4042683f86e2e10f (patch)
tree2f264830ff2eab5de6216b6eab2a9206c65dd8d1
parent4909e83159d429b1fd9a679c78cba24e610fd5a6 (diff)
parent49c7f27194d16976a6bb9c5b7be186662ec7a6e6 (diff)
Merge remote branch 'origin/master' into fedora/master
-rw-r--r--ChangeLog140
-rw-r--r--Versions.def1
-rw-r--r--libio/libio.h14
-rw-r--r--locale/Makefile6
-rw-r--r--locale/duplocale.c6
-rw-r--r--locale/langinfo.h3
-rw-r--r--locale/tst-duplocale.c14
-rw-r--r--locale/tst-locname.c20
-rw-r--r--localedata/ChangeLog8
-rw-r--r--localedata/locales/en_DK53
-rw-r--r--localedata/locales/nl_NL52
-rw-r--r--manual/errno.texi6
-rw-r--r--nptl/ChangeLog27
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h55
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S56
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S15
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S254
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S223
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S31
-rw-r--r--nscd/connections.c7
-rw-r--r--posix/Makefile3
-rw-r--r--posix/bug-regex29.c1
-rw-r--r--posix/bug-regex30.c103
-rw-r--r--posix/regcomp.c2
-rw-r--r--sunrpc/create_xid.c12
-rw-r--r--sysdeps/gnu/errlist.c8
-rw-r--r--sysdeps/ia64/memchr.S11
-rw-r--r--sysdeps/unix/sysv/linux/Makefile6
-rw-r--r--sysdeps/unix/sysv/linux/Versions6
-rw-r--r--sysdeps/unix/sysv/linux/bits/errno.h6
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h12
-rw-r--r--sysdeps/unix/sysv/linux/bits/stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/fcntl.h13
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/mman.h21
-rw-r--r--sysdeps/unix/sysv/linux/i386/fallocate.c6
-rw-r--r--sysdeps/unix/sysv/linux/i386/fallocate64.c6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/fcntl.h13
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/mman.h22
-rw-r--r--sysdeps/unix/sysv/linux/ntp_gettime.c9
-rw-r--r--sysdeps/unix/sysv/linux/ntp_gettimex.c46
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h17
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/mman.h22
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/stat.h48
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c44
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/fcntl.h13
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/mman.h21
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/stat.h38
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/fcntl.h17
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/mman.h22
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/errno.h6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/fcntl.h13
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/mman.h24
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/stat.h18
-rw-r--r--sysdeps/unix/sysv/linux/sync_file_range.c10
-rw-r--r--sysdeps/unix/sysv/linux/sys/timex.h22
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h17
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/mman.h21
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/stat.h32
58 files changed, 979 insertions, 731 deletions
diff --git a/ChangeLog b/ChangeLog
index 001e1955da..3c4141e68c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,143 @@
+2009-11-23 Andreas Schwab <schwab@redhat.com>
+
+ * 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@redhat.com>
+
+ * 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@intel.com>
+
+ [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@redhat.com>
+
+ [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@redhat.com>
+
+ * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Change misleading names
+ of parameters of sync_file_range.
+ * 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-16 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range):
+ Implement using sync_file_range2 syscall if __NR_sync_file_range2
+ is defined.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c: New
+ file.
+
+2009-11-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * posix/bug-regex30.c: New file.
+ * posix/Makefile: Add rules to build and run bug-regex30.
+ * posix/regcomp.c (re_compile_fastmap_iter): Add all multibyte
+ character lead bytes when there is a range in a COMPLEX_BRACKET.
+ Reported by Oleg Bylatov.
+
+2009-11-17 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #10969]
+ * locale/duplocale.c (__duplocale): Handle LC_GLOBAL_LOCALE special.
+ * locale/tst-duplocale.c: New file.
+ * locale/Makefile (tests): Add tst-duplocale.
+
+ [BZ #10968]
+ * locale/langinfo.h (_NL_LOCALE_NAME): Correct definition.
+ Patch by Bruno Haible <bruno@clisp.org>.
+ * locale/tst-locname.c: New file.
+ * locale/Makefile (tests): Add tst-locname.
+
+ [BZ #10972]
+ * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Add new MADV_*
+ constants from recent kernels.
+ * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise.
+
+2009-11-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #10162]
+ * sysdeps/ia64/memchr.S: Use a simple loop on data shorter than
+ software pipeline.
+
+2009-11-09 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/unix/sysv/linux/i386/fallocate.c: Include errno.h.
+ (fallocate): Return ENOSYS if __NR_fallocate is not defined.
+ * sysdeps/unix/sysv/linux/i386/fallocate64.c: Likewise.
+
+2009-11-06 Mike Frysinger <vapier@gentoo.org>
+
+ * posix/bug-regex29.c: Include stdio.h.
+
+2009-11-14 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #10939]
+ * Versions.def: Define GLIBC_2.12 for libc.
+ * manual/errno.texi: Add ERFKILL entry.
+ * sysdeps/unix/sysv/linux/Versions: Add new errlist compat entries
+ for 2.12.
+ * sysdeps/unix/sysv/linux/bits/errno.h: Define ERFKILL is not done.
+ * sysdeps/unix/sysv/linux/sparc/bits/errno.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Update F_SETOWN_EX and
+ F_GETOWN_EX definitions according to corrected kernel definitions.
+ * 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-12 Ulrich Drepper <drepper@redhat.com>
* version.h: Bump for 2.12 development.
diff --git a/Versions.def b/Versions.def
index a8a9cd275e..70de1c14fc 100644
--- a/Versions.def
+++ b/Versions.def
@@ -28,6 +28,7 @@ libc {
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
+ GLIBC_2.12
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
diff --git a/libio/libio.h b/libio/libio.h
index 643812f72b..3c9f2bd3e8 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -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@cygnus.com>.
@@ -442,13 +442,15 @@ extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t);
#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
diff --git a/locale/Makefile b/locale/Makefile
index d9ab1947e7..2dbd8dc6a5 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,1992,1995-2003,2005 Free Software Foundation, Inc.
+# Copyright (C) 1991,1992,1995-2003,2005,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
@@ -38,7 +38,7 @@ distribute = localeinfo.h categories.def iso-639.def iso-3166.def \
routines = setlocale findlocale loadlocale loadarchive \
localeconv nl_langinfo nl_langinfo_l mb_cur_max \
newlocale duplocale freelocale uselocale
-tests = tst-C-locale
+tests = tst-C-locale tst-locname tst-duplocale
categories = ctype messages monetary numeric time paper name \
address telephone measurement identification collate
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
@@ -104,7 +104,7 @@ CFLAGS-charmap-dir.c = -Wno-write-strings
# This makes sure -DNOT_IN_libc is passed for all these modules.
cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
- $(locale-modules) $(lib-modules))
+ $(locale-modules) $(lib-modules))
lib := nonlib
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
diff --git a/locale/duplocale.c b/locale/duplocale.c
index 61782590d7..63513c539c 100644
--- a/locale/duplocale.c
+++ b/locale/duplocale.c
@@ -1,5 +1,5 @@
/* Duplicate handle for selection of locales.
- Copyright (C) 1997,2000,2001,2002,2005,2008 Free Software Foundation, Inc.
+ Copyright (C) 1997,2000-2002,2005,2008,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -37,6 +37,10 @@ __duplocale (__locale_t dataset)
if (dataset == _nl_C_locobj_ptr)
return dataset;
+ /* Handle a special value. */
+ if (dataset == LC_GLOBAL_LOCALE)
+ dataset = &_nl_global_locale;
+
__locale_t result;
int cnt;
size_t names_len = 0;
diff --git a/locale/langinfo.h b/locale/langinfo.h
index c940c743aa..0a53365071 100644
--- a/locale/langinfo.h
+++ b/locale/langinfo.h
@@ -568,7 +568,8 @@ enum
/* This macro produces an item you can pass to `nl_langinfo' or
`nl_langinfo_l' to get the name of the locale in use for CATEGORY. */
-#define _NL_LOCALE_NAME(category) _NL_ITEM ((category), -1)
+#define _NL_LOCALE_NAME(category) _NL_ITEM ((category), \
+ _NL_ITEM_INDEX (-1))
#ifdef __USE_GNU
# define NL_LOCALE_NAME(category) _NL_LOCALE_NAME (category)
#endif
diff --git a/locale/tst-duplocale.c b/locale/tst-duplocale.c
new file mode 100644
index 0000000000..53e5fbb8fe
--- /dev/null
+++ b/locale/tst-duplocale.c
@@ -0,0 +1,14 @@
+#include <locale.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+ locale_t d = duplocale (LC_GLOBAL_LOCALE);
+ if (d != (locale_t) 0)
+ freelocale (d);
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/locale/tst-locname.c b/locale/tst-locname.c
new file mode 100644
index 0000000000..7eb71adfd8
--- /dev/null
+++ b/locale/tst-locname.c
@@ -0,0 +1,20 @@
+#include <langinfo.h>
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+static int
+do_test (void)
+{
+ const char *s = nl_langinfo (_NL_LOCALE_NAME (LC_CTYPE));
+ if (s == NULL || strcmp (s, "C") != 0)
+ {
+ printf ("incorrect locale name returned: %s, expected \"C\"\n", s);
+ return 1;
+ }
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 4ddd35d681..077182b4c2 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-23 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/en_DK: Define week, first_weekday, and first_workday.
+
+2009-11-22 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/nl_NL: Define week, first_weekday, and first_workday.
+
2009-10-30 Ulrich Drepper <drepper@redhat.com>
* locales/it_CH: Fix typos in last change.
diff --git a/localedata/locales/en_DK b/localedata/locales/en_DK
index aa58763578..3ec5170558 100644
--- a/localedata/locales/en_DK
+++ b/localedata/locales/en_DK
@@ -85,34 +85,34 @@ END LC_NUMERIC
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 @@ t_fmt_ampm ""
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
diff --git a/localedata/locales/nl_NL b/localedata/locales/nl_NL
index 9719cec5f6..6f832927a3 100644
--- a/localedata/locales/nl_NL
+++ b/localedata/locales/nl_NL
@@ -88,33 +88,33 @@ END LC_NUMERIC
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 @@ t_fmt_ampm ""
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
diff --git a/manual/errno.texi b/manual/errno.texi
index fcba26750e..03a868e457 100644
--- a/manual/errno.texi
+++ b/manual/errno.texi
@@ -1265,6 +1265,12 @@ They are not yet documented.}
@comment errno ???/???
@end deftypevr
+@comment errno.h
+@comment Linux: Operation not possible due to RF-kill
+@deftypevr Macro int ERFKILL
+@comment errno ???/???
+@end deftypevr
+
@node Error Messages, , Error Codes, Error Reporting
@section Error Messages
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 709a04b61c..181af50038 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,30 @@
+2009-11-22 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
+ instead of recapitulating its contents.
+
+2009-11-18 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
+ optimizations and cleanups.
+
+2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
+
+ * 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@redhat.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
+ reduce size of unwind info.
+
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
+ cfi directives.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
+ Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
+
2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
[BZ #4457]
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h b/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
index a3b2c77c32..5216114a70 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
@@ -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 */
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
index f46b4b874a..40fb04b31b 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
@@ -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@redhat.com>, 2002.
@@ -35,16 +35,17 @@ __pthread_cond_broadcast:
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,32 +121,6 @@ __pthread_cond_broadcast:
cmpl $0xfffff001, %eax
jae 9f
-10: 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)
- .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)
@@ -161,11 +136,8 @@ __pthread_cond_broadcast:
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
@@ -186,7 +158,13 @@ __pthread_cond_broadcast:
call __lll_lock_wait
jmp 2b
- /* Unlock in loop requires waekup. */
+ .align 16
+ /* Unlock. */
+4: LOCK
+ subl $1, cond_lock-cond_futex(%ebx)
+ je 6b
+
+ /* Unlock in loop requires wakeup. */
5: leal cond_lock-cond_futex(%ebx), %eax
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
@@ -201,7 +179,7 @@ __pthread_cond_broadcast:
call __lll_unlock_wake
jmp 6b
- /* Unlock in loop requires waekup. */
+ /* Unlock in loop requires wakeup. */
7: leal cond_lock-cond_futex(%ebx), %eax
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
@@ -232,7 +210,7 @@ __pthread_cond_broadcast:
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,
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
index 4909f49107..013fcc303f 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
@@ -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@redhat.com>, 2002.
@@ -36,10 +36,11 @@ __pthread_cond_signal:
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 @@ __pthread_cond_signal:
/* 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 @@ __pthread_cond_signal:
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. */
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index 83f8db25bb..8f5088a460 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006-2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -34,14 +34,29 @@
.align 16
__pthread_cond_timedwait:
.LSTARTCODE:
+ cfi_startproc
+#ifdef SHARED
+ cfi_personality(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect,
+ DW.ref.__gcc_personality_v0)
+ cfi_lsda(DW_EH_PE_pcrel | DW_EH_PE_sdata4, .LexceptSTART)
+#else
+ cfi_personality(DW_EH_PE_udata4, __gcc_personality_v0)
+ cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
+#endif
+
pushl %ebp
-.Lpush_ebp:
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebp, 0)
pushl %edi
-.Lpush_edi:
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%edi, 0)
pushl %esi
-.Lpush_esi:
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%esi, 0)
pushl %ebx
-.Lpush_ebx:
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebx, 0)
+ cfi_remember_state
movl 20(%esp), %ebx
movl 28(%esp), %ebp
@@ -82,7 +97,7 @@ __pthread_cond_timedwait:
#define FRAME_SIZE 24
subl $FRAME_SIZE, %esp
-.Lsubl:
+ cfi_adjust_cfa_offset(FRAME_SIZE)
/* Get and store current wakeup_seq value. */
movl wakeup_seq(%ebx), %edi
@@ -273,7 +288,7 @@ __pthread_cond_timedwait:
11: movl 24+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
addl $FRAME_SIZE, %esp
-.Laddl:
+ cfi_adjust_cfa_offset(-FRAME_SIZE);
/* We return the result of the mutex_lock operation if it failed. */
testl %eax, %eax
@@ -286,19 +301,24 @@ __pthread_cond_timedwait:
#endif
18: popl %ebx
-.Lpop_ebx:
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebx)
popl %esi
-.Lpop_esi:
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%esi)
popl %edi
-.Lpop_edi:
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%edi)
popl %ebp
-.Lpop_ebp:
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebp)
ret
+ cfi_restore_state
+
/* Initial locking failed. */
1:
-.LSbl1:
#if cond_lock == 0
movl %ebx, %edx
#else
@@ -317,9 +337,17 @@ __pthread_cond_timedwait:
call __lll_lock_wait
jmp 2b
- /* Unlock in loop requires wakeup. */
-3:
-.LSbl2:
+ /* The initial unlocking of the mutex failed. */
+16:
+ LOCK
+#if cond_lock == 0
+ subl $1, (%ebx)
+#else
+ subl $1, cond_lock(%ebx)
+#endif
+ jne 18b
+
+ movl %eax, %esi
#if cond_lock == 0
movl %ebx, %eax
#else
@@ -336,14 +364,18 @@ __pthread_cond_timedwait:
addl $LLL_PRIVATE, %ecx
#endif
call __lll_unlock_wake
- jmp 4b
- /* Locking in loop failed. */
-5:
+ movl %esi, %eax
+ jmp 18b
+
+ cfi_adjust_cfa_offset(FRAME_SIZE)
+
+ /* Unlock in loop requires wakeup. */
+3:
#if cond_lock == 0
- movl %ebx, %edx
+ movl %ebx, %eax
#else
- leal cond_lock(%ebx), %edx
+ leal cond_lock(%ebx), %eax
#endif
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
@@ -355,15 +387,15 @@ __pthread_cond_timedwait:
#if LLL_PRIVATE != 0
addl $LLL_PRIVATE, %ecx
#endif
- call __lll_lock_wait
- jmp 6b
+ call __lll_unlock_wake
+ jmp 4b
- /* Unlock after loop requires wakeup. */
-10:
+ /* Locking in loop failed. */
+5:
#if cond_lock == 0
- movl %ebx, %eax
+ movl %ebx, %edx
#else
- leal cond_lock(%ebx), %eax
+ leal cond_lock(%ebx), %edx
#endif
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
@@ -375,21 +407,11 @@ __pthread_cond_timedwait:
#if LLL_PRIVATE != 0
addl $LLL_PRIVATE, %ecx
#endif
- call __lll_unlock_wake
- jmp 11b
-
- /* The initial unlocking of the mutex failed. */
-16:
-.LSbl3:
- LOCK
-#if cond_lock == 0
- subl $1, (%ebx)
-#else
- subl $1, cond_lock(%ebx)
-#endif
- jne 18b
+ call __lll_lock_wait
+ jmp 6b
- movl %eax, %esi
+ /* Unlock after loop requires wakeup. */
+10:
#if cond_lock == 0
movl %ebx, %eax
#else
@@ -406,13 +428,10 @@ __pthread_cond_timedwait:
addl $LLL_PRIVATE, %ecx
#endif
call __lll_unlock_wake
-
- movl %esi, %eax
- jmp 18b
+ jmp 11b
#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
/* clock_gettime not available. */
-.LSbl4:
19: leal 4(%esp), %ebx
xorl %ecx, %ecx
movl $__NR_gettimeofday, %eax
@@ -443,7 +462,6 @@ versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait,
.type __condvar_tw_cleanup2, @function
__condvar_tw_cleanup2:
subl $cond_futex, %ebx
-.LSbl5:
.size __condvar_tw_cleanup2, .-__condvar_tw_cleanup2
.type __condvar_tw_cleanup, @function
__condvar_tw_cleanup:
@@ -583,14 +601,15 @@ __condvar_tw_cleanup:
call _Unwind_Resume
hlt
.LENDCODE:
+ cfi_endproc
.size __condvar_tw_cleanup, .-__condvar_tw_cleanup
.section .gcc_except_table,"a",@progbits
.LexceptSTART:
- .byte 0xff # @LPStart format (omit)
- .byte 0xff # @TType format (omit)
- .byte 0x0b # call-site format
+ .byte DW_EH_PE_omit # @LPStart format (omit)
+ .byte DW_EH_PE_omit # @TType format (omit)
+ .byte DW_EH_PE_sdata4 # call-site format
# DW_EH_PE_sdata4
.uleb128 .Lcstend-.Lcstbegin
.Lcstbegin:
@@ -613,144 +632,13 @@ __condvar_tw_cleanup:
.Lcstend:
- .section .eh_frame,"a",@progbits
-.LSTARTFRAME:
- .long L(ENDCIE)-L(STARTCIE) # Length of the CIE.
-.LSTARTCIE:
- .long 0 # CIE ID.
- .byte 1 # Version number.
-#ifdef SHARED
- .string "zPLR" # NUL-terminated augmentation
- # string.
-#else
- .string "zPL" # NUL-terminated augmentation
- # string.
-#endif
- .uleb128 1 # Code alignment factor.
- .sleb128 -4 # Data alignment factor.
- .byte 8 # Return address register
- # column.
-#ifdef SHARED
- .uleb128 7 # Augmentation value length.
- .byte 0x9b # Personality: DW_EH_PE_pcrel
- # + DW_EH_PE_sdata4
- # + DW_EH_PE_indirect
- .long DW.ref.__gcc_personality_v0-.
- .byte 0x1b # LSDA Encoding: DW_EH_PE_pcrel
- # + DW_EH_PE_sdata4.
- .byte 0x1b # FDE Encoding: DW_EH_PE_pcrel
- # + DW_EH_PE_sdata4.
-#else
- .uleb128 6 # Augmentation value length.
- .byte 0x0 # Personality: absolute
- .long __gcc_personality_v0
- .byte 0x0 # LSDA Encoding: absolute
-#endif
- .byte 0x0c # DW_CFA_def_cfa
- .uleb128 4
- .uleb128 4
- .byte 0x88 # DW_CFA_offset, column 0x8
- .uleb128 1
- .align 4
-.LENDCIE:
-
- .long .LENDFDE-.LSTARTFDE # Length of the FDE.
-.LSTARTFDE:
- .long .LSTARTFDE-.LSTARTFRAME # CIE pointer.
-#ifdef SHARED
- .long .LSTARTCODE-. # PC-relative start address
- # of the code
-#else
- .long .LSTARTCODE # Start address of the code.
-#endif
- .long .LENDCODE-.LSTARTCODE # Length of the code.
- .uleb128 4 # Augmentation size
-#ifdef SHARED
- .long .LexceptSTART-.
-#else
- .long .LexceptSTART
-#endif
- .byte 0x40+.Lpush_ebp-.LSTARTCODE # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp
- .uleb128 2
- .byte 0x40+ .Lpush_edi-.Lpush_ebp # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 12
- .byte 0x87 # DW_CFA_offset %edi
- .uleb128 3
- .byte 0x40+.Lpush_esi-.Lpush_edi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16
- .byte 0x86 # DW_CFA_offset %esi
- .uleb128 4
- .byte 0x40+.Lpush_ebx-.Lpush_esi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 20
- .byte 0x83 # DW_CFA_offset %ebx
- .uleb128 5
- .byte 4 # DW_CFA_advance_loc4
- .4byte .Lsubl-.Lpush_ebx
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 20+FRAME_SIZE
- .byte 4 # DW_CFA_advance_loc4
- .4byte .Laddl-.Lsubl
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 20
- .byte 0x40+.Lpop_ebx-.Laddl # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16
- .byte 0xc3 # DW_CFA_restore %ebx
- .byte 0x40+.Lpop_esi-.Lpop_ebx # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 12
- .byte 0xc6 # DW_CFA_restore %esi
- .byte 0x40+.Lpop_edi-.Lpop_esi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 8
- .byte 0xc7 # DW_CFA_restore %edi
- .byte 0x40+.Lpop_ebp-.Lpop_edi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 4
- .byte 0xc5 # DW_CFA_restore %ebp
- .byte 0x40+.LSbl1-.Lpop_edi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 20
- .byte 4 # DW_CFA_advance_loc4
- .4byte .LSbl2-.LSbl1
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 20+FRAME_SIZE
- .byte 0x85 # DW_CFA_offset %ebp
- .uleb128 2
- .byte 0x87 # DW_CFA_offset %edi
- .uleb128 3
- .byte 0x86 # DW_CFA_offset %esi
- .uleb128 4
- .byte 0x83 # DW_CFA_offset %ebx
- .uleb128 5
- .byte 4 # DW_CFA_advance_loc4
- .4byte .LSbl3-.LSbl2
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 20
- .byte 4 # DW_CFA_advance_loc4
-#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
- .4byte .LSbl4-.LSbl3
-#else
- .4byte .LSbl5-.LSbl3
-#endif
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 20+FRAME_SIZE
- .align 4
-.LENDFDE:
-
#ifdef SHARED
.hidden DW.ref.__gcc_personality_v0
- .weak DW.ref.__gcc_personality_v0
+ .weak DW.ref.__gcc_personality_v0
.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
- .align 4
- .type DW.ref.__gcc_personality_v0, @object
- .size DW.ref.__gcc_personality_v0, 4
+ .align 4
+ .type DW.ref.__gcc_personality_v0, @object
+ .size DW.ref.__gcc_personality_v0, 4
DW.ref.__gcc_personality_v0:
.long __gcc_personality_v0
#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index 5b301979b5..776b95e40c 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006-2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -33,13 +33,26 @@
.align 16
__pthread_cond_wait:
.LSTARTCODE:
+ cfi_startproc
+#ifdef SHARED
+ cfi_personality(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect,
+ DW.ref.__gcc_personality_v0)
+ cfi_lsda(DW_EH_PE_pcrel | DW_EH_PE_sdata4, .LexceptSTART)
+#else
+ cfi_personality(DW_EH_PE_udata4, __gcc_personality_v0)
+ cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
+#endif
pushl %edi
-.Lpush_edi:
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%edi, 0)
pushl %esi
-.Lpush_esi:
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%esi, 0)
pushl %ebx
-.Lpush_ebx:
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebx, 0)
+ cfi_remember_state
xorl %esi, %esi
movl 16(%esp), %ebx
@@ -76,7 +89,7 @@ __pthread_cond_wait:
#define FRAME_SIZE 16
subl $FRAME_SIZE, %esp
-.Lsubl:
+ cfi_adjust_cfa_offset(FRAME_SIZE)
/* Get and store current wakeup_seq value. */
movl wakeup_seq(%ebx), %edi
@@ -202,21 +215,25 @@ __pthread_cond_wait:
11: movl 20+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
addl $FRAME_SIZE, %esp
-.Laddl:
+ cfi_adjust_cfa_offset(-FRAME_SIZE);
14: popl %ebx
-.Lpop_ebx:
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebx)
popl %esi
-.Lpop_esi:
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%esi)
popl %edi
-.Lpop_edi:
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%edi)
/* We return the result of the mutex_lock operation. */
ret
+ cfi_restore_state
+
/* Initial locking failed. */
1:
-.LSbl1:
#if cond_lock == 0
movl %ebx, %edx
#else
@@ -235,9 +252,17 @@ __pthread_cond_wait:
call __lll_lock_wait
jmp 2b
- /* Unlock in loop requires waekup. */
-3:
-.LSbl2:
+ /* The initial unlocking of the mutex failed. */
+12:
+ LOCK
+#if cond_lock == 0
+ subl $1, (%ebx)
+#else
+ subl $1, cond_lock(%ebx)
+#endif
+ jne 14b
+
+ movl %eax, %esi
#if cond_lock == 0
movl %ebx, %eax
#else
@@ -254,14 +279,18 @@ __pthread_cond_wait:
addl $LLL_PRIVATE, %ecx
#endif
call __lll_unlock_wake
- jmp 4b
- /* Locking in loop failed. */
-5:
+ movl %esi, %eax
+ jmp 14b
+
+ cfi_adjust_cfa_offset(FRAME_SIZE)
+
+ /* Unlock in loop requires wakeup. */
+3:
#if cond_lock == 0
- movl %ebx, %edx
+ movl %ebx, %eax
#else
- leal cond_lock(%ebx), %edx
+ leal cond_lock(%ebx), %eax
#endif
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
@@ -273,15 +302,15 @@ __pthread_cond_wait:
#if LLL_PRIVATE != 0
addl $LLL_PRIVATE, %ecx
#endif
- call __lll_lock_wait
- jmp 6b
+ call __lll_unlock_wake
+ jmp 4b
- /* Unlock after loop requires wakeup. */
-10:
+ /* Locking in loop failed. */
+5:
#if cond_lock == 0
- movl %ebx, %eax
+ movl %ebx, %edx
#else
- leal cond_lock(%ebx), %eax
+ leal cond_lock(%ebx), %edx
#endif
#if (LLL_SHARED-LLL_PRIVATE) > 255
xorl %ecx, %ecx
@@ -293,21 +322,11 @@ __pthread_cond_wait:
#if LLL_PRIVATE != 0
addl $LLL_PRIVATE, %ecx
#endif
- call __lll_unlock_wake
- jmp 11b
-
- /* The initial unlocking of the mutex failed. */
-12:
-.LSbl3:
- LOCK
-#if cond_lock == 0
- subl $1, (%ebx)
-#else
- subl $1, cond_lock(%ebx)
-#endif
- jne 14b
+ call __lll_lock_wait
+ jmp 6b
- movl %eax, %esi
+ /* Unlock after loop requires wakeup. */
+10:
#if cond_lock == 0
movl %ebx, %eax
#else
@@ -324,9 +343,7 @@ __pthread_cond_wait:
addl $LLL_PRIVATE, %ecx
#endif
call __lll_unlock_wake
-
- movl %esi, %eax
- jmp 14b
+ jmp 11b
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -475,14 +492,15 @@ __condvar_w_cleanup:
call _Unwind_Resume
hlt
.LENDCODE:
+ cfi_endproc
.size __condvar_w_cleanup, .-__condvar_w_cleanup
.section .gcc_except_table,"a",@progbits
.LexceptSTART:
- .byte 0xff # @LPStart format (omit)
- .byte 0xff # @TType format (omit)
- .byte 0x0b # call-site format
+ .byte DW_EH_PE_omit # @LPStart format (omit)
+ .byte DW_EH_PE_omit # @TType format (omit)
+ .byte DW_EH_PE_sdata4 # call-site format
# DW_EH_PE_sdata4
.uleb128 .Lcstend-.Lcstbegin
.Lcstbegin:
@@ -504,123 +522,6 @@ __condvar_w_cleanup:
.uleb128 0
.Lcstend:
- .section .eh_frame,"a",@progbits
-.LSTARTFRAME:
- .long L(ENDCIE)-L(STARTCIE) # Length of the CIE.
-.LSTARTCIE:
- .long 0 # CIE ID.
- .byte 1 # Version number.
-#ifdef SHARED
- .string "zPLR" # NUL-terminated augmentation
- # string.
-#else
- .string "zPL" # NUL-terminated augmentation
- # string.
-#endif
- .uleb128 1 # Code alignment factor.
- .sleb128 -4 # Data alignment factor.
- .byte 8 # Return address register
- # column.
-#ifdef SHARED
- .uleb128 7 # Augmentation value length.
- .byte 0x9b # Personality: DW_EH_PE_pcrel
- # + DW_EH_PE_sdata4
- # + DW_EH_PE_indirect
- .long DW.ref.__gcc_personality_v0-.
- .byte 0x1b # LSDA Encoding: DW_EH_PE_pcrel
- # + DW_EH_PE_sdata4.
- .byte 0x1b # FDE Encoding: DW_EH_PE_pcrel
- # + DW_EH_PE_sdata4.
-#else
- .uleb128 6 # Augmentation value length.
- .byte 0x0 # Personality: absolute
- .long __gcc_personality_v0
- .byte 0x0 # LSDA Encoding: absolute
-#endif
- .byte 0x0c # DW_CFA_def_cfa
- .uleb128 4
- .uleb128 4
- .byte 0x88 # DW_CFA_offset, column 0x8
- .uleb128 1
- .align 4
-.LENDCIE:
-
- .long .LENDFDE-.LSTARTFDE # Length of the FDE.
-.LSTARTFDE:
- .long .LSTARTFDE-.LSTARTFRAME # CIE pointer.
-#ifdef SHARED
- .long .LSTARTCODE-. # PC-relative start address
- # of the code.
-#else
- .long .LSTARTCODE # Start address of the code.
-#endif
- .long .LENDCODE-.LSTARTCODE # Length of the code.
- .uleb128 4 # Augmentation size
-#ifdef SHARED
- .long .LexceptSTART-.
-#else
- .long .LexceptSTART
-#endif
- .byte 0x40+.Lpush_edi-.LSTARTCODE # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 8
- .byte 0x87 # DW_CFA_offset %edi
- .uleb128 2
- .byte 0x40+.Lpush_esi-.Lpush_edi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 12
- .byte 0x86 # DW_CFA_offset %esi
- .uleb128 3
- .byte 0x40+.Lpush_ebx-.Lpush_esi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16
- .byte 0x83 # DW_CFA_offset %ebx
- .uleb128 4
- .byte 4 # DW_CFA_advance_loc4
- .4byte .Lsubl-.Lpush_ebx
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16+FRAME_SIZE
- .byte 4 # DW_CFA_advance_loc4
- .4byte .Laddl-.Lsubl
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16
- .byte 0x40+ .Lpop_ebx-.Laddl # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 12
- .byte 0xc3 # DW_CFA_restore %ebx
- .byte 0x40+.Lpop_esi-.Lpop_ebx # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 8
- .byte 0xc6 # DW_CFA_restore %esi
- .byte 0x40+.Lpop_edi-.Lpop_esi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 4
- .byte 0xc7 # DW_CFA_restore %edi
- .byte 0x40+.LSbl1-.Lpop_edi # DW_CFA_advance_loc+N
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16
- .byte 0x87 # DW_CFA_offset %edi
- .uleb128 2
- .byte 0x86 # DW_CFA_offset %esi
- .uleb128 3
- .byte 0x83 # DW_CFA_offset %ebx
- .uleb128 4
- .byte 4 # DW_CFA_advance_loc4
- .4byte .LSbl2-.LSbl1
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16+FRAME_SIZE
- .byte 4 # DW_CFA_advance_loc4
- .4byte .LSbl3-.LSbl2
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16
- .byte 4 # DW_CFA_advance_loc4
- .4byte .LSbl4-.LSbl3
- .byte 14 # DW_CFA_def_cfa_offset
- .uleb128 16+FRAME_SIZE
- .align 4
-.LENDFDE:
-
-
#ifdef PIC
.section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits
.globl __i686.get_pc_thunk.cx
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 86bdac1b1b..be14fc897e 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -69,6 +69,7 @@ __pthread_cond_timedwait:
#endif
subq $FRAME_SIZE, %rsp
cfi_adjust_cfa_offset(FRAME_SIZE)
+ cfi_remember_state
cmpq $1000000000, 8(%rdx)
movl $EINVAL, %eax
@@ -77,19 +78,19 @@ __pthread_cond_timedwait:
/* Stack frame:
rsp + 48
- +--------------------------+
+ +--------------------------+
rsp + 32 | timeout value |
- +--------------------------+
+ +--------------------------+
rsp + 24 | old wake_seq value |
- +--------------------------+
+ +--------------------------+
rsp + 16 | mutex pointer |
- +--------------------------+
+ +--------------------------+
rsp + 8 | condvar pointer |
- +--------------------------+
+ +--------------------------+
rsp + 4 | old broadcast_seq value |
- +--------------------------+
+ +--------------------------+
rsp + 0 | old cancellation mode |
- +--------------------------+
+ +--------------------------+
*/
cmpq $-1, dep_mutex(%rdi)
@@ -317,11 +318,7 @@ __pthread_cond_timedwait:
retq
- cfi_adjust_cfa_offset(4 * 8 + FRAME_SIZE)
- cfi_rel_offset(%r12, FRAME_SIZE + 24)
- cfi_rel_offset(%r13, FRAME_SIZE + 16)
- cfi_rel_offset(%r14, FRAME_SIZE + 8)
- cfi_rel_offset(%r15, FRAME_SIZE)
+ cfi_restore_state
64: callq __pthread_mutex_cond_lock_adjust
movq %r14, %rax
@@ -650,15 +647,15 @@ __condvar_cleanup2:
rsp + 48 | %r14 |
+--------------------------+
rsp + 24 | unused |
- +--------------------------+
+ +--------------------------+
rsp + 16 | mutex pointer |
- +--------------------------+
+ +--------------------------+
rsp + 8 | condvar pointer |
- +--------------------------+
+ +--------------------------+
rsp + 4 | old broadcast_seq value |
- +--------------------------+
+ +--------------------------+
rsp + 0 | old cancellation mode |
- +--------------------------+
+ +--------------------------+
*/
movq %rax, 24(%rsp)
diff --git a/nscd/connections.c b/nscd/connections.c
index ca73393f40..69f6533a32 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1426,15 +1426,14 @@ cannot change to old working directory: %s; disabling paranoia mode"),
#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"),
diff --git a/posix/Makefile b/posix/Makefile
index c0164effa8..535ed1474d 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -82,7 +82,7 @@ tests := tstgetopt testfnm runtests runptests \
bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
- bug-regex29 \
+ bug-regex29 bug-regex30 \
tst-nice tst-nanosleep tst-regex2 \
transbug tst-rxspencer tst-pcre tst-boost \
bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
@@ -195,6 +195,7 @@ bug-regex22-ENV = LOCPATH=$(common-objpfx)localedata
bug-regex23-ENV = LOCPATH=$(common-objpfx)localedata
bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata
bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata
+bug-regex30-ENV = LOCPATH=$(common-objpfx)localedata
tst-rxspencer-ARGS = --utf8 rxspencer/tests
tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata
tst-pcre-ARGS = PCRE.tests
diff --git a/posix/bug-regex29.c b/posix/bug-regex29.c
index bd796c6c2a..cfc9f99dbc 100644
--- a/posix/bug-regex29.c
+++ b/posix/bug-regex29.c
@@ -1,4 +1,5 @@
#include <regex.h>
+#include <stdio.h>
static int
do_test (void)
diff --git a/posix/bug-regex30.c b/posix/bug-regex30.c
new file mode 100644
index 0000000000..43df64d9d3
--- /dev/null
+++ b/posix/bug-regex30.c
@@ -0,0 +1,103 @@
+/* Russian regular expression tests.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Paolo Bonzini <pbonzini@redhat.com>, 2009.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+#include <mcheck.h>
+#include <regex.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+
+/* Tests supposed to match. */
+struct
+{
+ const char *pattern;
+ const char *string;
+ int flags, nmatch;
+ regmatch_t rm[5];
+} tests[] = {
+ /* U+0413 \xd0\x93 CYRILLIC CAPITAL LETTER GHE
+ U+0420 \xd0\xa0 CYRILLIC CAPITAL LETTER ER
+ U+0430 \xd0\xb0 CYRILLIC SMALL LETTER A
+ U+0433 \xd0\xb3 CYRILLIC SMALL LETTER GHE
+ U+0440 \xd1\x80 CYRILLIC SMALL LETTER ER
+ U+044F \xd1\x8f CYRILLIC SMALL LETTER YA */
+ { "[\xd0\xb0-\xd1\x8f]", "\xd0\xb3", 0, 1,
+ { { 0, 2 } } },
+ { "[\xd0\xb0-\xd1\x8f]", "\xd0\x93", REG_ICASE, 1,
+ { { 0, 2 } } },
+ { "[\xd1\x80-\xd1\x8f]", "\xd0\xa0", REG_ICASE, 1,
+ { { 0, 2 } } },
+};
+
+
+static int
+do_test (void)
+{
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+ {
+ puts ("setlocale failed");
+ return 1;
+ }
+
+ int ret = 0;
+
+ for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
+ {
+ regex_t re;
+ regmatch_t rm[5];
+ int n = regcomp (&re, tests[i].pattern, tests[i].flags);
+ if (n != 0)
+ {
+ char buf[500];
+ regerror (n, &re, buf, sizeof (buf));
+ printf ("regcomp %zd failed: %s\n", i, buf);
+ ret = 1;
+ continue;
+ }
+
+ if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
+ {
+ printf ("regexec %zd failed\n", i);
+ ret = 1;
+ regfree (&re);
+ continue;
+ }
+
+ for (n = 0; n < tests[i].nmatch; ++n)
+ if (rm[n].rm_so != tests[i].rm[n].rm_so
+ || rm[n].rm_eo != tests[i].rm[n].rm_eo)
+ {
+ if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
+ break;
+ printf ("regexec match failure rm[%d] %d..%d\n",
+ n, rm[n].rm_so, rm[n].rm_eo);
+ ret = 1;
+ break;
+ }
+
+ regfree (&re);
+ }
+
+ return ret;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 446fed5445..6966b5da3c 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -377,7 +377,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
applies to multibyte character sets; for single byte character
sets, the SIMPLE_BRACKET again suffices. */
if (dfa->mb_cur_max > 1
- && (cset->nchar_classes || cset->non_match
+ && (cset->nchar_classes || cset->non_match || cset->nranges
# ifdef _LIBC
|| cset->nequiv_classes
# endif /* _LIBC */
diff --git a/sunrpc/create_xid.c b/sunrpc/create_xid.c
index 4e76918644..c247568cee 100644
--- a/sunrpc/create_xid.c
+++ b/sunrpc/create_xid.c
@@ -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@vt.uni-paderborn.de>, 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 @@ _create_xid (void)
__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);
diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c
index 56da01756d..28a295fc67 100644
--- a/sysdeps/gnu/errlist.c
+++ b/sysdeps/gnu/errlist.c
@@ -1456,6 +1456,14 @@ TRANS error; @pxref{Cancel AIO Operations}. */
# define ERR_MAX ENOTRECOVERABLE
# endif
#endif
+#ifdef ERFKILL
+/* */
+ [ERR_REMAP (ERFKILL)] = N_("Operation not possible due to RF-kill"),
+# if ERFKILL > ERR_MAX
+# undef ERR_MAX
+# define ERR_MAX ERFKILL
+# endif
+#endif
};
#define NERR \
diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S
index cd062b2dd5..cdd71ca5a5 100644
--- a/sysdeps/ia64/memchr.S
+++ b/sysdeps/ia64/memchr.S
@@ -126,7 +126,16 @@ ENTRY(__memchr)
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:
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index cee5d29255..91c123b2b3 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -84,8 +84,8 @@ endif
$(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h $(+force)
$(make-target-directory)
if test -r $@ && cmp -s $< $@; \
- then echo 'bits/syscall.h unchanged'; \
- else $(INSTALL_DATA) $< $@; fi
+ then echo 'bits/syscall.h unchanged'; \
+ else $(INSTALL_DATA) $< $@; fi
ifndef no_deps
# Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
@@ -97,7 +97,7 @@ endif
ifeq ($(subdir),time)
sysdep_headers += sys/timex.h
-sysdep_routines += ntp_gettime
+sysdep_routines += ntp_gettime ntp_gettimex
endif
ifeq ($(subdir),socket)
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 2b5f2fb03c..50c70513ff 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -141,6 +141,12 @@ libc {
GLIBC_2.10 {
fallocate;
}
+ GLIBC_2.12 {
+ #errlist-compat 134
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+
+ ntp_gettimex;
+ }
GLIBC_PRIVATE {
# functions used in other libraries
__syscall_rt_sigqueueinfo;
diff --git a/sysdeps/unix/sysv/linux/bits/errno.h b/sysdeps/unix/sysv/linux/bits/errno.h
index 4de8cbba57..1f3d7af7e1 100644
--- a/sysdeps/unix/sysv/linux/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. Linux specific version.
- Copyright (C) 1996, 1997, 1998, 1999, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999, 2005, 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
@@ -38,6 +38,10 @@
# define ENOTRECOVERABLE 131
# endif
+# ifndef ERFKILL
+# define ERFKILL 132
+# endif
+
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 95d05b4ab2..18269a99b9 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -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.
@@ -154,7 +154,7 @@ typedef struct
(__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 +167,8 @@ typedef struct
# 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 +180,8 @@ typedef struct
# 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) \
diff --git a/sysdeps/unix/sysv/linux/bits/stat.h b/sysdeps/unix/sysv/linux/bits/stat.h
index e6a5b6afbf..be5272333b 100644
--- a/sysdeps/unix/sysv/linux/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/bits/stat.h
@@ -60,7 +60,7 @@ struct stat
#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 @@ struct stat64
__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 stat64
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
diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
index 6a38dc03fe..f57a461b67 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
@@ -92,8 +92,8 @@
#ifdef __USE_GNU
# define F_SETSIG 10 /* Set number of signal to be sent. */
# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */
+# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -172,9 +172,10 @@ struct flock64
/* 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. */
@@ -237,7 +238,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h
index 2b90c8d7d5..22aa401e02 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/i386 version.
- Copyright (C) 1997, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,2000,2003,2005,2006,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
@@ -84,14 +84,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate.c b/sysdeps/unix/sysv/linux/i386/fallocate.c
index 7a943e44c0..14e788386c 100644
--- a/sysdeps/unix/sysv/linux/i386/fallocate.c
+++ b/sysdeps/unix/sysv/linux/i386/fallocate.c
@@ -16,6 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
@@ -28,5 +29,10 @@ extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
int
fallocate (int fd, int mode, __off_t offset, __off_t len)
{
+#ifdef __NR_fallocate
return __call_fallocate (fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
}
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate64.c b/sysdeps/unix/sysv/linux/i386/fallocate64.c
index 4998f5e644..85f315c9b6 100644
--- a/sysdeps/unix/sysv/linux/i386/fallocate64.c
+++ b/sysdeps/unix/sysv/linux/i386/fallocate64.c
@@ -16,6 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
@@ -28,5 +29,10 @@ extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
int
fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
{
+#ifdef __NR_fallocate
return __call_fallocate (fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
}
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
index 9a0245a6c4..a98ca3a208 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
@@ -88,8 +88,8 @@
#ifdef __USE_GNU
# define F_SETSIG 10 /* Set number of signal to be sent. */
# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */
+# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -165,9 +165,10 @@ struct flock64
/* 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. */
@@ -231,7 +232,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
index a27a30fc0c..1b278c79ee 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/ia64 version.
- Copyright (C) 1997,1998,2000,2003,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2003,2005,2006,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
@@ -84,14 +85,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/ntp_gettime.c b/sysdeps/unix/sysv/linux/ntp_gettime.c
index f78f1682fa..8bae0d9f6f 100644
--- a/sysdeps/unix/sysv/linux/ntp_gettime.c
+++ b/sysdeps/unix/sysv/linux/ntp_gettime.c
@@ -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,8 +16,12 @@
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
#endif
@@ -27,8 +31,7 @@ extern int INTUSE(__adjtimex) (struct timex *__ntx);
int
-ntp_gettime (ntv)
- struct ntptimeval *ntv;
+ntp_gettime (struct ntptimeval *ntv)
{
struct timex tntx;
int result;
diff --git a/sysdeps/unix/sysv/linux/ntp_gettimex.c b/sysdeps/unix/sysv/linux/ntp_gettimex.c
new file mode 100644
index 0000000000..ed7851b6fd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ntp_gettimex.c
@@ -0,0 +1,46 @@
+/* Copyright (C) 1999, 2002, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/timex.h>
+
+#ifndef MOD_OFFSET
+# define modes mode
+#endif
+
+
+extern int INTUSE(__adjtimex) (struct timex *__ntx);
+
+
+int
+ntp_gettimex (struct ntptimeval *ntv)
+{
+ struct timex tntx;
+ int result;
+
+ tntx.modes = 0;
+ result = INTUSE(__adjtimex) (&tntx);
+ ntv->time = tntx.time;
+ ntv->maxerror = tntx.maxerror;
+ ntv->esterror = tntx.esterror;
+ ntv->tai = tntx.tai;
+ ntv->__unused1 = 0;
+ ntv->__unused2 = 0;
+ ntv->__unused3 = 0;
+ ntv->__unused4 = 0;
+ return result;
+}
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index 6c4b66b7ac..010483a945 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
@@ -85,15 +85,15 @@
#define F_SETLKW64 14 /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_UNIX98
-# define F_SETOWN 8 /* Get owner (process receiving of SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving of SIGIO). */
+# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
+# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
#endif
#ifdef __USE_GNU
# define F_SETSIG 10 /* Set number of signal to be sent. */
# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */
+# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -172,9 +172,10 @@ struct flock64
/* 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. */
@@ -237,7 +238,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
index d5729a1f1c..e6580f8220 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/PowerPC version.
- Copyright (C) 1997,2000,2003,2005,2006,2008 Free Software Foundation, Inc.
+ Copyright (C) 1997,2000,2003,2005,2006,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
@@ -85,14 +86,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/stat.h b/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
index b6c82c55bb..81879ca1fe 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
@@ -69,7 +69,7 @@ struct stat
# 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
@@ -79,17 +79,17 @@ struct stat
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;
};
@@ -109,7 +109,7 @@ struct stat64
__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
+# 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
@@ -119,17 +119,17 @@ struct stat64
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;
};
@@ -163,7 +163,7 @@ struct stat
# 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
@@ -173,17 +173,17 @@ struct stat
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;
unsigned long int __unused6;
@@ -203,7 +203,7 @@ struct stat64
__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
+# 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
@@ -213,17 +213,17 @@ struct stat64
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;
unsigned long int __unused6;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
new file mode 100644
index 0000000000..1ca4ce66df
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
@@ -0,0 +1,44 @@
+/* Selective file content synch'ing.
+ Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+
+#if defined __NR_sync_file_range2
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+}
+#else
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (sync_file_range)
+
+# include <stub-tag.h>
+#endif
diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index d3dddbc368..8815eca868 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -107,8 +107,8 @@
#ifdef __USE_GNU
# define F_SETSIG 10 /* Set number of signal to be sent. */
# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */
+# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -187,9 +187,10 @@ struct flock64
/* 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. */
@@ -257,7 +258,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
diff --git a/sysdeps/unix/sysv/linux/s390/bits/mman.h b/sysdeps/unix/sysv/linux/s390/bits/mman.h
index d25531c282..daeafd48ff 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/s390 version.
- Copyright (C) 2000,2001,2002,2003,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003,2005,2006,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
@@ -84,14 +84,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/s390/bits/stat.h b/sysdeps/unix/sysv/linux/s390/bits/stat.h
index c062498556..64be9a10fd 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/stat.h
@@ -56,7 +56,7 @@ struct stat
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,7 +109,7 @@ struct stat
# 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
@@ -119,17 +119,17 @@ struct stat
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
# ifndef __USE_FILE_OFFSET64
unsigned long int __unused4;
unsigned long int __unused5;
@@ -153,7 +153,7 @@ struct stat64
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
@@ -163,17 +163,17 @@ struct stat64
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
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
long int __unused[3];
@@ -195,7 +195,7 @@ struct stat64
__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
@@ -205,17 +205,17 @@ struct stat64
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
__ino64_t st_ino; /* File serial number. */
};
# endif
diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
index d7a21ea2e2..f57a461b67 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
@@ -85,15 +85,15 @@
#define F_SETLKW64 14 /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_UNIX98
-# define F_SETOWN 8 /* Get owner (process receiving of SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving of SIGIO). */
+# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
+# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
#endif
#ifdef __USE_GNU
# define F_SETSIG 10 /* Set number of signal to be sent. */
# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 12 /* Get owner (thread receiving of SIGIO). */
-# define F_GETOWN_EX 13 /* Set owner (thread receiving of SIGIO). */
+# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -172,9 +172,10 @@ struct flock64
/* 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. */
@@ -237,7 +238,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
diff --git a/sysdeps/unix/sysv/linux/sh/bits/mman.h b/sysdeps/unix/sysv/linux/sh/bits/mman.h
index 7a6b572a4e..aee0011255 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/SH version.
- Copyright (C) 1997,1999,2000,2003,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2000,2003,2005,2006,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
@@ -83,14 +84,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/errno.h b/sysdeps/unix/sysv/linux/sparc/bits/errno.h
index 02e200c088..2b9265a1dc 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. Linux/Sparc specific version.
- Copyright (C) 1996,1997,1998,1999,2002,2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999,2002,2005,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
@@ -37,6 +37,10 @@
# define ENOTRECOVERABLE 133
# endif
+# ifndef ERFKILL
+# define ERFKILL 134
+# endif
+
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index dfa848a377..08c5c999fb 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -99,8 +99,8 @@
#ifdef __USE_GNU
# define F_SETSIG 10 /* Set number of signal to be sent. */
# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_GETOWN_EX 12 /* Get owner (thread receiving SIGIO). */
-# define F_SETOWN_EX 13 /* Set owner (thread receiving SIGIO). */
+# define F_SETOWN_EX 15 /* Set owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Get owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -191,9 +191,10 @@ struct flock64
/* 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. */
@@ -256,7 +257,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
index be2b7eb280..71a3aa6a30 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/SPARC version.
- Copyright (C) 1997,1999,2000,2003,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2000,2003,2005,2006,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
@@ -85,15 +86,18 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_FREE 5 /* Content can be freed (Solaris). */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_FREE 5 /* Content can be freed (Solaris). */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/stat.h b/sysdeps/unix/sysv/linux/sparc/bits/stat.h
index 7426e16806..175fdb8570 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/stat.h
@@ -60,7 +60,7 @@ struct stat
#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 stat
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 @@ struct stat64
__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 stat64
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;
};
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
index 4e267a1602..41e08e0281 100644
--- a/sysdeps/unix/sysv/linux/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/sync_file_range.c
@@ -1,5 +1,5 @@
/* Selective file content synch'ing.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 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
@@ -34,6 +34,14 @@ sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
__LONG_LONG_PAIR ((long) (to >> 32), (long) to),
flags);
}
+#elif defined __NR_sync_file_range2
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ return INLINE_SYSCALL (sync_file_range2, 6, fd, flags,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to));
+}
#else
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h
index 5f10c7fa4c..e10311f70f 100644
--- a/sysdeps/unix/sysv/linux/sys/timex.h
+++ b/sysdeps/unix/sysv/linux/sys/timex.h
@@ -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 @@ struct timex
#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 @@ struct timex
#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 @@ __BEGIN_DECLS
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
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
index c3eb859e7d..f5dfd8b0b9 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
@@ -99,15 +99,15 @@
#endif
#if defined __USE_BSD || defined __USE_UNIX98
-# define F_SETOWN 8 /* Get owner (process receiving of SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving of SIGIO). */
+# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
+# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
#endif
#ifdef __USE_GNU
# define F_SETSIG 10 /* Set number of signal to be sent. */
# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 12 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 13 /* Set owner (thread receiving SIGIO). */
+# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -186,9 +186,10 @@ struct flock64
/* 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. */
@@ -251,7 +252,7 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
index 7810682536..3dcbf9c317 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/x86_64 version.
- Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2006, 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
@@ -85,14 +85,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h b/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
index 51367b2fc1..9d12315e1a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
@@ -78,7 +78,7 @@ struct stat
#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 stat
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 stat64
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