diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-05-26 17:46:57 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-05-26 17:46:57 +0000 |
commit | d8d5895e420d4976fca22b9bd9e1edc3094ebf30 (patch) | |
tree | f96c015c14ac0428150153ba98f7a681ff021931 /libc/sysdeps/unix/sysv/linux/s390 | |
parent | 62eb53f68d92687a028f3c515489b30e3df1d979 (diff) |
Merge changes between r18519 and r18730 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@18731 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/unix/sysv/linux/s390')
9 files changed, 57 insertions, 93 deletions
diff --git a/libc/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/libc/sysdeps/unix/sysv/linux/s390/bits/hwcap.h new file mode 100644 index 000000000..7f03ffe46 --- /dev/null +++ b/libc/sysdeps/unix/sysv/linux/s390/bits/hwcap.h @@ -0,0 +1,36 @@ +/* Defines for bits in AT_HWCAP. + Copyright (C) 2012 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/>. */ + +#ifndef _SYS_AUXV_H +# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." +#endif + +/* + * The following must match the kernels asm/elf.h. + * Note that these are *not* the same as the STORE FACILITY LIST bits. + */ +#define HWCAP_S390_ESAN3 1 +#define HWCAP_S390_ZARCH 2 +#define HWCAP_S390_STFLE 4 +#define HWCAP_S390_MSA 8 +#define HWCAP_S390_LDISP 16 +#define HWCAP_S390_EIMM 32 +#define HWCAP_S390_DFP 64 +#define HWCAP_S390_HPAGE 128 +#define HWCAP_S390_ETF3EH 256 +#define HWCAP_S390_HIGH_GPRS 512 diff --git a/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h b/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h index 094afbe56..6369e8a81 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h +++ b/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h @@ -97,6 +97,9 @@ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, + overrides the coredump filter bits. */ +# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif diff --git a/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h index af7021f1e..def84cc79 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h +++ b/libc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Linux/s390 version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003-2012 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 @@ -44,6 +44,7 @@ #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE #define __TIME_T_TYPE __SLONGWORD_TYPE @@ -63,7 +64,8 @@ /* size_t is unsigned long int on s390 -m31. */ #define __SSIZE_T_TYPE __SLONGWORD_TYPE #endif -#define __SNSECONDS_T_TYPE __SLONGWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 diff --git a/libc/sysdeps/unix/sysv/linux/s390/gettimeofday.c b/libc/sysdeps/unix/sysv/linux/s390/gettimeofday.c index 63faef85b..efbf1e811 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/gettimeofday.c +++ b/libc/sysdeps/unix/sysv/linux/s390/gettimeofday.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Free Software Foundation, Inc. +/* Copyright (C) 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include <time.h> #include <hp-timing.h> -#undef __gettimeofday #include <bits/libc-vdso.h> /* Get the current time of day and timezone information, @@ -36,6 +35,6 @@ __gettimeofday (tv, tz) { return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz)); } - -INTDEF (__gettimeofday) +libc_hidden_def (__gettimeofday) weak_alias (__gettimeofday, gettimeofday) +libc_hidden_weak (gettimeofday) diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-32/chown.c b/libc/sysdeps/unix/sysv/linux/s390/s390-32/chown.c index bc471454e..cc0503cbc 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/s390-32/chown.c +++ b/libc/sysdeps/unix/sysv/linux/s390/s390-32/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 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 @@ -24,7 +24,6 @@ #include <bp-checks.h> #include <linux/posix_types.h> -#include <kernel-features.h> /* In Linux 2.1.x the chown functions have been changed. A new function lchown @@ -38,58 +37,12 @@ /* Running under Linux > 2.1.80. */ -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ +/* Consider moving to syscalls.list. */ int __real_chown (const char *file, uid_t owner, gid_t group) { -#if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); -#else - static int __libc_old_chown; - int result; - - if (!__libc_old_chown) - { - int saved_errno = errno; -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - int result; - int saved_errno = errno; - - result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); - if (result == 0 || errno != ENOSYS) - return result; - - __set_errno (saved_errno); - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - result = INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); - - if (result >= 0 || errno != ENOSYS) - return result; - - __set_errno (saved_errno); - __libc_old_chown = 1; - } - - return __lchown (file, owner, group); -#endif } diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c b/libc/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c index 754245a8f..6190d02a6 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c +++ b/libc/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 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 @@ -23,46 +23,13 @@ #include <bp-checks.h> #include <linux/posix_types.h> -#include <kernel-features.h> -# ifdef __NR_lchown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -# endif /* __NR_lchown32 */ +/* Consider moving to syscalls.list. */ int __lchown (const char *file, uid_t owner, gid_t group) { -# if __ASSUME_32BITUIDS > 0 return INLINE_SYSCALL (lchown32, 3, CHECK_STRING (file), owner, group); -# else -# ifdef __NR_lchown32 - if (__libc_missing_32bit_uids <= 0) - { - int result; - int saved_errno = errno; - - result = INLINE_SYSCALL (lchown32, 3, CHECK_STRING (file), owner, group); - if (result == 0 || errno != ENOSYS) - return result; - - __set_errno (saved_errno); - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_lchown32 */ - - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - return INLINE_SYSCALL (lchown, 3, CHECK_STRING (file), owner, group); -# endif } weak_alias (__lchown, lchown) diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist b/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist index c015dafbf..728550bdf 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist +++ b/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist @@ -1758,11 +1758,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist b/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist index 8d57add92..1ca4811ea 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist +++ b/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist @@ -75,11 +75,13 @@ GLIBC_2.15 scandirat64 F GLIBC_2.16 GLIBC_2.16 A + __getauxval F __poll_chk F __ppoll_chk F aligned_alloc F c16rtomb F c32rtomb F + getauxval F mbrtoc16 F mbrtoc32 F timespec_get F diff --git a/libc/sysdeps/unix/sysv/linux/s390/sys/ucontext.h b/libc/sysdeps/unix/sysv/linux/s390/sys/ucontext.h index 5dd023461..e66854d9d 100644 --- a/libc/sysdeps/unix/sysv/linux/s390/sys/ucontext.h +++ b/libc/sysdeps/unix/sysv/linux/s390/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). This file is part of the GNU C Library. @@ -33,7 +33,7 @@ typedef struct { unsigned long mask; unsigned long addr; -} __attribute__ ((aligned(8))) __psw_t; +} __attribute__ ((__aligned__(8))) __psw_t; /* Type for a general-purpose register. */ typedef unsigned long greg_t; @@ -49,7 +49,7 @@ typedef unsigned long greg_t; # define NGREG 36 #endif /* Must match kernels psw_t alignment. */ -typedef greg_t gregset_t[NGREG] __attribute__ ((aligned(8))); +typedef greg_t gregset_t[NGREG] __attribute__ ((__aligned__(8))); typedef union { |