summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h6
-rw-r--r--sysdeps/unix/sysv/linux/bits/siginfo.h8
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h4
-rw-r--r--sysdeps/unix/sysv/linux/check_pf.c1
-rw-r--r--sysdeps/unix/sysv/linux/dl-writev.h38
-rw-r--r--sysdeps/unix/sysv/linux/getipv4sourcefilter.c1
-rw-r--r--sysdeps/unix/sysv/linux/getsourcefilter.c1
-rw-r--r--sysdeps/unix/sysv/linux/i386/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h6
-rw-r--r--sysdeps/unix/sysv/linux/netlinkaccess.h1
-rw-r--r--sysdeps/unix/sysv/linux/open64_2.c31
-rw-r--r--sysdeps/unix/sysv/linux/open_2.c31
-rw-r--r--sysdeps/unix/sysv/linux/openat.c16
-rw-r--r--sysdeps/unix/sysv/linux/openat64.c1
-rw-r--r--sysdeps/unix/sysv/linux/pathconf.c7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Versions1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/init-first.c4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/time.c62
-rw-r--r--sysdeps/unix/sysv/linux/preadv.c1
-rw-r--r--sysdeps/unix/sysv/linux/pwritev.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/siginfo.h10
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/statfs.h24
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/setipv4sourcefilter.c1
-rw-r--r--sysdeps/unix/sysv/linux/setsourcefilter.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/getgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/nptl/libm.abilist4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/siginfo.h8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/sys/fsuid.h4
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/glob64.c3
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/openat.c8
-rw-r--r--sysdeps/unix/sysv/linux/x86/bits/siginfo.h8
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/nptl/libm.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/nptl/libm.abilist5
43 files changed, 235 insertions, 113 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index f82c94982e..f580635c84 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -152,7 +152,7 @@ endif
ifeq ($(subdir),io)
sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
- sync_file_range open_2 open64_2 fallocate fallocate64
+ sync_file_range fallocate fallocate64
sysdep_headers += bits/fcntl-linux.h
endif
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 5e8057b62e..e42dee8e62 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -144,21 +144,21 @@ typedef struct
# define __CPU_SET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
- __cpu < 8 * (setsize) \
+ __cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|= __CPUMASK (__cpu)) \
: 0; }))
# define __CPU_CLR_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
- __cpu < 8 * (setsize) \
+ __cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
&= ~__CPUMASK (__cpu)) \
: 0; }))
# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
- __cpu < 8 * (setsize) \
+ __cpu / 8 < (setsize) \
? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
& __CPUMASK (__cpu))) != 0 \
: 0; }))
diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
index a67bd5c0d1..160378457e 100644
--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
@@ -95,6 +95,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -127,6 +128,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -217,8 +219,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index eadd7d9326..9312849d03 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -79,7 +79,8 @@ typedef __socklen_t socklen_t;
#define PF_CAIF 37 /* CAIF sockets. */
#define PF_ALG 38 /* Algorithm sockets. */
#define PF_NFC 39 /* NFC sockets. */
-#define PF_MAX 40 /* For now.. */
+#define PF_VSOCK 40 /* vSockets. */
+#define PF_MAX 41 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -123,6 +124,7 @@ typedef __socklen_t socklen_t;
#define AF_CAIF PF_CAIF
#define AF_ALG PF_ALG
#define AF_NFC PF_NFC
+#define AF_VSOCK PF_VSOCK
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index 8bc025b041..34c21461bb 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <stdint.h>
#include <sys/socket.h>
#include <asm/types.h>
diff --git a/sysdeps/unix/sysv/linux/dl-writev.h b/sysdeps/unix/sysv/linux/dl-writev.h
new file mode 100644
index 0000000000..b682e0c4b6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/dl-writev.h
@@ -0,0 +1,38 @@
+/* Message-writing for the dynamic linker. Linux version.
+ Copyright (C) 2013 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+#include <sysdep.h>
+
+/* This is used from only one place: dl-misc.c:_dl_debug_vdprintf.
+ Hence it's in a header with the expectation it will be inlined.
+
+ This is writev, but with a constraint added and others loosened:
+
+ 1. Under RTLD_PRIVATE_ERRNO, it must not clobber the private errno
+ when another thread holds the dl_load_lock.
+ 2. It is not obliged to detect and report errors at all.
+ 3. It's not really obliged to deliver a single atomic write
+ (though it may be preferable). */
+
+static inline void
+_dl_writev (int fd, const struct iovec *iov, size_t niov)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ INTERNAL_SYSCALL (writev, err, 3, fd, iov, niov);
+}
diff --git a/sysdeps/unix/sysv/linux/getipv4sourcefilter.c b/sysdeps/unix/sysv/linux/getipv4sourcefilter.c
index 5c90caa8af..99082483ba 100644
--- a/sysdeps/unix/sysv/linux/getipv4sourcefilter.c
+++ b/sysdeps/unix/sysv/linux/getipv4sourcefilter.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <netinet/in.h>
#include <sys/param.h>
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/linux/getsourcefilter.c b/sysdeps/unix/sysv/linux/getsourcefilter.c
index 063d6c6509..682f424899 100644
--- a/sysdeps/unix/sysv/linux/getsourcefilter.c
+++ b/sysdeps/unix/sysv/linux/getsourcefilter.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <netatalk/at.h>
#include <netax25/ax25.h>
#include <netinet/in.h>
diff --git a/sysdeps/unix/sysv/linux/i386/nptl/libm.abilist b/sysdeps/unix/sysv/linux/i386/nptl/libm.abilist
index 401a2c6ddf..c185f0b205 100644
--- a/sysdeps/unix/sysv/linux/i386/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/i386/nptl/libm.abilist
@@ -396,6 +396,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.2
GLIBC_2.2 A
__expl F
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 8fdff7e381..ccd4c5918b 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -221,3 +221,9 @@
#if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100
# define __ASSUME_GETCPU_SYSCALL 1
#endif
+
+/* 2.6.29 removed the XFS restricted_chown sysctl, so it is pointless looking
+ for it in newer kernels. */
+#if __LINUX_KERNEL_VERSION >= 0x02061d
+# define __ASSUME_XFS_RESTRICTED_CHOWN 1
+#endif
diff --git a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/netlinkaccess.h
index 7c1deb9b7a..e0da57a0c5 100644
--- a/sysdeps/unix/sysv/linux/netlinkaccess.h
+++ b/sysdeps/unix/sysv/linux/netlinkaccess.h
@@ -18,6 +18,7 @@
#ifndef _NETLINKACCESS_H
#define _NETLINKACCESS_H 1
+#include <stdint.h>
#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
diff --git a/sysdeps/unix/sysv/linux/open64_2.c b/sysdeps/unix/sysv/linux/open64_2.c
deleted file mode 100644
index bff2222716..0000000000
--- a/sysdeps/unix/sysv/linux/open64_2.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2007-2013 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <fcntl.h>
-#include <stdio.h>
-
-
-int
-__open64_2 (file, oflag)
- const char *file;
- int oflag;
-{
- if (oflag & O_CREAT)
- __fortify_fail ("invalid open64 call: O_CREAT without mode");
-
- return __open64 (file, oflag);
-}
diff --git a/sysdeps/unix/sysv/linux/open_2.c b/sysdeps/unix/sysv/linux/open_2.c
deleted file mode 100644
index 5726157703..0000000000
--- a/sysdeps/unix/sysv/linux/open_2.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2007-2013 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <fcntl.h>
-#include <stdio.h>
-
-
-int
-__open_2 (file, oflag)
- const char *file;
- int oflag;
-{
- if (oflag & O_CREAT)
- __fortify_fail ("invalid open call: O_CREAT without mode");
-
- return __open (file, oflag);
-}
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index d2ef429736..6e838dfd0c 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -29,7 +29,6 @@
#ifndef OPENAT
# define OPENAT openat
-# define __OPENAT_2 __openat_2
# ifndef __ASSUME_ATFCTS
/* Set errno after a failed call. If BUF is not null,
@@ -179,18 +178,3 @@ __OPENAT (fd, file, oflag)
}
libc_hidden_def (__OPENAT)
weak_alias (__OPENAT, OPENAT)
-
-
-int
-__OPENAT_2 (fd, file, oflag)
- int fd;
- const char *file;
- int oflag;
-{
- if (oflag & O_CREAT)
-#define MSG(s) MSG2 (s)
-#define MSG2(s) "invalid " #s " call: O_CREAT without mode"
- __fortify_fail (MSG (OPENAT));
-
- return __OPENAT (fd, file, oflag);
-}
diff --git a/sysdeps/unix/sysv/linux/openat64.c b/sysdeps/unix/sysv/linux/openat64.c
index 013a13effa..9e7a2b3737 100644
--- a/sysdeps/unix/sysv/linux/openat64.c
+++ b/sysdeps/unix/sysv/linux/openat64.c
@@ -1,5 +1,4 @@
#define OPENAT openat64
-#define __OPENAT_2 __openat64_2
#define MORE_OFLAGS O_LARGEFILE
#include "openat.c"
diff --git a/sysdeps/unix/sysv/linux/pathconf.c b/sysdeps/unix/sysv/linux/pathconf.c
index de91a4541b..723d234538 100644
--- a/sysdeps/unix/sysv/linux/pathconf.c
+++ b/sysdeps/unix/sysv/linux/pathconf.c
@@ -289,11 +289,16 @@ __statfs_chown_restricted (int result, const struct statfs *fsbuf)
return -1;
}
+#if __ASSUME_XFS_RESTRICTED_CHOWN
+ return 1;
+#else
int fd;
+ int save_errno;
long int retval = 1;
switch (fsbuf->f_type)
{
case XFS_SUPER_MAGIC:
+ save_errno = errno;
/* Read the value from /proc/sys/fs/xfs/restrict_chown. If we cannot
read it default to assume the restriction is in place. */
fd = open_not_cancel_2 ("/proc/sys/fs/xfs/restrict_chown", O_RDONLY);
@@ -306,6 +311,7 @@ __statfs_chown_restricted (int result, const struct statfs *fsbuf)
close_not_cancel_no_status (fd);
}
+ __set_errno (save_errno);
break;
default:
@@ -313,4 +319,5 @@ __statfs_chown_restricted (int result, const struct statfs *fsbuf)
}
return retval;
+#endif
}
diff --git a/sysdeps/unix/sysv/linux/powerpc/Versions b/sysdeps/unix/sysv/linux/powerpc/Versions
index 396a4236c1..289c4fe9b7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Versions
+++ b/sysdeps/unix/sysv/linux/powerpc/Versions
@@ -4,5 +4,6 @@ libc {
__vdso_clock_gettime;
__vdso_clock_getres;
__vdso_getcpu;
+ __vdso_time;
}
}
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
index 5f5fc1eb3a..8b195db1bf 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
@@ -32,14 +32,16 @@ extern void *__vdso_get_tbfreq;
extern void *__vdso_getcpu;
+extern void *__vdso_time;
+
/* This macro is needed for PPC64 to return a skeleton OPD entry of a vDSO
symbol. This works because _dl_vdso_vsym always return the function
address, and no vDSO symbols use the TOC or chain pointers from the OPD
so we can allow them to be garbage. */
#if defined(__PPC64__) || defined(__powerpc64__)
-#define VDSO_IFUNC_RET(value) &value
+#define VDSO_IFUNC_RET(value) ((void *) &(value))
#else
-#define VDSO_IFUNC_RET(value) value
+#define VDSO_IFUNC_RET(value) ((void *) (value))
#endif
#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/init-first.c b/sysdeps/unix/sysv/linux/powerpc/init-first.c
index 204c0c60a4..f6f05f0ba2 100644
--- a/sysdeps/unix/sysv/linux/powerpc/init-first.c
+++ b/sysdeps/unix/sysv/linux/powerpc/init-first.c
@@ -28,7 +28,7 @@ void *__vdso_clock_gettime;
void *__vdso_clock_getres;
void *__vdso_get_tbfreq;
void *__vdso_getcpu;
-
+void *__vdso_time;
static inline void
_libc_vdso_platform_setup (void)
@@ -44,6 +44,8 @@ _libc_vdso_platform_setup (void)
__vdso_get_tbfreq = _dl_vdso_vsym ("__kernel_get_tbfreq", &linux2615);
__vdso_getcpu = _dl_vdso_vsym ("__kernel_getcpu", &linux2615);
+
+ __vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615);
}
# define VDSO_SETUP _libc_vdso_platform_setup
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libm.abilist
index 620aff9e94..76a4ba31db 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libm.abilist
@@ -397,6 +397,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.2
GLIBC_2.2 A
feclearexcept F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist
index 89422ab9f4..d309a6fa1a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist
@@ -81,6 +81,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.3
GLIBC_2.3 A
_LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c
index 779ea49c8e..344496b7ea 100644
--- a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c
+++ b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c
@@ -22,6 +22,7 @@
#include <inttypes.h>
#include <stdio.h>
+#include <stdint.h>
#include <sys/platform/ppc.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/time.c b/sysdeps/unix/sysv/linux/powerpc/time.c
new file mode 100644
index 0000000000..66b4eb3049
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/time.c
@@ -0,0 +1,62 @@
+/* time system call for Linux/PowerPC.
+ Copyright (C) 2013 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifdef SHARED
+
+# include <time.h>
+# include <sysdep.h>
+# include <bits/libc-vdso.h>
+
+void *time_ifunc (void) asm ("time");
+
+static time_t
+time_syscall (time_t *t)
+{
+ struct timeval tv;
+ time_t result;
+
+ if (INLINE_VSYSCALL (gettimeofday, 2, &tv, NULL) < 0)
+ result = (time_t) -1;
+ else
+ result = (time_t) tv.tv_sec;
+
+ if (t != NULL)
+ *t = result;
+ return result;
+}
+
+void *
+time_ifunc (void)
+{
+ /* If the vDSO is not available we fall back to the syscall. */
+ return (__vdso_time ? VDSO_IFUNC_RET (__vdso_time)
+ : time_syscall);
+}
+asm (".type time, %gnu_indirect_function");
+
+/* This is doing "libc_hidden_def (time)" but the compiler won't
+ * let us do it in C because it doesn't know we're defining time
+ * here in this file. */
+asm (".globl __GI_time\n"
+ "__GI_time = time");
+
+#else
+
+#include <sysdeps/posix/time.c>
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/preadv.c b/sysdeps/unix/sysv/linux/preadv.c
index 219c6632ae..e92af92eb9 100644
--- a/sysdeps/unix/sysv/linux/preadv.c
+++ b/sysdeps/unix/sysv/linux/preadv.c
@@ -18,6 +18,7 @@
#include <errno.h>
#include <stddef.h>
#include <sys/param.h>
+#include <stdint.h>
#if __WORDSIZE == 64
/* Hide the preadv64 declaration. */
# define preadv64 __redirect_preadv64
diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c
index 51b46d66b2..8dcd21675e 100644
--- a/sysdeps/unix/sysv/linux/pwritev.c
+++ b/sysdeps/unix/sysv/linux/pwritev.c
@@ -17,6 +17,7 @@
#include <errno.h>
#include <stddef.h>
+#include <stdint.h>
#include <sys/param.h>
#if __WORDSIZE == 64 && !defined PWRITEV
/* Hide the pwritev64 declaration. */
diff --git a/sysdeps/unix/sysv/linux/s390/bits/siginfo.h b/sysdeps/unix/sysv/linux/s390/bits/siginfo.h
index ad122084c5..19c94e77bc 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/siginfo.h
@@ -95,7 +95,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
- int si_trapno;
+ short si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -128,7 +128,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
-# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -219,8 +219,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/s390/bits/statfs.h b/sysdeps/unix/sysv/linux/s390/bits/statfs.h
index ff54607fa2..91dde15339 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/statfs.h
@@ -23,8 +23,8 @@
struct statfs
{
- int f_type;
- int f_bsize;
+ unsigned int f_type;
+ unsigned int f_bsize;
#ifndef __USE_FILE_OFFSET64
__fsblkcnt_t f_blocks;
__fsblkcnt_t f_bfree;
@@ -39,27 +39,27 @@ struct statfs
__fsfilcnt64_t f_ffree;
#endif
__fsid_t f_fsid;
- int f_namelen;
- int f_frsize;
- int f_flags;
- int f_spare[4];
+ unsigned int f_namelen;
+ unsigned int f_frsize;
+ unsigned int f_flags;
+ unsigned int f_spare[4];
};
#ifdef __USE_LARGEFILE64
struct statfs64
{
- int f_type;
- int f_bsize;
+ unsigned int f_type;
+ unsigned int f_bsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsfilcnt64_t f_files;
__fsfilcnt64_t f_ffree;
__fsid_t f_fsid;
- int f_namelen;
- int f_frsize;
- int f_flags;
- int f_spare[4];
+ unsigned int f_namelen;
+ unsigned int f_frsize;
+ unsigned int f_flags;
+ unsigned int f_spare[4];
};
#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist
index ae8af50eb8..f836c90d94 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist
@@ -393,6 +393,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.2
GLIBC_2.2 A
fedisableexcept F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist
index acf4d68514..a0891ad252 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist
@@ -81,6 +81,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.2
GLIBC_2.2 A
_LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/setipv4sourcefilter.c b/sysdeps/unix/sysv/linux/setipv4sourcefilter.c
index ff32863102..a9b4d3b4b7 100644
--- a/sysdeps/unix/sysv/linux/setipv4sourcefilter.c
+++ b/sysdeps/unix/sysv/linux/setipv4sourcefilter.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <netinet/in.h>
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/linux/setsourcefilter.c b/sysdeps/unix/sysv/linux/setsourcefilter.c
index 5ae37314bb..f50f293cf0 100644
--- a/sysdeps/unix/sysv/linux/setsourcefilter.c
+++ b/sysdeps/unix/sysv/linux/setsourcefilter.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <netinet/in.h>
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/linux/sh/getgid.c b/sysdeps/unix/sysv/linux/sh/getgid.c
new file mode 100644
index 0000000000..0a4d6061f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sh/getgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/sh/nptl/libm.abilist b/sysdeps/unix/sysv/linux/sh/nptl/libm.abilist
index d85192910f..92821fdbb9 100644
--- a/sysdeps/unix/sysv/linux/sh/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sh/nptl/libm.abilist
@@ -54,6 +54,10 @@ GLIBC_2.15
__y1f_finite F
__yn_finite F
__ynf_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
GLIBC_2.2
GLIBC_2.2 A
_LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
index 85a54625e1..88fa1dfd5e 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
@@ -96,6 +96,7 @@ typedef struct
{
void *si_addr; /* Faulting insn/memory ref. */
int si_trapno;
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -129,6 +130,7 @@ typedef struct
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_trapno _sifields._sigfault.si_trapno
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -219,8 +221,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist
index 4c6ec6b712..9a1fcb1b46 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist
@@ -388,6 +388,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.2
GLIBC_2.2 A
feclearexcept F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist
index 22fb92aec5..2b41d34225 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist
@@ -81,6 +81,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.2
GLIBC_2.2 A
_LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/sys/fsuid.h b/sysdeps/unix/sysv/linux/sys/fsuid.h
index f844a5ff0e..7590313b19 100644
--- a/sysdeps/unix/sysv/linux/sys/fsuid.h
+++ b/sysdeps/unix/sysv/linux/sys/fsuid.h
@@ -25,10 +25,10 @@ __BEGIN_DECLS
/* Change uid used for file access control to UID, without affecting
other privileges (such as who can send signals at the process). */
-extern int setfsuid (__uid_t __uid) __THROW __wur;
+extern int setfsuid (__uid_t __uid) __THROW;
/* Ditto for group id. */
-extern int setfsgid (__gid_t __gid) __THROW __wur;
+extern int setfsgid (__gid_t __gid) __THROW;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/glob64.c b/sysdeps/unix/sysv/linux/wordsize-64/glob64.c
index 33918ea6a5..eab7703d5c 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/glob64.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/glob64.c
@@ -1 +1,2 @@
-/* glob64 is in glob.c */
+/* This file is here so sysdeps/gnu/glob64.c doesn't take precedence. */
+#include <sysdeps/wordsize-64/glob64.c>
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/openat.c b/sysdeps/unix/sysv/linux/wordsize-64/openat.c
index 4921fca335..12e027158c 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/openat.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/openat.c
@@ -1,16 +1,14 @@
#define __openat64 __rename___openat64
-#define __openat64_2 __rename___openat64_2
#define __openat64_nocancel __rename___openat64_nocancel
#define openat64 __rename_openat64
#include "../openat.c"
#undef __openat64
-#undef __openat64_2
#undef __openat64_nocancel
#undef openat64
-weak_alias (__openat, __openat64)
-weak_alias (__openat_2, __openat64_2)
-weak_alias (__openat_nocancel, __openat64_nocancel)
+strong_alias (__openat, __openat64)
+hidden_ver (__openat, __openat64)
+strong_alias (__openat_nocancel, __openat64_nocancel)
weak_alias (openat, openat64)
diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
index 48aef6db64..bfc6aa3b5f 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
@@ -107,6 +107,7 @@ typedef struct
struct
{
void *si_addr; /* Faulting insn/memory ref. */
+ short int si_addr_lsb; /* Valid LSB of the reported address. */
} _sigfault;
/* SIGPOLL. */
@@ -139,6 +140,7 @@ typedef struct
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
+# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
@@ -229,8 +231,12 @@ enum
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR /* Object specific hardware error. */
+ BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
+ BUS_MCEERR_AR, /* Hardware memory error: action required. */
+# define BUS_MCEERR_AR BUS_MCEERR_AR
+ BUS_MCEERR_AO /* Hardware memory error: action optional. */
+# define BUS_MCEERR_AO BUS_MCEERR_AO
};
/* `si_code' values for SIGTRAP signal. */
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libm.abilist
index 7bf568c51c..2390934678 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libm.abilist
@@ -81,6 +81,11 @@ GLIBC_2.15
__yn_finite F
__ynf_finite F
__ynl_finite F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F
GLIBC_2.2.5
GLIBC_2.2.5 A
_LIB_VERSION D 0x4
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c b/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
index 7f6dee309f..32cb0aa074 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
@@ -20,6 +20,7 @@
#include <sys/prctl.h>
#include <sys/syscall.h>
#include <sysdep.h>
+#include <stdint.h>
/* Since x32 arch_prctl stores 32-bit base address of segment registers
%fs and %gs as unsigned 64-bit value via ARCH_GET_FS and ARCH_GET_GS,
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libm.abilist
index 0f3ea4ba40..1825adb1b3 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libm.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libm.abilist
@@ -395,3 +395,8 @@ GLIBC_2.16
yn F
ynf F
ynl F
+GLIBC_2.18
+ GLIBC_2.18 A
+ __issignaling F
+ __issignalingf F
+ __issignalingl F