summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-11-17 21:12:24 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-11-17 21:12:24 +0000
commit32e19dcfa79d2446ed03b2c2cf7d1dc7dbf906a9 (patch)
treeb6b66f4b6cf0cd589b729c7778b22f2287c6725d /libc
parent3aa2fca83c692488b4abc729068c183891971d3d (diff)
Merge changes between r9240 and r9280 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@9281 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc')
-rw-r--r--libc/ChangeLog58
-rw-r--r--libc/Versions.def1
-rw-r--r--libc/locale/Makefile6
-rw-r--r--libc/locale/duplocale.c6
-rw-r--r--libc/locale/langinfo.h3
-rw-r--r--libc/manual/errno.texi6
-rw-r--r--libc/posix/bug-regex29.c1
-rw-r--r--libc/sysdeps/gnu/errlist.c8
-rw-r--r--libc/sysdeps/ia64/memchr.S3
-rw-r--r--libc/sysdeps/unix/sysv/linux/Versions4
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/errno.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/mman.h21
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/fallocate.c6
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/fallocate64.c6
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h22
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h8
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/bits/mman.h22
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/bits/mman.h21
-rw-r--r--libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h8
-rw-r--r--libc/sysdeps/unix/sysv/linux/sh/bits/mman.h22
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/bits/errno.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/bits/mman.h24
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h8
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h21
28 files changed, 221 insertions, 92 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index 743121f7a..b92fd42c9 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,3 +1,61 @@
+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/libc/Versions.def b/libc/Versions.def
index a8a9cd275..70de1c14f 100644
--- a/libc/Versions.def
+++ b/libc/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/libc/locale/Makefile b/libc/locale/Makefile
index 5af71e597..f0e657dec 100644
--- a/libc/locale/Makefile
+++ b/libc/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
@@ -48,7 +48,7 @@ routines-$(OPTION_EGLIBC_LOCALE_CODE) \
ifneq (y,$(OPTION_EGLIBC_LOCALE_CODE))
routines-y += dummy-setlocale
endif
-tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-C-locale
+tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-C-locale tst-locname tst-duplocale
categories = ctype messages monetary numeric time paper name \
address telephone measurement identification collate
# C-messages belongs in an intl option group.
@@ -123,7 +123,7 @@ endif
# 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/libc/locale/duplocale.c b/libc/locale/duplocale.c
index 61782590d..63513c539 100644
--- a/libc/locale/duplocale.c
+++ b/libc/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/libc/locale/langinfo.h b/libc/locale/langinfo.h
index c940c743a..0a5336507 100644
--- a/libc/locale/langinfo.h
+++ b/libc/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/libc/manual/errno.texi b/libc/manual/errno.texi
index fcba26750..03a868e45 100644
--- a/libc/manual/errno.texi
+++ b/libc/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/libc/posix/bug-regex29.c b/libc/posix/bug-regex29.c
index bd796c6c2..cfc9f99db 100644
--- a/libc/posix/bug-regex29.c
+++ b/libc/posix/bug-regex29.c
@@ -1,4 +1,5 @@
#include <regex.h>
+#include <stdio.h>
static int
do_test (void)
diff --git a/libc/sysdeps/gnu/errlist.c b/libc/sysdeps/gnu/errlist.c
index 56da01756..28a295fc6 100644
--- a/libc/sysdeps/gnu/errlist.c
+++ b/libc/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/libc/sysdeps/ia64/memchr.S b/libc/sysdeps/ia64/memchr.S
index cd062b2dd..e721e1714 100644
--- a/libc/sysdeps/ia64/memchr.S
+++ b/libc/sysdeps/ia64/memchr.S
@@ -71,7 +71,8 @@ ENTRY(__memchr)
cmp.ne p7, p0 = r0, r0 // clear p7
extr.u chr = in1, 0, 8 // chr = (unsigned char) in1
mov len = in2
- cmp.gtu p6, p0 = 16, in2 // use a simple loop for short
+ // use a simple loop on data shorter than software pipeline
+ cmp.gtu p6, p0 = ((MEMLAT + 1) * 8), in2
(p6) br.cond.spnt .srchfew ;; // searches
sub loopcnt = 8, tmp // loopcnt = 8 - tmp
cmp.eq p6, p0 = tmp, r0
diff --git a/libc/sysdeps/unix/sysv/linux/Versions b/libc/sysdeps/unix/sysv/linux/Versions
index 2b5f2fb03..4c9129bed 100644
--- a/libc/sysdeps/unix/sysv/linux/Versions
+++ b/libc/sysdeps/unix/sysv/linux/Versions
@@ -141,6 +141,10 @@ libc {
GLIBC_2.10 {
fallocate;
}
+ GLIBC_2.12 {
+ #errlist-compat 134
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
GLIBC_PRIVATE {
# functions used in other libraries
__syscall_rt_sigqueueinfo;
diff --git a/libc/sysdeps/unix/sysv/linux/bits/errno.h b/libc/sysdeps/unix/sysv/linux/bits/errno.h
index 4de8cbba5..1f3d7af7e 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/errno.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
index 6a38dc03f..a6db8a86b 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+++ b/libc/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
diff --git a/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h b/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h
index 2b90c8d7d..22aa401e0 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/i386/fallocate.c b/libc/sysdeps/unix/sysv/linux/i386/fallocate.c
index 7a943e44c..14e788386 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/fallocate.c
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/i386/fallocate64.c b/libc/sysdeps/unix/sysv/linux/i386/fallocate64.c
index 4998f5e64..85f315c9b 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/fallocate64.c
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
index 9a0245a6c..51c5329ac 100644
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ b/libc/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
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h
index a27a30fc0..1b278c79e 100644
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index 6c4b66b7a..4bdaf7bd0 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/libc/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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/libc/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
index d5729a1f1..e6580f822 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index d3dddbc36..0af0f93f1 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/libc/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
diff --git a/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h b/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h
index d25531c28..daeafd48f 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
index d7a21ea2e..a6db8a86b 100644
--- a/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ b/libc/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
diff --git a/libc/sysdeps/unix/sysv/linux/sh/bits/mman.h b/libc/sysdeps/unix/sysv/linux/sh/bits/mman.h
index 7a6b572a4..aee001125 100644
--- a/libc/sysdeps/unix/sysv/linux/sh/bits/mman.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/sparc/bits/errno.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/errno.h
index 02e200c08..2b9265a1d 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/bits/errno.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index dfa848a37..ad4f48e67 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/libc/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
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/mman.h
index be2b7eb28..71a3aa6a3 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/libc/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/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
index c3eb859e7..6e96885d5 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ b/libc/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
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
index 781068253..3dcbf9c31 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ b/libc/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. */