* [gentoo-commits] gentoo commit in src/patchsets/glibc/2.10.1: 6020_all_alpha-fix-gcc-4.1-warnings.patch 6021_all_alpha-add-dl-procinfo-support.patch 6022_alpha_alpha-add-fdatasync-support.patch 6023_all_alpha-add-getsystats-support.patch 6024_all_alpha-fix-includes.patch 6025_all_alpha-add-futex-defines.patch 6026_all_alpha-fix-rtld-fPIC.patch 6027_all_alpha-fix-memchr.patch 6028_all_alpha-fix-SOCK_NONBLOCK.patch README.history
@ 2009-10-30 4:56 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2009-10-30 4:56 UTC (permalink / raw
To: gentoo-commits
vapier 09/10/30 04:56:08
Modified: README.history
Added: 6020_all_alpha-fix-gcc-4.1-warnings.patch
6021_all_alpha-add-dl-procinfo-support.patch
6022_alpha_alpha-add-fdatasync-support.patch
6023_all_alpha-add-getsystats-support.patch
6024_all_alpha-fix-includes.patch
6025_all_alpha-add-futex-defines.patch
6026_all_alpha-fix-rtld-fPIC.patch
6027_all_alpha-fix-memchr.patch
6028_all_alpha-fix-SOCK_NONBLOCK.patch
Log:
import alpha patches from various locations #289642 by Matt Turner
Revision Changes Path
1.4 src/patchsets/glibc/2.10.1/README.history
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/README.history?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/README.history?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/README.history?r1=1.3&r2=1.4
Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.10.1/README.history,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README.history 18 Sep 2009 15:11:30 -0000 1.3
+++ README.history 30 Oct 2009 04:56:07 -0000 1.4
@@ -1,3 +1,14 @@
+4 30.10.2009
+ + 6020_all_alpha-fix-gcc-4.1-warnings.patch
+ + 6021_all_alpha-add-dl-procinfo-support.patch
+ + 6022_alpha_alpha-add-fdatasync-support.patch
+ + 6023_all_alpha-add-getsystats-support.patch
+ + 6024_all_alpha-fix-includes.patch
+ + 6025_all_alpha-add-futex-defines.patch
+ + 6026_all_alpha-fix-rtld-fPIC.patch
+ + 6027_all_alpha-fix-memchr.patch
+ + 6028_all_alpha-fix-SOCK_NONBLOCK.patch
+
3 18.09.2009
+ 6705_all_binutils-2.20-compat.patch
1.1 src/patchsets/glibc/2.10.1/6020_all_alpha-fix-gcc-4.1-warnings.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6020_all_alpha-fix-gcc-4.1-warnings.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6020_all_alpha-fix-gcc-4.1-warnings.patch?rev=1.1&content-type=text/plain
Index: 6020_all_alpha-fix-gcc-4.1-warnings.patch
===================================================================
2006-05-30 Falk Hueffner <falk@debian.org>
* sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture
to ev6 in assembly code.
{standard input}: Assembler messages:
{standard input}:341: Error: macro requires $at register while noat in effect
{standard input}:374: Error: macro requires $at register while noat in effect
{standard input}:438: Error: macro requires $at register while noat in effect
{standard input}:471: Error: macro requires $at register while noat in effect
make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1
Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as.
I cannot really think of anything better than
---
ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -178,13 +178,13 @@
static inline void
stb_mb(unsigned char val, unsigned long addr)
{
- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
}
static inline void
stw_mb(unsigned short val, unsigned long addr)
{
- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
}
static inline void
@@ -356,7 +356,7 @@
unsigned long int addr = dense_port_to_cpu_addr (port);
unsigned char r;
- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
return r;
}
@@ -366,7 +366,7 @@
unsigned long int addr = dense_port_to_cpu_addr (port);
unsigned short r;
- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
return r;
}
1.1 src/patchsets/glibc/2.10.1/6021_all_alpha-add-dl-procinfo-support.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6021_all_alpha-add-dl-procinfo-support.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6021_all_alpha-add-dl-procinfo-support.patch?rev=1.1&content-type=text/plain
Index: 6021_all_alpha-add-dl-procinfo-support.patch
===================================================================
---
ports/sysdeps/alpha/dl-machine.h | 12 ++++++
ports/sysdeps/alpha/dl-procinfo.c | 64 +++++++++++++++++++++++++++++++++++
ports/sysdeps/alpha/dl-procinfo.h | 68 ++++++++++++++++++++++++++++++++++++++
3 files changed, 144 insertions(+)
--- /dev/null
+++ ports/sysdeps/alpha/dl-procinfo.h
@@ -0,0 +1,68 @@
+/* Alpha version of processor capability information handling macros.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2007.
+
+ 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 _DL_PROCINFO_H
+#define _DL_PROCINFO_H 1
+
+#include <ldsodefs.h>
+
+
+/* Mask to filter out platforms. */
+#define _DL_HWCAP_PLATFORM (-1ULL)
+
+#define _DL_PLATFORMS_COUNT 5
+
+static inline const char *
+__attribute__ ((unused))
+_dl_platform_string (int idx)
+{
+ return GLRO(dl_alpha_platforms)[idx];
+};
+
+static inline int
+__attribute__ ((unused, always_inline))
+_dl_string_platform (const char *str)
+{
+ int i;
+
+ if (str != NULL)
+ for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
+ {
+ if (strcmp (str, _dl_platform_string (i)) == 0)
+ return i;
+ }
+ return -1;
+};
+
+/* We cannot provide a general printing function. */
+#define _dl_procinfo(word) -1
+
+/* There are no hardware capabilities defined. */
+#define _dl_hwcap_string(idx) ""
+
+/* By default there is no important hardware capability. */
+#define HWCAP_IMPORTANT (0)
+
+/* We don't have any hardware capabilities. */
+#define _DL_HWCAP_COUNT 0
+
+#define _dl_string_hwcap(str) (-1)
+
+#endif /* dl-procinfo.h */
--- /dev/null
+++ ports/sysdeps/alpha/dl-procinfo.c
@@ -0,0 +1,64 @@
+/* Data for Alpha version of processor capability information.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2007.
+
+ 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. */
+
+/* This information must be kept in sync with the _DL_PLATFORM_COUNT
+ definitions in procinfo.h.
+
+ If anything should be added here check whether the size of each string
+ is still ok with the given array size.
+
+ All the #ifdefs in the definitions are quite irritating but
+ necessary if we want to avoid duplicating the information. There
+ are three different modes:
+
+ - PROCINFO_DECL is defined. This means we are only interested in
+ declarations.
+
+ - PROCINFO_DECL is not defined:
+
+ + if SHARED is defined the file is included in an array
+ initializer. The .element = { ... } syntax is needed.
+
+ + if SHARED is not defined a normal array initialization is
+ needed.
+ */
+
+#ifndef PROCINFO_CLASS
+#define PROCINFO_CLASS
+#endif
+
+#if !defined PROCINFO_DECL && defined SHARED
+ ._dl_alpha_platforms
+#else
+PROCINFO_CLASS const char _dl_alpha_platforms[5][5]
+#endif
+#ifndef PROCINFO_DECL
+= {
+ "ev4", "ev5", "ev56", "ev6", "ev67"
+ }
+#endif
+#if !defined SHARED || defined PROCINFO_DECL
+;
+#else
+,
+#endif
+
+#undef PROCINFO_DECL
+#undef PROCINFO_CLASS
--- ports/sysdeps/alpha/dl-machine.h
+++ ports/sysdeps/alpha/dl-machine.h
@@ -249,6 +249,18 @@
/* The alpha never uses Elf64_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
+/* We define an initialization functions. This is called very early in
+ * _dl_sysdep_start. */
+#define DL_PLATFORM_INIT dl_platform_init ()
+
+static inline void __attribute__ ((unused))
+dl_platform_init (void)
+{
+ if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
+ /* Avoid an empty string which would disturb us. */
+ GLRO(dl_platform) = NULL;
+}
+
/* Fix up the instructions of a PLT entry to invoke the function
rather than the dynamic linker. */
static inline Elf64_Addr
1.1 src/patchsets/glibc/2.10.1/6022_alpha_alpha-add-fdatasync-support.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6022_alpha_alpha-add-fdatasync-support.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6022_alpha_alpha-add-fdatasync-support.patch?rev=1.1&content-type=text/plain
Index: 6022_alpha_alpha-add-fdatasync-support.patch
===================================================================
2009-07-25 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/kernel-features.h: define
__ASSUME_FDATASYNC.
* sysdeps/unix/sysv/linux/fdatasync.c: New file.
* sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with
-fexceptions.
* sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync.
---
sysdeps/unix/sysv/linux/Makefile | 1
sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/kernel-features.h | 6 ++
sysdeps/unix/sysv/linux/syscalls.list | 1
4 files changed, 76 insertions(+), 1 deletion(-)
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -474,6 +474,12 @@
# define __ASSUME_FUTEX_LOCK_PI 1
#endif
+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it
+ was already present in 2.0 kernels on other architectures. */
+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616)
+# define __ASSUME_FDATASYNC 1
+#endif
+
/* Support for utimensat syscall was added in 2.6.22, on alpha and s390
only after 2.6.22-rc1. */
#if __LINUX_KERNEL_VERSION >= 0x020616 \
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/fdatasync.c
@@ -0,0 +1,69 @@
+/* fdatasync -- synchronize at least the data part of a file with
+ the underlying media. Linux version.
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC
+static int __have_no_fdatasync;
+#endif
+
+static int
+do_fdatasync (int fd)
+{
+#ifdef __ASSUME_FDATASYNC
+ return INLINE_SYSCALL (fdatasync, 1, fd);
+#elif defined __NR_fdatasync
+ if (!__builtin_expect (__have_no_fdatasync, 0))
+ {
+ int result = INLINE_SYSCALL (fdatasync, 1, fd);
+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS)
+ return result;
+
+ __have_no_fdatasync = 1;
+ }
+#endif
+ return INLINE_SYSCALL (fsync, 1, fd);
+}
+
+int
+__fdatasync (int fd)
+{
+ if (SINGLE_THREAD_P)
+ return do_fdatasync (fd);
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ int result = do_fdatasync (fd);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+
+weak_alias (__fdatasync, fdatasync)
+
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -11,7 +11,6 @@
epoll_create1 EXTRA epoll_create1 i:i epoll_create1
epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl
epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait
-fdatasync - fdatasync Ci:i fdatasync
flock - flock i:ii __flock flock
fork - fork i: __libc_fork __fork fork
get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -17,6 +17,7 @@
eventfd eventfd_read eventfd_write
+CFLAGS-fdatasync.c = -fexceptions
CFLAGS-gethostid.c = -fexceptions
sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
1.1 src/patchsets/glibc/2.10.1/6023_all_alpha-add-getsystats-support.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6023_all_alpha-add-getsystats-support.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6023_all_alpha-add-getsystats-support.patch?rev=1.1&content-type=text/plain
Index: 6023_all_alpha-add-getsystats-support.patch
===================================================================
2009-05-16 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER):
Change parameters and use next_line.
---
ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c
+++ ports/sysdeps/unix/sysv/linux/alpha/getsysstats.c
@@ -20,15 +20,16 @@
/* We need to define a special parser for /proc/cpuinfo. */
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \
do \
{ \
/* Find the line that contains the information about the number of \
active cpus. We don't have to fear extremely long lines since \
the kernel will not generate them. 8192 bytes are really enough. \
If there is no "CPUs ..." line then we are on a UP system. */ \
+ char *l; \
(RESULT) = 1; \
- while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
+ while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \
if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \
|| (sscanf (BUFFER, "CPUs probed %*d active %d", \
&(RESULT)) == 1)) \
1.1 src/patchsets/glibc/2.10.1/6024_all_alpha-fix-includes.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6024_all_alpha-fix-includes.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6024_all_alpha-fix-includes.patch?rev=1.1&content-type=text/plain
Index: 6024_all_alpha-fix-includes.patch
===================================================================
2009-05-15 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/alpha/getdents64.c: Adjust include path.
* sysdeps/unix/sysv/linux/alpha/nptl/fork.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/sysconf.c: Likewise.
---
ports/sysdeps/unix/sysv/linux/alpha/getdents64.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/nptl/fork.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c | 2 +-
ports/sysdeps/unix/sysv/linux/alpha/sysconf.c | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
--- ports/sysdeps/unix/sysv/linux/alpha/getdents64.c
+++ ports/sysdeps/unix/sysv/linux/alpha/getdents64.c
@@ -1 +1 @@
-#include "../getdents64.c"
+#include <sysdeps/unix/sysv/linux/getdents64.c>
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/fork.c
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/fork.c
@@ -27,4 +27,4 @@
CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
NULL, NULL, &THREAD_SELF->tid, NULL)
-#include "../fork.c"
+#include <sysdeps/unix/sysv/linux/fork.c>
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c
@@ -2,4 +2,4 @@
the acquire/release semantics of atomic_exchange_and_add. And even if
we don't do this, we should be using atomic_full_barrier or otherwise. */
#define __lll_rel_instr "mb"
-#include "../sem_post.c"
+#include <nptl/sysdeps/unix/sysv/linux/sem_post.c>
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c
@@ -1 +1 @@
-#include "../x86_64/timer_create.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c>
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c
@@ -1 +1 @@
-#include "../x86_64/timer_delete.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c>
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c
@@ -1 +1 @@
-#include "../x86_64/timer_getoverr.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c>
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c
@@ -1 +1 @@
-#include "../x86_64/timer_gettime.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
@@ -1 +1 @@
-#include "../x86_64/timer_settime.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c>
--- ports/sysdeps/unix/sysv/linux/alpha/sysconf.c
+++ ports/sysdeps/unix/sysv/linux/alpha/sysconf.c
@@ -149,4 +149,4 @@
/* Now the generic Linux version. */
#undef __sysconf
#define __sysconf static linux_sysconf
-#include "../sysconf.c"
+#include <sysdeps/unix/sysv/linux/sysconf.c>
1.1 src/patchsets/glibc/2.10.1/6025_all_alpha-add-futex-defines.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6025_all_alpha-add-futex-defines.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6025_all_alpha-add-futex-defines.patch?rev=1.1&content-type=text/plain
Index: 6025_all_alpha-add-futex-defines.patch
===================================================================
2009-05-19 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h: Define
FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
FUTEX_BITSET_MATCH_ANY.
---
ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 5 +++++
1 file changed, 5 insertions(+)
--- ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -37,7 +37,12 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_WAIT_BITSET 9
+#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
1.1 src/patchsets/glibc/2.10.1/6026_all_alpha-fix-rtld-fPIC.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6026_all_alpha-fix-rtld-fPIC.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6026_all_alpha-fix-rtld-fPIC.patch?rev=1.1&content-type=text/plain
Index: 6026_all_alpha-fix-rtld-fPIC.patch
===================================================================
2009-05-26 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag).
---
ports/sysdeps/alpha/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- ports/sysdeps/alpha/Makefile
+++ ports/sysdeps/alpha/Makefile
@@ -35,7 +35,8 @@
ifeq ($(subdir),elf)
# The ld.so startup code cannot use literals until it self-relocates.
-CFLAGS-rtld.c = -mbuild-constants
+# It uses more than 64k for the small data area.
+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag)
endif
# Build everything with full IEEE math support, and with dynamic rounding;
1.1 src/patchsets/glibc/2.10.1/6027_all_alpha-fix-memchr.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6027_all_alpha-fix-memchr.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6027_all_alpha-fix-memchr.patch?rev=1.1&content-type=text/plain
Index: 6027_all_alpha-fix-memchr.patch
===================================================================
2009-07-27 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/alpha/memchr.S: Use prefetch load.
* sysdeps/alpha/alphaev6/memchr.S: Likewise.
--- ports/sysdeps/alpha/alphaev6/memchr.S
+++ ports/sysdeps/alpha/alphaev6/memchr.S
@@ -127,7 +127,7 @@ $first_quad:
cmpbge $31, $1, $2 # E :
bne $2, $found_it # U :
# At least one byte left to process.
- ldq $1, 8($0) # L :
+ ldq $31, 8($0) # L :
subq $5, 1, $18 # E : U L U L
addq $0, 8, $0 # E :
@@ -143,38 +143,38 @@ $first_quad:
and $4, 8, $4 # E : odd number of quads?
bne $4, $odd_quad_count # U :
# At least three quads remain to be accessed
- mov $1, $4 # E : L U L U : move prefetched value to correct reg
+ nop # E : L U L U : move prefetched value to correct reg
.align 4
$unrolled_loop:
- ldq $1, 8($0) # L : prefetch $1
- xor $17, $4, $2 # E :
- cmpbge $31, $2, $2 # E :
- bne $2, $found_it # U : U L U L
+ ldq $1, 0($0) # L : load quad
+ xor $17, $1, $2 # E :
+ ldq $31, 8($0) # L : prefetch next quad
+ cmpbge $31, $2, $2 # E : U L U L
+ bne $2, $found_it # U :
addq $0, 8, $0 # E :
nop # E :
nop # E :
- nop # E :
$odd_quad_count:
+ ldq $1, 0($0) # L : load quad
xor $17, $1, $2 # E :
- ldq $4, 8($0) # L : prefetch $4
+ ldq $31, 8($0) # L : prefetch $4
cmpbge $31, $2, $2 # E :
- addq $0, 8, $6 # E :
+ addq $0, 8, $6 # E :
bne $2, $found_it # U :
cmpult $6, $18, $6 # E :
addq $0, 8, $0 # E :
- nop # E :
bne $6, $unrolled_loop # U :
- mov $4, $1 # E : move prefetched value into $1
nop # E :
nop # E :
-
-$final: subq $5, $0, $18 # E : $18 <- number of bytes left to do
nop # E :
+
+$final: ldq $1, 0($0) # L : load last quad
+ subq $5, $0, $18 # E : $18 <- number of bytes left to do
nop # E :
bne $18, $last_quad # U :
--- ports/sysdeps/alpha/memchr.S
+++ ports/sysdeps/alpha/memchr.S
@@ -119,7 +119,7 @@ $first_quad:
# At least one byte left to process.
- ldq t0, 8(v0) # e0 :
+ ldq zero, 8(v0) # e0 : prefetch next quad
subq t4, 1, a2 # .. e1 :
addq v0, 8, v0 #-e0 :
@@ -138,19 +138,19 @@ $first_quad:
# At least three quads remain to be accessed
- mov t0, t3 # e0 : move prefetched value to correct reg
-
.align 4
$unrolled_loop:
- ldq t0, 8(v0) #-e0 : prefetch t0
- xor a1, t3, t1 # .. e1 :
- cmpbge zero, t1, t1 # e0 :
- bne t1, $found_it # .. e1 :
+ ldq t0, 0(v0) # e0 : load quad
+ xor a1, t0, t1 # .. e1 :
+ ldq zero, 8(v0) # e0 : prefetch next quad
+ cmpbge zero, t1, t1 # .. e1:
+ bne t1, $found_it # e0 :
- addq v0, 8, v0 #-e0 :
+ addq v0, 8, v0 # e1 :
$odd_quad_count:
+ ldq t0, 0(v0) # e0 : load quad
xor a1, t0, t1 # .. e1 :
- ldq t3, 8(v0) # e0 : prefetch t3
+ ldq zero, 8(v0) # e0 : prefetch next quad
cmpbge zero, t1, t1 # .. e1 :
addq v0, 8, t5 #-e0 :
bne t1, $found_it # .. e1 :
@@ -159,8 +159,8 @@ $odd_quad_count:
addq v0, 8, v0 # .. e1 :
bne t5, $unrolled_loop #-e1 :
- mov t3, t0 # e0 : move prefetched value into t0
-$final: subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do
+$final: ldq t0, 0(v0) # e0 : load last quad
+ subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do
bne a2, $last_quad # e1 :
$not_found:
1.1 src/patchsets/glibc/2.10.1/6028_all_alpha-fix-SOCK_NONBLOCK.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6028_all_alpha-fix-SOCK_NONBLOCK.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.10.1/6028_all_alpha-fix-SOCK_NONBLOCK.patch?rev=1.1&content-type=text/plain
Index: 6028_all_alpha-fix-SOCK_NONBLOCK.patch
===================================================================
2009-08-16 Aurelien Jarno <aurelien@aurel32.net>
* ports/sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file based on
the generic version, with SOCK_NONBLOCK matching the kernel value.
--- /dev/null
+++ ports/sysdeps/unix/sysv/linux/alpha/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 */
--
1.6.1.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-30 4:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30 4:56 [gentoo-commits] gentoo commit in src/patchsets/glibc/2.10.1: 6020_all_alpha-fix-gcc-4.1-warnings.patch 6021_all_alpha-add-dl-procinfo-support.patch 6022_alpha_alpha-add-fdatasync-support.patch 6023_all_alpha-add-getsystats-support.patch 6024_all_alpha-fix-includes.patch 6025_all_alpha-add-futex-defines.patch 6026_all_alpha-fix-rtld-fPIC.patch 6027_all_alpha-fix-memchr.patch 6028_all_alpha-fix-SOCK_NONBLOCK.patch README.history Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox