summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-05-11 14:01:43 +0000
committerJakub Jelinek <jakub@redhat.com>2006-05-11 14:01:43 +0000
commit3ec0d26c76d6905501034692d05bddbabae64e76 (patch)
tree191efcdfd934a0369cdef723fe4f650fe2f3dcfc /sysdeps
parent262cf6b3df91d5bb7cbdcae2390333b21e8008d5 (diff)
Updated to fedora-glibc-20060511T1325cvs/fedora-glibc-2_4_90-7
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/ldsodefs.h45
-rw-r--r--sysdeps/posix/getaddrinfo.c10
-rw-r--r--sysdeps/s390/s390-32/elf/start.S9
-rw-r--r--sysdeps/s390/s390-64/elf/start.S6
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/fcntl.h9
-rw-r--r--sysdeps/unix/sysv/linux/check_pf.c11
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/fcntl.h9
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/fcntl.h9
-rw-r--r--sysdeps/unix/sysv/linux/ifaddrs.c8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h9
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/fcntl.h9
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/syscall.S9
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/syscall.S9
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/fcntl.h9
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/fcntl.h9
-rw-r--r--sysdeps/unix/sysv/linux/tcgetattr.c47
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h9
17 files changed, 137 insertions, 89 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 13fefd9e83..6d817651c9 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 1995-2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-2003, 2004, 2005, 2006 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
@@ -193,8 +193,6 @@ struct La_ppc64_regs;
struct La_ppc64_retval;
struct La_sh_regs;
struct La_sh_retval;
-struct La_m68k_regs;
-struct La_m68k_retval;
struct La_alpha_regs;
struct La_alpha_retval;
struct La_s390_32_regs;
@@ -203,10 +201,6 @@ struct La_s390_64_regs;
struct La_s390_64_retval;
struct La_ia64_regs;
struct La_ia64_retval;
-struct La_mips_32_regs;
-struct La_mips_32_retval;
-struct La_mips_64_regs;
-struct La_mips_64_retval;
struct La_sparc32_regs;
struct La_sparc32_retval;
struct La_sparc64_regs;
@@ -247,10 +241,6 @@ struct audit_ifaces
uintptr_t *, const struct La_sh_regs *,
unsigned int *, const char *name,
long int *framesizep);
- Elf32_Addr (*m68k_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
- uintptr_t *, struct La_m68k_regs *,
- unsigned int *, const char *name,
- long int *framesizep);
Elf64_Addr (*alpha_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *,
uintptr_t *, struct La_alpha_regs *,
unsigned int *, const char *name,
@@ -267,21 +257,6 @@ struct audit_ifaces
uintptr_t *, struct La_ia64_regs *,
unsigned int *, const char *name,
long int *framesizep);
- Elf32_Addr (*mips_o32_gnu_pltenter) (Elf32_Sym *, unsigned int,
- uintptr_t *, uintptr_t *,
- const struct La_mips_32_regs *,
- unsigned int *, const char *name,
- long int *framesizep);
- Elf32_Addr (*mips_n32_gnu_pltenter) (Elf32_Sym *, unsigned int,
- uintptr_t *, uintptr_t *,
- const struct La_mips_64_regs *,
- unsigned int *, const char *name,
- long int *framesizep);
- Elf64_Addr (*mips_n64_gnu_pltenter) (Elf64_Sym *, unsigned int,
- uintptr_t *, uintptr_t *,
- const struct La_mips_64_regs *,
- unsigned int *, const char *name,
- long int *framesizep);
Elf32_Addr (*sparc32_gnu_pltenter) (Elf32_Sym *, unsigned int,
uintptr_t *, uintptr_t *,
const struct La_sparc32_regs *,
@@ -317,9 +292,6 @@ struct audit_ifaces
unsigned int (*sh_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *, const struct La_sh_regs *,
struct La_sh_retval *, const char *);
- unsigned int (*m68k_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
- uintptr_t *, const struct La_m68k_regs *,
- struct La_m68k_retval *, const char *);
unsigned int (*alpha_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *,
uintptr_t *,
const struct La_alpha_regs *,
@@ -338,21 +310,6 @@ struct audit_ifaces
uintptr_t *,
const struct La_ia64_regs *,
struct La_ia64_retval *, const char *);
- unsigned int (*mips_o32_gnu_pltexit) (Elf32_Sym *, unsigned int,
- uintptr_t *, uintptr_t *,
- const struct La_mips_32_regs *,
- struct La_mips_32_retval *,
- const char *);
- unsigned int (*mips_n32_gnu_pltexit) (Elf32_Sym *, unsigned int,
- uintptr_t *, uintptr_t *,
- const struct La_mips_64_regs *,
- struct La_mips_64_retval *,
- const char *);
- unsigned int (*mips_n64_gnu_pltexit) (Elf64_Sym *, unsigned int,
- uintptr_t *, uintptr_t *,
- const struct La_mips_64_regs *,
- struct La_mips_64_retval *,
- const char *);
unsigned int (*sparc32_gnu_pltexit) (Elf32_Sym *, unsigned int,
uintptr_t *, uintptr_t *,
const struct La_sparc32_regs *,
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index fc0928676d..a78c670bfb 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1047,7 +1047,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
struct addrinfo *ai;
ai = *pai = malloc (sizeof (struct addrinfo) + socklen);
if (ai == NULL)
- return -EAI_MEMORY;
+ {
+ free ((char *) canon);
+ return -EAI_MEMORY;
+ }
ai->ai_flags = req->ai_flags;
ai->ai_family = family;
@@ -1065,6 +1068,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
#endif /* _HAVE_SA_LEN */
ai->ai_addr->sa_family = family;
+ /* In case of an allocation error the list must be NULL
+ terminated. */
+ ai->ai_next = NULL;
+
if (family == AF_INET6)
{
struct sockaddr_in6 *sin6p =
@@ -1088,7 +1095,6 @@ gaih_inet (const char *name, const struct gaih_service *service,
pai = &(ai->ai_next);
}
- *pai = NULL;
++*naddrs;
diff --git a/sysdeps/s390/s390-32/elf/start.S b/sysdeps/s390/s390-32/elf/start.S
index a09acb5d89..f7290106ce 100644
--- a/sysdeps/s390/s390-32/elf/start.S
+++ b/sysdeps/s390/s390-32/elf/start.S
@@ -1,5 +1,6 @@
/* Startup code compliant to the ELF s390 ABI.
- Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006
+ Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -88,9 +89,9 @@ _start:
l %r12,.L5-.Llit(%r13) # load .got pointer
la %r6,0(%r13,%r6)
la %r5,0(%r13,%r5)
- la %r2,0(%r13,%r2)
- la %r1,0(%r13,%r1)
la %r12,0(%r13,%r12)
+ l %r2,0(%r12,%r2)
+ la %r1,0(%r13,%r1)
#endif
/* ok, now branch to the libc main routine */
@@ -108,7 +109,7 @@ _start:
#else
.L1: .long __libc_csu_init-.Llit
.L2: .long __libc_csu_fini-.Llit
-.L3: .long main-.Llit
+.L3: .long main@GOT
.L4: .long __libc_start_main@plt-.Llit
.L5: .long _GLOBAL_OFFSET_TABLE_-.Llit
#endif
diff --git a/sysdeps/s390/s390-64/elf/start.S b/sysdeps/s390/s390-64/elf/start.S
index e5013d0057..c4cb34d02c 100644
--- a/sysdeps/s390/s390-64/elf/start.S
+++ b/sysdeps/s390/s390-64/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the 64 bit S/390 ELF ABI.
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -78,12 +78,14 @@ _start:
la %r7,160(%r15)
larl %r6,__libc_csu_fini # load pointer to __libc_csu_fini
larl %r5,__libc_csu_init # load pointer to __libc_csu_init
- larl %r2,main # load pointer to main
/* Ok, now branch to the libc main routine. */
#ifdef PIC
+ larl %r2,main@GOTENT # load pointer to main
+ lg %r2,0(%r2)
brasl %r14,__libc_start_main@plt
#else
+ larl %r2,main # load pointer to main
brasl %r14,__libc_start_main
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 4a20f1d673..9b2e635d60 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -177,6 +177,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -186,6 +187,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index f186182cf6..7fbb7543d6 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -17,9 +17,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <assert.h>
#include <errno.h>
#include <ifaddrs.h>
#include <netdb.h>
+#include <stddef.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
@@ -42,10 +44,14 @@ static int
make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
struct in6addrinfo **in6ai, size_t *in6ailen)
{
- struct
+ struct req
{
struct nlmsghdr nlh;
struct rtgenmsg g;
+ /* struct rtgenmsg consists of a single byte. This means there
+ are three bytes of padding included in the REQ definition.
+ We make them explicit here. */
+ char pad[3];
} req;
struct sockaddr_nl nladdr;
@@ -56,6 +62,9 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
req.nlh.nlmsg_seq = time (NULL);
req.g.rtgen_family = AF_UNSPEC;
+ assert (sizeof (req) - offsetof (struct req, pad) == 3);
+ memset (req.pad, '\0', sizeof (req.pad));
+
memset (&nladdr, '\0', sizeof (nladdr));
nladdr.nl_family = AF_NETLINK;
diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
index 82f06332be..81d9932675 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
@@ -185,6 +185,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -194,6 +195,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
index 1d684ad367..4695d92618 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
@@ -179,6 +179,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -188,6 +189,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
index f743f702f0..e6720f0ca2 100644
--- a/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -1,5 +1,5 @@
/* getifaddrs -- get names and addresses of all network interfaces
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006 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
@@ -358,8 +358,7 @@ getifaddrs (struct ifaddrs **ifap)
ifa_data. */
int result = 0;
- if (ifap)
- *ifap = NULL;
+ *ifap = NULL;
if (! __no_netlink_support && __netlink_open (&nh) < 0)
{
@@ -840,8 +839,7 @@ getifaddrs (struct ifaddrs **ifap)
memmove (ifas, &ifas[newlink], sizeof (struct ifaddrs_storage));
}
- if (ifap != NULL)
- *ifap = &ifas[0].ifa;
+ *ifap = &ifas[0].ifa;
exit_free:
__netlink_free_handle (&nh);
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index 2843c6e9cc..5d6bb6fe44 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
@@ -185,6 +185,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -194,6 +195,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index 7a9aa5738e..166bae59bf 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -205,6 +205,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -214,6 +215,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S b/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S
index d1ce925ac3..b7e1736891 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -48,13 +48,14 @@ ENTRY (syscall)
lr %r4,%r5 /* third parameter */
lr %r5,%r6 /* fourth parameter */
l %r6,192(%r15) /* fifth parameter */
+ l %r7,196(%r15) /* sixth parameter */
- basr %r7,0
-0: cl %r1,4f-0b(%r7) /* svc number < 256? */
+ basr %r8,0
+0: cl %r1,4f-0b(%r8) /* svc number < 256? */
jl 2f
1: svc 0
j 3f
-2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */
+2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */
3: l %r15,0(%r15) /* load back chain */
cfi_adjust_cfa_offset (-96)
lm %r6,15,24(%r15) /* load registers */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S b/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
index 4caeaeaf50..31b55d73f2 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -48,13 +48,14 @@ ENTRY (syscall)
lgr %r4,%r5 /* Third parameter. */
lgr %r5,%r6 /* Fourth parameter. */
lg %r6,320(%r15) /* Fifth parameter. */
+ lg %r7,328(%r15) /* Sixth parameter. */
- basr %r7,0
-0: clg %r1,4f-0b(%r7) /* svc number < 256? */
+ basr %r8,0
+0: clg %r1,4f-0b(%r8) /* svc number < 256? */
jl 2f
1: svc 0
j 3f
-2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */
+2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */
3: lg %r15,0(%r15) /* load back chain */
cfi_adjust_cfa_offset (-160)
lmg %r6,15,48(%r15) /* Load registers. */
diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
index 82f06332be..81d9932675 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
@@ -185,6 +185,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -194,6 +195,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index e8cc3987e3..022f24ac17 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -204,6 +204,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -213,6 +214,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
diff --git a/sysdeps/unix/sysv/linux/tcgetattr.c b/sysdeps/unix/sysv/linux/tcgetattr.c
index 63453ca031..28e3e535ba 100644
--- a/sysdeps/unix/sysv/linux/tcgetattr.c
+++ b/sysdeps/unix/sysv/linux/tcgetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995,1997,1998,2003,2006 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
@@ -40,39 +40,40 @@ __tcgetattr (fd, termios_p)
retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
- termios_p->c_iflag = k_termios.c_iflag;
- termios_p->c_oflag = k_termios.c_oflag;
- termios_p->c_cflag = k_termios.c_cflag;
- termios_p->c_lflag = k_termios.c_lflag;
- termios_p->c_line = k_termios.c_line;
+ if (__builtin_expect (retval == 0, 1))
+ {
+ termios_p->c_iflag = k_termios.c_iflag;
+ termios_p->c_oflag = k_termios.c_oflag;
+ termios_p->c_cflag = k_termios.c_cflag;
+ termios_p->c_lflag = k_termios.c_lflag;
+ termios_p->c_line = k_termios.c_line;
#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
# ifdef _HAVE_C_ISPEED
- termios_p->c_ispeed = k_termios.c_ispeed;
+ termios_p->c_ispeed = k_termios.c_ispeed;
# else
- termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
+ termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
# endif
#endif
#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
# ifdef _HAVE_C_OSPEED
- termios_p->c_ospeed = k_termios.c_ospeed;
+ termios_p->c_ospeed = k_termios.c_ospeed;
# else
- termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
+ termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
# endif
#endif
- if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0
- || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1)
- memset (__mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
- __KERNEL_NCCS * sizeof (cc_t)),
- _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t));
- else
- {
- size_t cnt;
-
- memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
- __KERNEL_NCCS * sizeof (cc_t));
+ if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0
+ || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1)
+ memset (__mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
+ __KERNEL_NCCS * sizeof (cc_t)),
+ _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t));
+ else
+ {
+ memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
+ __KERNEL_NCCS * sizeof (cc_t));
- for (cnt = __KERNEL_NCCS; cnt < NCCS; ++cnt)
- termios_p->c_cc[cnt] = _POSIX_VDISABLE;
+ for (size_t cnt = __KERNEL_NCCS; cnt < NCCS; ++cnt)
+ termios_p->c_cc[cnt] = _POSIX_VDISABLE;
+ }
}
return retval;
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
index ad4c1443e4..771de60711 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
@@ -199,6 +199,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -208,6 +209,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS