summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--ports/ChangeLog.arm11
-rw-r--r--ports/ChangeLog.hppa52
-rw-r--r--ports/ChangeLog.m68k10
-rw-r--r--ports/ChangeLog.mips16
-rw-r--r--ports/sysdeps/hppa/dl-fptr.h20
-rw-r--r--ports/sysdeps/hppa/elf/start.S14
-rw-r--r--ports/sysdeps/m68k/libgcc_s.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h4
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/bits/mman.h22
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/Versions3
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h21
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h407
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h5
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c145
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c66
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h21
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/errno.h4
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h4
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/mman.h21
47 files changed, 812 insertions, 349 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. */
diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 58bfada3c..a95704b40 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,14 @@
+2009-11-17 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #10972]
+ * sysdeps/unix/sysv/linux/arm/bits/mman.h: Add new MADV_*
+ constants from recent kernels.
+
+2009-11-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN_EX,
+ F_GETOWN_EX): Update values.
+
2009-11-06 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (fallocate): Fix types
diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa
index 77227b08b..dbd0ed559 100644
--- a/ports/ChangeLog.hppa
+++ b/ports/ChangeLog.hppa
@@ -1,3 +1,55 @@
+2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
+
+ [BZ #6676]
+
+ * sysdeps/unix/sysv/linux/hppa/socket.h: Move from here...
+ * sysdeps/unix/sysv/linux/hppa/bits/socket.h: ... to here.
+
+2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add
+ fallocate64@@GLIBC_2.11.
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+ [__USE_GNU]: Define F_GETOWN_EX, and F_SETOWN_EX.
+ [!__USE_FILE_OFFSET64]: Define fallocate.
+ [__USE_FILE_OFFSET64 && __REDIRECT]: Define __REDIRECT.
+ [__USE_FILE_OFFSET64 && !__REDIRECT]: Define fallocate as
+ fallocate64.
+ [__USE_LARGEFILE64]: define fallocate64.
+
+2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/hppa/dl-fptr.h: Update copyright year.
+ Reduce ELF_MACHINE_BOOT_FPTR_TABLE_LEN to 64.
+ Implement ELF_MACHINE_LOAD_ADDRESS using PC relative loads.
+
+2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:
+ Remove FUTEX_WAITERS, FUTEX_OWNER_DIED, and FUTEX_TID_MASK.
+
+2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
+ Aurelian Jarno <aurelien@aurel32.net>
+
+ [BZ #10527]
+
+ * sysdeps/unix/sysv/linux/hppa/socket.h: New file.
+
+2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
+
+ [BZ #6676]
+
+ * sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations
+ to support -fPIE.
+
+2009-11-08 Carlos O'Donell <carlos@codesourcery.com>
+
+ [BZ #10920]
+
+ * sysdeps/hppa/libgcc_s.h: New file.
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Remove.
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Remove.
+
2009-09-08 Carlos O'Donell <carlos@codesourcery.com>
sysdeps/unix/sysv/linux/hppa/
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index 6d8c26f03..4dc4f41b1 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,13 @@
+2009-11-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/libgcc_s.h: New file.
+
+2009-11-14 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN_EX)
+ (F_GETOWN_EX, F_OWNER_TID, F_OWNER_PID, F_OWNER_GID, f_owner_ex):
+ Define.
+
2009-11-07 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (fallocate): Fix types
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index e7a051811..f45572417 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,19 @@
+2009-11-17 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #10972]
+ * sysdeps/unix/sysv/linux/mips/bits/mman.h: Add new MADV_*
+ constants from recent kernels.
+
+2009-11-17 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/errno.h (ERFKILL): Define if
+ not already defined.
+
+2009-11-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN_EX,
+ F_GETOWN_EX): Update values.
+
2009-11-06 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (fallocate): Fix types
diff --git a/ports/sysdeps/hppa/dl-fptr.h b/ports/sysdeps/hppa/dl-fptr.h
index 2ac9740e3..798ee8c96 100644
--- a/ports/sysdeps/hppa/dl-fptr.h
+++ b/ports/sysdeps/hppa/dl-fptr.h
@@ -1,5 +1,5 @@
/* Function descriptors. HPPA version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,14 +22,16 @@
#include <sysdeps/generic/dl-fptr.h>
-/* There are currently 20 dynamic symbols in ld.so.
+/* There are currently 33 dynamic symbols in ld.so.
ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */
-#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 200
-
-#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \
- asm (" addil LT%%" #symbol ", %%r19\n" \
- " ldw RT%%" #symbol "(%%sr0,%%r1), %0\n" \
- : "=&r" (var));
-
+#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 64
+
+#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \
+ asm ( \
+" b,l 1f,%0\n" \
+" depi 0,31,2,%0\n" \
+"1: addil L'" #symbol " - ($PIC_pcrel$0 - 8),%0\n" \
+" ldo R'" #symbol " - ($PIC_pcrel$0 - 12)(%%r1),%0\n" \
+ : "=&r" (var) : : "r1");
#endif /* !dl_hppa_fptr_h */
diff --git a/ports/sysdeps/hppa/elf/start.S b/ports/sysdeps/hppa/elf/start.S
index 216b14d5c..c682e9cf7 100644
--- a/ports/sysdeps/hppa/elf/start.S
+++ b/ports/sysdeps/hppa/elf/start.S
@@ -1,5 +1,5 @@
/* ELF startup code for HPPA.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 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
@@ -96,16 +96,16 @@ _start:
#if SHARED
/* load main (1st argument) */
- addil LR'.Lpmain, %r19
- ldw RR'.Lpmain(%r1), %r26
+ addil LT'.Lpmain, %r19
+ ldw RT'.Lpmain(%r1), %r26
ldw 0(%r26),%r26
/* void (*init) (void) (4th argument) */
- addil LR'.Lp__libc_csu_init, %r19
- ldw RR'.Lp__libc_csu_init(%r1), %r23
+ addil LT'.Lp__libc_csu_init, %r19
+ ldw RT'.Lp__libc_csu_init(%r1), %r23
ldw 0(%r23), %r23
/* void (*fini) (void) (5th argument) */
- addil LR'.Lp__libc_csu_fini, %r19
- ldw RR'.Lp__libc_csu_fini(%r1), %r22
+ addil LT'.Lp__libc_csu_fini, %r19
+ ldw RT'.Lp__libc_csu_fini(%r1), %r22
ldw 0(%r22), %r22
#else
/* load main (1st argument) */
diff --git a/ports/sysdeps/m68k/libgcc_s.h b/ports/sysdeps/m68k/libgcc_s.h
index 2fb8c44fd..8523ad135 100644
--- a/ports/sysdeps/m68k/libgcc_s.h
+++ b/ports/sysdeps/m68k/libgcc_s.h
@@ -1,2 +1,2 @@
-/* Name of libgcc_s library provided by gcc. */
+/* Name of libgcc_s library provided by gcc, m68k version. */
#define LIBGCC_S_SO "libgcc_s.so.2"
diff --git a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 638890485..e4b6187f9 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/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/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h b/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
index 828ec944c..0240aed8a 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/ARM 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
@@ -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/ports/sysdeps/unix/sysv/linux/hppa/Versions b/ports/sysdeps/unix/sysv/linux/hppa/Versions
index 234c0baa6..3dbc9ac50 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/Versions
+++ b/ports/sysdeps/unix/sysv/linux/hppa/Versions
@@ -20,6 +20,9 @@ libc {
#errlist-compat 256
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
+ GLIBC_2.11 {
+ fallocate64;
+ }
}
librt {
GLIBC_2.3 {
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index ffc55a5a8..a0b0e07b0 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -89,6 +89,8 @@
#ifdef __USE_GNU
# define F_SETSIG 13 /* Set number of signal to be sent. */
# define F_GETSIG 14 /* Get number of signal to be sent. */
+# define F_GETOWN_EX 15
+# define F_SETOWN_EX 16
#endif
#ifdef __USE_GNU
@@ -220,7 +222,24 @@ extern ssize_t splice (int __fdin, __off64_t *offin, int __fdout,
/* In-kernel implementation of tee for pipe buffers. */
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
-
+
+/* Reserve storage for the data of the file associated with FD. */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
+ fallocate64);
+# else
+# define fallocate fallocate64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len);
+# endif
+
#endif
__END_DECLS
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h
new file mode 100644
index 000000000..ac6e81b0f
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h
@@ -0,0 +1,407 @@
+/* System-specific socket constants and types. Linux version.
+ Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 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
+ 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. */
+
+#ifndef __BITS_SOCKET_H
+#define __BITS_SOCKET_H
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+#endif
+
+#define __need_size_t
+#include <stddef.h>
+
+#include <sys/types.h>
+
+/* Type for length arguments in socket calls. */
+#ifndef __socklen_t_defined
+typedef __socklen_t socklen_t;
+# define __socklen_t_defined
+#endif
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
+#define SOCK_DCCP SOCK_DCCP
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+
+ /* Flags to be ORed into the type parameter of socket and socketpair and
+ used for the flags parameter of paccept. */
+
+ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+#undef SOCK_NONBLOCK
+ SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
+};
+
+/* Protocol families. */
+#define PF_UNSPEC 0 /* Unspecified. */
+#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
+#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */
+#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
+#define PF_INET 2 /* IP protocol family. */
+#define PF_AX25 3 /* Amateur Radio AX.25. */
+#define PF_IPX 4 /* Novell Internet Protocol. */
+#define PF_APPLETALK 5 /* Appletalk DDP. */
+#define PF_NETROM 6 /* Amateur radio NetROM. */
+#define PF_BRIDGE 7 /* Multiprotocol bridge. */
+#define PF_ATMPVC 8 /* ATM PVCs. */
+#define PF_X25 9 /* Reserved for X.25 project. */
+#define PF_INET6 10 /* IP version 6. */
+#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
+#define PF_DECnet 12 /* Reserved for DECnet project. */
+#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
+#define PF_SECURITY 14 /* Security callback pseudo AF. */
+#define PF_KEY 15 /* PF_KEY key management API. */
+#define PF_NETLINK 16
+#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
+#define PF_PACKET 17 /* Packet family. */
+#define PF_ASH 18 /* Ash. */
+#define PF_ECONET 19 /* Acorn Econet. */
+#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_RDS 21 /* RDS sockets. */
+#define PF_SNA 22 /* Linux SNA Project */
+#define PF_IRDA 23 /* IRDA sockets. */
+#define PF_PPPOX 24 /* PPPoX sockets. */
+#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_LLC 26 /* Linux LLC. */
+#define PF_CAN 29 /* Controller Area Network. */
+#define PF_TIPC 30 /* TIPC sockets. */
+#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
+#define PF_IUCV 32 /* IUCV sockets. */
+#define PF_RXRPC 33 /* RxRPC sockets. */
+#define PF_ISDN 34 /* mISDN sockets. */
+#define PF_PHONET 35 /* Phonet sockets. */
+#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
+#define PF_MAX 37 /* For now.. */
+
+/* Address families. */
+#define AF_UNSPEC PF_UNSPEC
+#define AF_LOCAL PF_LOCAL
+#define AF_UNIX PF_UNIX
+#define AF_FILE PF_FILE
+#define AF_INET PF_INET
+#define AF_AX25 PF_AX25
+#define AF_IPX PF_IPX
+#define AF_APPLETALK PF_APPLETALK
+#define AF_NETROM PF_NETROM
+#define AF_BRIDGE PF_BRIDGE
+#define AF_ATMPVC PF_ATMPVC
+#define AF_X25 PF_X25
+#define AF_INET6 PF_INET6
+#define AF_ROSE PF_ROSE
+#define AF_DECnet PF_DECnet
+#define AF_NETBEUI PF_NETBEUI
+#define AF_SECURITY PF_SECURITY
+#define AF_KEY PF_KEY
+#define AF_NETLINK PF_NETLINK
+#define AF_ROUTE PF_ROUTE
+#define AF_PACKET PF_PACKET
+#define AF_ASH PF_ASH
+#define AF_ECONET PF_ECONET
+#define AF_ATMSVC PF_ATMSVC
+#define AF_RDS PF_RDS
+#define AF_SNA PF_SNA
+#define AF_IRDA PF_IRDA
+#define AF_PPPOX PF_PPPOX
+#define AF_WANPIPE PF_WANPIPE
+#define AF_LLC PF_LLC
+#define AF_CAN PF_CAN
+#define AF_TIPC PF_TIPC
+#define AF_BLUETOOTH PF_BLUETOOTH
+#define AF_IUCV PF_IUCV
+#define AF_RXRPC PF_RXRPC
+#define AF_ISDN PF_ISDN
+#define AF_PHONET PF_PHONET
+#define AF_IEEE802154 PF_IEEE802154
+#define AF_MAX PF_MAX
+
+/* Socket level values. Others are defined in the appropriate headers.
+
+ XXX These definitions also should go into the appropriate headers as
+ far as they are available. */
+#define SOL_RAW 255
+#define SOL_DECNET 261
+#define SOL_X25 262
+#define SOL_PACKET 263
+#define SOL_ATM 264 /* ATM layer (cell level). */
+#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
+#define SOL_IRDA 266
+
+/* Maximum queue length specifiable by listen. */
+#define SOMAXCONN 128
+
+/* Get the definition of the macro to define the common sockaddr members. */
+#include <bits/sockaddr.h>
+
+/* Structure describing a generic socket address. */
+struct sockaddr
+ {
+ __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
+ char sa_data[14]; /* Address data. */
+ };
+
+
+/* Structure large enough to hold any socket address (with the historical
+ exception of AF_UNIX). We reserve 128 bytes. */
+#define __ss_aligntype unsigned long int
+#define _SS_SIZE 128
+#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
+
+struct sockaddr_storage
+ {
+ __SOCKADDR_COMMON (ss_); /* Address family, etc. */
+ __ss_aligntype __ss_align; /* Force desired alignment. */
+ char __ss_padding[_SS_PADSIZE];
+ };
+
+
+/* Bits in the FLAGS argument to `send', `recv', et al. */
+enum
+ {
+ MSG_OOB = 0x01, /* Process out-of-band data. */
+#define MSG_OOB MSG_OOB
+ MSG_PEEK = 0x02, /* Peek at incoming messages. */
+#define MSG_PEEK MSG_PEEK
+ MSG_DONTROUTE = 0x04, /* Don't use local routing. */
+#define MSG_DONTROUTE MSG_DONTROUTE
+#ifdef __USE_GNU
+ /* DECnet uses a different name. */
+ MSG_TRYHARD = MSG_DONTROUTE,
+# define MSG_TRYHARD MSG_DONTROUTE
+#endif
+ MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
+#define MSG_CTRUNC MSG_CTRUNC
+ MSG_PROXY = 0x10, /* Supply or ask second address. */
+#define MSG_PROXY MSG_PROXY
+ MSG_TRUNC = 0x20,
+#define MSG_TRUNC MSG_TRUNC
+ MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
+#define MSG_DONTWAIT MSG_DONTWAIT
+ MSG_EOR = 0x80, /* End of record. */
+#define MSG_EOR MSG_EOR
+ MSG_WAITALL = 0x100, /* Wait for a full request. */
+#define MSG_WAITALL MSG_WAITALL
+ MSG_FIN = 0x200,
+#define MSG_FIN MSG_FIN
+ MSG_SYN = 0x400,
+#define MSG_SYN MSG_SYN
+ MSG_CONFIRM = 0x800, /* Confirm path validity. */
+#define MSG_CONFIRM MSG_CONFIRM
+ MSG_RST = 0x1000,
+#define MSG_RST MSG_RST
+ MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
+#define MSG_ERRQUEUE MSG_ERRQUEUE
+ MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
+#define MSG_NOSIGNAL MSG_NOSIGNAL
+ MSG_MORE = 0x8000, /* Sender will send more. */
+#define MSG_MORE MSG_MORE
+
+ MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
+ descriptor received through
+ SCM_RIGHTS. */
+#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
+ };
+
+
+/* Structure describing messages sent by
+ `sendmsg' and received by `recvmsg'. */
+struct msghdr
+ {
+ void *msg_name; /* Address to send to/receive from. */
+ socklen_t msg_namelen; /* Length of address data. */
+
+ struct iovec *msg_iov; /* Vector of data to send/receive into. */
+ size_t msg_iovlen; /* Number of elements in the vector. */
+
+ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
+ size_t msg_controllen; /* Ancillary data buffer length.
+ !! The type should be socklen_t but the
+ definition of the kernel is incompatible
+ with this. */
+
+ int msg_flags; /* Flags on received message. */
+ };
+
+/* Structure used for storage of ancillary data object information. */
+struct cmsghdr
+ {
+ size_t cmsg_len; /* Length of data in cmsg_data plus length
+ of cmsghdr structure.
+ !! The type should be socklen_t but the
+ definition of the kernel is incompatible
+ with this. */
+ int cmsg_level; /* Originating protocol. */
+ int cmsg_type; /* Protocol specific type. */
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+ __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
+#endif
+ };
+
+/* Ancillary data object manipulation macros. */
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+#else
+# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+#endif
+#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
+#define CMSG_FIRSTHDR(mhdr) \
+ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
+ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
+#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
+ & (size_t) ~(sizeof (size_t) - 1))
+#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+#ifdef __USE_EXTERN_INLINES
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE __extern_inline
+# endif
+_EXTERN_INLINE struct cmsghdr *
+__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+{
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+ /* The kernel header does this so there may be a reason. */
+ return 0;
+
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+ if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+ + __mhdr->msg_controllen)
+ || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+ > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+ /* No more entries. */
+ return 0;
+ return __cmsg;
+}
+#endif /* Use `extern inline'. */
+
+/* Socket level message types. This must match the definitions in
+ <linux/socket.h>. */
+enum
+ {
+ SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
+#define SCM_RIGHTS SCM_RIGHTS
+#ifdef __USE_GNU
+ , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
+# define SCM_CREDENTIALS SCM_CREDENTIALS
+#endif
+ };
+
+#ifdef __USE_GNU
+/* User visible structure for SCM_CREDENTIALS message */
+struct ucred
+{
+ pid_t pid; /* PID of sending process. */
+ uid_t uid; /* UID of sending process. */
+ gid_t gid; /* GID of sending process. */
+};
+#endif
+
+/* Ugly workaround for unclean kernel headers. */
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifndef FIOGETOWN
+# define __SYS_SOCKET_H_undef_FIOGETOWN
+# endif
+# ifndef FIOSETOWN
+# define __SYS_SOCKET_H_undef_FIOSETOWN
+# endif
+# ifndef SIOCATMARK
+# define __SYS_SOCKET_H_undef_SIOCATMARK
+# endif
+# ifndef SIOCGPGRP
+# define __SYS_SOCKET_H_undef_SIOCGPGRP
+# endif
+# ifndef SIOCGSTAMP
+# define __SYS_SOCKET_H_undef_SIOCGSTAMP
+# endif
+# ifndef SIOCGSTAMPNS
+# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# endif
+# ifndef SIOCSPGRP
+# define __SYS_SOCKET_H_undef_SIOCSPGRP
+# endif
+#endif
+
+/* Get socket manipulation related informations from kernel headers. */
+#include <asm/socket.h>
+
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
+# undef __SYS_SOCKET_H_undef_FIOGETOWN
+# undef FIOGETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
+# undef __SYS_SOCKET_H_undef_FIOSETOWN
+# undef FIOSETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
+# undef __SYS_SOCKET_H_undef_SIOCATMARK
+# undef SIOCATMARK
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
+# undef __SYS_SOCKET_H_undef_SIOCGPGRP
+# undef SIOCGPGRP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
+# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
+# undef SIOCGSTAMP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# undef SIOCGSTAMPNS
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
+# undef __SYS_SOCKET_H_undef_SIOCSPGRP
+# undef SIOCSPGRP
+# endif
+#endif
+
+/* Structure used to manipulate the SO_LINGER option. */
+struct linger
+ {
+ int l_onoff; /* Nonzero to linger on close. */
+ int l_linger; /* Time to linger. */
+ };
+
+#endif /* bits/socket.h */
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index 10be11a01..b6f692329 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -48,11 +48,6 @@
#define FUTEX_BITSET_MATCH_ANY 0xffffffff
-/* Bits used in robust mutex implementation. */
-#define FUTEX_WAITERS 0x80000000
-#define FUTEX_OWNER_DIED 0x40000000
-#define FUTEX_TID_MASK 0x3fffffff
-
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
reversed before passing to the system call. */
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
deleted file mode 100644
index e0eef901d..000000000
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>.
-
- 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; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <dlfcn.h>
-#include <stdio.h>
-#include <unwind.h>
-#include <pthreadP.h>
-#include <sysdep.h>
-
-static void *libgcc_s_handle;
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-static _Unwind_Reason_Code (*libgcc_s_personality)
- (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
- struct _Unwind_Context *);
-static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
- (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
-static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
-
-#define LIBGCC_S_SO "libgcc_s.so.4"
-
-void
-__attribute_noinline__
-pthread_cancel_init (void)
-{
- void *resume;
- void *personality;
- void *forcedunwind;
- void *getcfa;
- void *handle;
-
- if (__builtin_expect (libgcc_s_handle != NULL, 1))
- {
- /* Force gcc to reload all values. */
- asm volatile ("" ::: "memory");
- return;
- }
-
- handle = __libc_dlopen (LIBGCC_S_SO);
-
- if (handle == NULL
- || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
- || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL
- || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind"))
- == NULL
- || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL
-#ifdef ARCH_CANCEL_INIT
- || ARCH_CANCEL_INIT (handle)
-#endif
- )
- __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n");
-
- PTR_MANGLE (resume);
- libgcc_s_resume = resume;
- PTR_MANGLE (personality);
- libgcc_s_personality = personality;
- PTR_MANGLE (forcedunwind);
- libgcc_s_forcedunwind = forcedunwind;
- PTR_MANGLE (getcfa);
- libgcc_s_getcfa = getcfa;
- /* Make sure libgcc_s_handle is written last. Otherwise,
- pthread_cancel_init might return early even when the pointer the
- caller is interested in is not initialized yet. */
- atomic_write_barrier ();
- libgcc_s_handle = handle;
-}
-
-void
-__libc_freeres_fn_section
-__unwind_freeres (void)
-{
- void *handle = libgcc_s_handle;
- if (handle != NULL)
- {
- libgcc_s_handle = NULL;
- __libc_dlclose (handle);
- }
-}
-
-void
-_Unwind_Resume (struct _Unwind_Exception *exc)
-{
- if (__builtin_expect (libgcc_s_handle == NULL, 0))
- pthread_cancel_init ();
-
- void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume;
- PTR_DEMANGLE (resume);
- resume (exc);
-}
-
-_Unwind_Reason_Code
-__gcc_personality_v0 (int version, _Unwind_Action actions,
- _Unwind_Exception_Class exception_class,
- struct _Unwind_Exception *ue_header,
- struct _Unwind_Context *context)
-{
- if (__builtin_expect (libgcc_s_handle == NULL, 0))
- pthread_cancel_init ();
-
- _Unwind_Reason_Code (*personality)
- (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
- struct _Unwind_Context *) = libgcc_s_personality;
- PTR_DEMANGLE (personality);
- return personality (version, actions, exception_class, ue_header, context);
-}
-
-_Unwind_Reason_Code
-_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
- void *stop_argument)
-{
- if (__builtin_expect (libgcc_s_handle == NULL, 0))
- pthread_cancel_init ();
-
- _Unwind_Reason_Code (*forcedunwind)
- (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
- = libgcc_s_forcedunwind;
- PTR_DEMANGLE (forcedunwind);
- return forcedunwind (exc, stop, stop_argument);
-}
-
-_Unwind_Word
-_Unwind_GetCFA (struct _Unwind_Context *context)
-{
- if (__builtin_expect (libgcc_s_handle == NULL, 0))
- pthread_cancel_init ();
-
- _Unwind_Word (*getcfa) (struct _Unwind_Context *) = libgcc_s_getcfa;
- PTR_DEMANGLE (getcfa);
- return getcfa (context);
-}
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
deleted file mode 100644
index a31ba1aea..000000000
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (C) 2003, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>.
-
- 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; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <dlfcn.h>
-#include <stdio.h>
-#include <unwind.h>
-
-#define LIBGCC_S_SO "libgcc_s.so.4"
-
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-static _Unwind_Reason_Code (*libgcc_s_personality)
- (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
- struct _Unwind_Context *);
-
-static void
-init (void)
-{
- void *resume, *personality;
- void *handle;
-
- handle = __libc_dlopen (LIBGCC_S_SO);
-
- if (handle == NULL
- || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
- || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
- __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n");
-
- libgcc_s_resume = resume;
- libgcc_s_personality = personality;
-}
-
-void
-_Unwind_Resume (struct _Unwind_Exception *exc)
-{
- if (__builtin_expect (libgcc_s_resume == NULL, 0))
- init ();
- libgcc_s_resume (exc);
-}
-
-_Unwind_Reason_Code
-__gcc_personality_v0 (int version, _Unwind_Action actions,
- _Unwind_Exception_Class exception_class,
- struct _Unwind_Exception *ue_header,
- struct _Unwind_Context *context)
-{
- if (__builtin_expect (libgcc_s_personality == NULL, 0))
- init ();
- return libgcc_s_personality (version, actions, exception_class,
- ue_header, context);
-}
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 3d9ef2e57..6fc7a0aeb 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2000, 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2004, 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
@@ -91,6 +91,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 15 /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
#ifdef __USE_GNU
@@ -165,6 +167,23 @@ struct flock64
};
#endif
+#ifdef __USE_GNU
+/* Owner types. */
+enum __pid_type
+ {
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_GID /* Process group. */
+ };
+
+/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
+struct f_owner_ex
+ {
+ enum __pid_type type; /* Owner type of ID. */
+ __pid_t pid; /* ID of owner. */
+ };
+#endif
+
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/errno.h b/ports/sysdeps/unix/sysv/linux/mips/bits/errno.h
index 5ff11c0e7..62b952cda 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -38,6 +38,10 @@
# define ENOTRECOVERABLE 166
# endif
+# ifndef ERFKILL
+# define ERFKILL 167
+# endif
+
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 88f752db6..6fa74dd84 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -94,8 +94,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/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 47d33933a..f639e0464 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006
+ Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -86,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. */