1999-05-26 23:37:38 +00:00
|
|
|
/* Set flags signalling availability of kernel features based on given
|
|
|
|
kernel version number.
|
2012-01-07 17:23:45 +00:00
|
|
|
Copyright (C) 1999-2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
1999-05-26 23:37:38 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
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.
|
1999-05-26 23:37:38 +00:00
|
|
|
|
|
|
|
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
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1999-05-26 23:37:38 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
1999-05-26 23:37:38 +00:00
|
|
|
|
|
|
|
/* This file must not contain any C code. At least it must be protected
|
|
|
|
to allow using the file also in assembler files. */
|
|
|
|
|
|
|
|
#ifndef __LINUX_KERNEL_VERSION
|
|
|
|
/* We assume the worst; all kernels should be supported. */
|
|
|
|
# define __LINUX_KERNEL_VERSION 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* We assume for __LINUX_KERNEL_VERSION the same encoding used in
|
|
|
|
linux/version.h. I.e., the major, minor, and subminor all get a
|
|
|
|
byte with the major number being in the highest byte. This means
|
|
|
|
we can do numeric comparisons.
|
|
|
|
|
|
|
|
In the following we will define certain symbols depending on
|
|
|
|
whether the describes kernel feature is available in the kernel
|
|
|
|
version given by __LINUX_KERNEL_VERSION. We are not always exactly
|
|
|
|
recording the correct versions in which the features were
|
|
|
|
introduced. If somebody cares these values can afterwards be
|
2012-05-14 14:11:02 +00:00
|
|
|
corrected. */
|
1999-05-26 23:37:38 +00:00
|
|
|
|
2005-11-19 17:22:39 +00:00
|
|
|
/* The sendfile syscall was introduced in 2.2.0. */
|
2012-05-14 14:11:02 +00:00
|
|
|
#define __ASSUME_SENDFILE 1
|
2006-04-19 07:27:58 +00:00
|
|
|
|
1999-12-19 00:04:05 +00:00
|
|
|
/* On x86 the mmap2 syscall was introduced in 2.3.31. */
|
2012-05-25 19:19:30 +00:00
|
|
|
#ifdef __i386__
|
1999-12-08 23:48:24 +00:00
|
|
|
# define __ASSUME_MMAP2_SYSCALL 1
|
|
|
|
#endif
|
1999-12-19 00:04:05 +00:00
|
|
|
|
|
|
|
/* On x86 the stat64/lstat64/fstat64 syscalls were introduced in 2.3.34. */
|
2012-05-25 19:19:30 +00:00
|
|
|
#ifdef __i386__
|
1999-12-19 00:04:05 +00:00
|
|
|
# define __ASSUME_STAT64_SYSCALL 1
|
|
|
|
#endif
|
Update.
1999-12-23 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-monetary.c (monetary_finish): Add cast to
prevent warning.
* locale/programs/ld-collate.c: Implement writing out multibyte
collation data.
* locale/setlocale.c (setlocale): Allow setting LC_COLLATE again.
* locale/localeinfo.h: Declare variables only for currently implemented
collate functionality. Remove FORWARD_CHAR and ELLIPSIS_CHAR.
* locale/lc-collate.c: Define variables only for currently implemented
functionality.
* locale/langinfo.h: Define symbols only for currently implemented
functionality.
* locale/categories.def: Define elements for currently implemented
functionality.
* locale/C-collate.c: Comment out definitions of arrays with symbol
name definitions etc.
(_nl_C_LC_COLLATE): Update for currently defined information.
* intl/libintl.h: Remove dcgettext macro definition.
* intl/gettextP.h: Declare _nl_msg_cat_cntr.
* locale/iso-4217.def: Add NAD. Remove a few obsolete entries.
* sysdeps/generic/glob.c (glob): Pass alternate file access functions
also in recursive call. Patch by Joe Orton <joe@orton.demon.co.uk>.
1999-12-22 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/fpu/ftestexcept.c (fetestexcept): Use proper type
for __fenv_stfsr argument.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add
truncate64, ftruncate64, fstat64, lstat64, stat64 and mmap2.
Remove ugetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
(XSTAT_IS_XSTAT64): Define.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Add
__libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite
and __libc_pwrite64.
Remove oldgetrlimit and oldsetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c: New file.
* sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Pass the buf
pointer to the syscall, not address of that pointer.
* sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise.
(__syscall_stat64): Provide proper prototype.
* sysdeps/unix/sysv/linux/ftruncate64.c (ftruncate64): Share
has_no_truncate64 between truncate64 and ftruncate64.
* sysdeps/unix/sysv/linux/truncate64.c (truncate64): Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
__ASSUME_STAT64_SYSCALL): Define on Sparc for kernels >= 2.3.35.
1999-12-22 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __libc_lseek64,
__libc_pread, __libc_pread64, __libc_pwrite and __libc_pwrite64.
1999-12-24 05:55:50 +00:00
|
|
|
|
2012-05-30 14:52:34 +00:00
|
|
|
/* On sparc the mmap2/stat64/lstat64/fstat64 syscalls were introduced
|
|
|
|
in 2.3.35. */
|
2012-05-25 19:19:30 +00:00
|
|
|
#if defined __sparc__ && !defined __arch64__
|
Update.
1999-12-23 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-monetary.c (monetary_finish): Add cast to
prevent warning.
* locale/programs/ld-collate.c: Implement writing out multibyte
collation data.
* locale/setlocale.c (setlocale): Allow setting LC_COLLATE again.
* locale/localeinfo.h: Declare variables only for currently implemented
collate functionality. Remove FORWARD_CHAR and ELLIPSIS_CHAR.
* locale/lc-collate.c: Define variables only for currently implemented
functionality.
* locale/langinfo.h: Define symbols only for currently implemented
functionality.
* locale/categories.def: Define elements for currently implemented
functionality.
* locale/C-collate.c: Comment out definitions of arrays with symbol
name definitions etc.
(_nl_C_LC_COLLATE): Update for currently defined information.
* intl/libintl.h: Remove dcgettext macro definition.
* intl/gettextP.h: Declare _nl_msg_cat_cntr.
* locale/iso-4217.def: Add NAD. Remove a few obsolete entries.
* sysdeps/generic/glob.c (glob): Pass alternate file access functions
also in recursive call. Patch by Joe Orton <joe@orton.demon.co.uk>.
1999-12-22 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/fpu/ftestexcept.c (fetestexcept): Use proper type
for __fenv_stfsr argument.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add
truncate64, ftruncate64, fstat64, lstat64, stat64 and mmap2.
Remove ugetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
(XSTAT_IS_XSTAT64): Define.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Add
__libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite
and __libc_pwrite64.
Remove oldgetrlimit and oldsetrlimit.
* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c: New file.
* sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Pass the buf
pointer to the syscall, not address of that pointer.
* sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise.
(__syscall_stat64): Provide proper prototype.
* sysdeps/unix/sysv/linux/ftruncate64.c (ftruncate64): Share
has_no_truncate64 between truncate64 and ftruncate64.
* sysdeps/unix/sysv/linux/truncate64.c (truncate64): Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
__ASSUME_STAT64_SYSCALL): Define on Sparc for kernels >= 2.3.35.
1999-12-22 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __libc_lseek64,
__libc_pread, __libc_pread64, __libc_pwrite and __libc_pwrite64.
1999-12-24 05:55:50 +00:00
|
|
|
# define __ASSUME_MMAP2_SYSCALL 1
|
|
|
|
# define __ASSUME_STAT64_SYSCALL 1
|
|
|
|
#endif
|
2000-01-17 05:24:52 +00:00
|
|
|
|
2002-09-29 20:44:22 +00:00
|
|
|
/* I know for sure that these are in 2.3.35 on powerpc. But PowerPC64 does not
|
2010-03-27 11:48:18 +00:00
|
|
|
support separate 64-bit syscalls, already 64-bit. */
|
2012-05-25 19:19:30 +00:00
|
|
|
#if defined __powerpc__ && !defined __powerpc64__
|
* csu/Makefile ($(objpfx)version-info.h): Don't use echo -n
unnecessarily.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_STAT64_SYSCALL, __ASSUME_TRUNCATE64_SYSCALL,
__ASSUME_NEW_GETRLIMIT_SYSCALL): Define on powerpc for kernels >=
2.3.35.
* sysdeps/unix/sysv/linux/powerpc/bits/resource.h: New file.
* sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/getrlimit.c: New file.
* sysdeps/unix/sysv/linux/powerpc/getrlimit64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/mmap64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/setrlimit.c: New file.
* sysdeps/unix/sysv/linux/powerpc/setrlimit64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add
s_fstat64, s_ftruncate64, s_lstat64, s_mmap2, s_stat64,
s_truncate64.
* sysdeps/unix/sysv/linux/powerpc/truncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/Versions: New file.
* sysdeps/unix/sysv/linux/powerpc/brk.S [!PIC]: Don't access
__curbrk off the small data area register. Reported by
Andrew Haley <aph@pasanda.cygnus.co.uk>.
2000-01-27 Geoff Keating <geoffk@cygnus.com>
* csu/Makefile ($(objpfx)version-info.h): Don't use echo -n
unnecessarily.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_STAT64_SYSCALL, __ASSUME_TRUNCATE64_SYSCALL,
__ASSUME_NEW_GETRLIMIT_SYSCALL): Define on powerpc for kernels >=
2.3.35.
* sysdeps/unix/sysv/linux/powerpc/bits/resource.h: New file.
* sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/getrlimit.c: New file.
* sysdeps/unix/sysv/linux/powerpc/getrlimit64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/mmap64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/setrlimit.c: New file.
* sysdeps/unix/sysv/linux/powerpc/setrlimit64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add
s_fstat64, s_ftruncate64, s_lstat64, s_mmap2, s_stat64,
s_truncate64.
* sysdeps/unix/sysv/linux/powerpc/truncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/Versions: New file.
* sysdeps/unix/sysv/linux/powerpc/brk.S [!PIC]: Don't access
__curbrk off the small data area register. Reported by
Andrew Haley <aph@pasanda.cygnus.co.uk>.
2000-01-27 23:40:48 +00:00
|
|
|
# define __ASSUME_STAT64_SYSCALL 1
|
|
|
|
#endif
|
|
|
|
|
2012-05-25 19:19:30 +00:00
|
|
|
/* Linux 2.3.39 introduced IPC64. Except for powerpc. Linux 2.4.0 on
|
|
|
|
PPC introduced a correct IPC64. But PowerPC64 does not support a
|
|
|
|
separate 64-bit syscall, already 64-bit. */
|
|
|
|
#ifndef __powerpc64__
|
2002-09-17 07:53:26 +00:00
|
|
|
# define __ASSUME_IPC64 1
|
|
|
|
#endif
|
|
|
|
|
2012-05-30 14:52:34 +00:00
|
|
|
/* SH kernels got stat64 and mmap2 during 2.4.0-test. */
|
2012-05-25 19:19:30 +00:00
|
|
|
#ifdef __sh__
|
2003-06-26 08:00:21 +00:00
|
|
|
# define __ASSUME_MMAP2_SYSCALL 1
|
|
|
|
# define __ASSUME_STAT64_SYSCALL 1
|
2000-05-24 15:33:21 +00:00
|
|
|
#endif
|
Update.
2000-08-11 Ulrich Drepper <drepper@redhat.com>
* rt/aio_cancel.c: If canceling a specific request which is running
*really* do nothing.
* rt/aio_misc.h: Add `done' to states of a request.
* rt/aio_misc.c: Add several tests for the correct state.
Simplify request table memory handling.
2000-08-10 Jakub Jelinek <jakub@redhat.com>
* dirent/scandir.c: Use it for scandir64 and old_scandir64 as well.
* dirent/scandir64.c: Move...
* sysdeps/generic/scandir64.c: ...here.
* dirent/alphasort64.c: Move...
* sysdeps/generic/alphasort64.c: ...here.
* dirent/versionsort64.c: Move...
* sysdeps/generic/versionsort64.c: ...here.
* sysdeps/unix/sysv/linux/i386/dirent/Versions (alphasort64,
getdirentries64, readdir64, readdir64_r, scandir64, versionsort64):
Export symbols at GLIBC_2.2.
* sysdeps/unix/sysv/linux/powerpc/dirent/Versions: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/dirent/Versions: Likewise.
* include/dirent.h (__readdir64_r, __scandir64, __alphasort64,
__versionsort64): Add prototypes.
* io/Versions (__xstat64, __fxstat64, __lxstat64): Export at GLIBC_2.2.
* sysdeps/unix/sysv/linux/alpha/kernel_stat.h (__xstat_conv): Remove
unused prototype.
* sysdeps/unix/sysv/linux/alpha/readdir.c: Export at both GLIBC_2.1
and GLIBC_2.2.
* sysdeps/unix/sysv/linux/alpha/readdir_r.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/getdents.c: New.
* sysdeps/unix/sysv/linux/alpha/getdents64.c: New.
* sysdeps/unix/sysv/linux/bits/types.h (__ino64_t): Change to
__u_quad_t.
* sysdeps/unix/sysv/linux/bits/stat.h (struct stat, struct stat64):
Adjust for kernel-2.4.0-test6 layout.
* sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat64): Export at both
GLIBC_2.1 and GLIBC_2.2.
* sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c (__xstat64): Likewise.
* sysdeps/unix/sysv/linux/i386/getdents64.c: New.
* sysdeps/unix/sysv/linux/i386/olddirent.h: New.
* sysdeps/unix/sysv/linux/i386/readdir64.c: New.
* sysdeps/unix/sysv/linux/i386/readdir64_r.c: New.
* sysdeps/unix/sysv/linux/i386/scandir64.c: New.
* sysdeps/unix/sysv/linux/i386/alphasort64.c: New.
* sysdeps/unix/sysv/linux/i386/versionsort64.c: New.
* sysdeps/unix/sysv/linux/ia64/getdents.c: New.
* sysdeps/unix/sysv/linux/ia64/getdents64.c: New.
* sysdeps/unix/sysv/linux/ia64/readdir.c: Include alpha/readdir.c.
* sysdeps/unix/sysv/linux/ia64/readdir_r.c: Include alpha/readdir_r.c.
* sysdeps/unix/sysv/linux/mips/bits/types.h (__ino64_t): Change to
__u_quad_t.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: New.
* sysdeps/unix/sysv/linux/powerpc/kernel_stat.h (_HAVE_STAT*): Define.
* sysdeps/unix/sysv/linux/powerpc/scandir64.c: New.
* sysdeps/unix/sysv/linux/powerpc/getdents64.c: New.
* sysdeps/unix/sysv/linux/powerpc/readdir64.c: New.
* sysdeps/unix/sysv/linux/powerpc/readdir64_r.c: New.
* sysdeps/unix/sysv/linux/sparc/bits/types.h (__ino64_t): Change to
__u_quad_t.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h (_HAVE_STAT*):
Define.
* sysdeps/unix/sysv/linux/sparc/sparc32/getdents64.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/readdir64.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/readdir64_r.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/scandir64.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h (_HAVE_STAT*):
Define.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c: Include
alpha/readdir.c.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c: Include
alpha/readdir_r.c
* sysdeps/unix/sysv/linux/sparc/sparc64/getdents.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc64/getdents64.c: New.
* sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): If
_HAVE_STAT64___ST_INO and __st_ino != (uint32_t)st_ino, set
st_ino from __st_ino.
* sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise.
* sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv, xstat64_conv,
xstat32_conv): Use _HAVE_STAT* macros. If _HAVE_STAT64___ST_INO,
set __st_ino in addition to st_ino.
* sysdeps/unix/sysv/linux/kernel_stat.h (_HAVE_STAT*): Define.
* sysdeps/unix/sysv/linux/getdents.c: Use it for __getdents64 and
__old_getdents64 as well.
* sysdeps/unix/sysv/linux/getdirentries.c: Use it for
getdirentries64 and old_getdirentries64 as well.
* sysdeps/unix/sysv/linux/getdirentries64.c (GETDIRENTRIES,
__GETDENTS): Define.
(GETDENTS64): Remove.
* sysdeps/unix/sysv/linux/getdents64.c (__GETDENTS, DIRENT_TYPE):
Define.
(GETDENTS64): Remove.
* sysdeps/unix/sysv/linux/readdir64.c: Use sysdeps/unix/readdir.c.
* sysdeps/unix/sysv/linux/readdir64_r.c: Use sysdeps/unix/readdir_r.c.
* sysdeps/unix/readdir.c: Use it for readdir64 and __old_readdir64
as well.
* sysdeps/unix/readdir_r.c: Use it for readdir64_r and
__old_readdir64_r as well.
* sysdeps/unix/sysv/linux/kernel-features.h: Define
__ASSUME_ST_INO_64_bit for kernel 2.4.1 and up.
* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Add SI_KERNEL define.
2000-08-12 05:14:52 +00:00
|
|
|
|
2012-07-12 12:31:32 +00:00
|
|
|
/* The changed st_ino field appeared in 2.4.0-test6. However, SH is lame,
|
2003-06-26 08:00:21 +00:00
|
|
|
and still does not have a 64-bit inode field. */
|
2012-07-12 12:31:32 +00:00
|
|
|
#ifndef __sh__
|
Update.
2000-08-11 Ulrich Drepper <drepper@redhat.com>
* rt/aio_cancel.c: If canceling a specific request which is running
*really* do nothing.
* rt/aio_misc.h: Add `done' to states of a request.
* rt/aio_misc.c: Add several tests for the correct state.
Simplify request table memory handling.
2000-08-10 Jakub Jelinek <jakub@redhat.com>
* dirent/scandir.c: Use it for scandir64 and old_scandir64 as well.
* dirent/scandir64.c: Move...
* sysdeps/generic/scandir64.c: ...here.
* dirent/alphasort64.c: Move...
* sysdeps/generic/alphasort64.c: ...here.
* dirent/versionsort64.c: Move...
* sysdeps/generic/versionsort64.c: ...here.
* sysdeps/unix/sysv/linux/i386/dirent/Versions (alphasort64,
getdirentries64, readdir64, readdir64_r, scandir64, versionsort64):
Export symbols at GLIBC_2.2.
* sysdeps/unix/sysv/linux/powerpc/dirent/Versions: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/dirent/Versions: Likewise.
* include/dirent.h (__readdir64_r, __scandir64, __alphasort64,
__versionsort64): Add prototypes.
* io/Versions (__xstat64, __fxstat64, __lxstat64): Export at GLIBC_2.2.
* sysdeps/unix/sysv/linux/alpha/kernel_stat.h (__xstat_conv): Remove
unused prototype.
* sysdeps/unix/sysv/linux/alpha/readdir.c: Export at both GLIBC_2.1
and GLIBC_2.2.
* sysdeps/unix/sysv/linux/alpha/readdir_r.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/getdents.c: New.
* sysdeps/unix/sysv/linux/alpha/getdents64.c: New.
* sysdeps/unix/sysv/linux/bits/types.h (__ino64_t): Change to
__u_quad_t.
* sysdeps/unix/sysv/linux/bits/stat.h (struct stat, struct stat64):
Adjust for kernel-2.4.0-test6 layout.
* sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat64): Export at both
GLIBC_2.1 and GLIBC_2.2.
* sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c (__xstat64): Likewise.
* sysdeps/unix/sysv/linux/i386/getdents64.c: New.
* sysdeps/unix/sysv/linux/i386/olddirent.h: New.
* sysdeps/unix/sysv/linux/i386/readdir64.c: New.
* sysdeps/unix/sysv/linux/i386/readdir64_r.c: New.
* sysdeps/unix/sysv/linux/i386/scandir64.c: New.
* sysdeps/unix/sysv/linux/i386/alphasort64.c: New.
* sysdeps/unix/sysv/linux/i386/versionsort64.c: New.
* sysdeps/unix/sysv/linux/ia64/getdents.c: New.
* sysdeps/unix/sysv/linux/ia64/getdents64.c: New.
* sysdeps/unix/sysv/linux/ia64/readdir.c: Include alpha/readdir.c.
* sysdeps/unix/sysv/linux/ia64/readdir_r.c: Include alpha/readdir_r.c.
* sysdeps/unix/sysv/linux/mips/bits/types.h (__ino64_t): Change to
__u_quad_t.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: New.
* sysdeps/unix/sysv/linux/powerpc/kernel_stat.h (_HAVE_STAT*): Define.
* sysdeps/unix/sysv/linux/powerpc/scandir64.c: New.
* sysdeps/unix/sysv/linux/powerpc/getdents64.c: New.
* sysdeps/unix/sysv/linux/powerpc/readdir64.c: New.
* sysdeps/unix/sysv/linux/powerpc/readdir64_r.c: New.
* sysdeps/unix/sysv/linux/sparc/bits/types.h (__ino64_t): Change to
__u_quad_t.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h (_HAVE_STAT*):
Define.
* sysdeps/unix/sysv/linux/sparc/sparc32/getdents64.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/readdir64.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/readdir64_r.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc32/scandir64.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h (_HAVE_STAT*):
Define.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c: Include
alpha/readdir.c.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c: Include
alpha/readdir_r.c
* sysdeps/unix/sysv/linux/sparc/sparc64/getdents.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc64/getdents64.c: New.
* sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): If
_HAVE_STAT64___ST_INO and __st_ino != (uint32_t)st_ino, set
st_ino from __st_ino.
* sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise.
* sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv, xstat64_conv,
xstat32_conv): Use _HAVE_STAT* macros. If _HAVE_STAT64___ST_INO,
set __st_ino in addition to st_ino.
* sysdeps/unix/sysv/linux/kernel_stat.h (_HAVE_STAT*): Define.
* sysdeps/unix/sysv/linux/getdents.c: Use it for __getdents64 and
__old_getdents64 as well.
* sysdeps/unix/sysv/linux/getdirentries.c: Use it for
getdirentries64 and old_getdirentries64 as well.
* sysdeps/unix/sysv/linux/getdirentries64.c (GETDIRENTRIES,
__GETDENTS): Define.
(GETDENTS64): Remove.
* sysdeps/unix/sysv/linux/getdents64.c (__GETDENTS, DIRENT_TYPE):
Define.
(GETDENTS64): Remove.
* sysdeps/unix/sysv/linux/readdir64.c: Use sysdeps/unix/readdir.c.
* sysdeps/unix/sysv/linux/readdir64_r.c: Use sysdeps/unix/readdir_r.c.
* sysdeps/unix/readdir.c: Use it for readdir64 and __old_readdir64
as well.
* sysdeps/unix/readdir_r.c: Use it for readdir64_r and
__old_readdir64_r as well.
* sysdeps/unix/sysv/linux/kernel-features.h: Define
__ASSUME_ST_INO_64_bit for kernel 2.4.1 and up.
* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Add SI_KERNEL define.
2000-08-12 05:14:52 +00:00
|
|
|
# define __ASSUME_ST_INO_64_BIT 1
|
|
|
|
#endif
|
2000-08-12 08:22:14 +00:00
|
|
|
|
2012-07-12 12:31:32 +00:00
|
|
|
/* The getdents64 syscall was introduced in 2.4.0-test7 (but later for
|
|
|
|
MIPS n32). */
|
|
|
|
#define __ASSUME_GETDENTS64_SYSCALL 1
|
2002-07-20 17:31:30 +00:00
|
|
|
|
2002-09-17 07:53:26 +00:00
|
|
|
/* Starting with 2.4.5 kernels the mmap2 syscall made it into the official
|
|
|
|
kernel. But PowerPC64 does not support a separate MMAP2 call. */
|
2012-07-25 21:19:13 +00:00
|
|
|
#if defined __powerpc__ && !defined __powerpc64__
|
2001-05-20 11:56:03 +00:00
|
|
|
# define __ASSUME_MMAP2_SYSCALL 1
|
2001-04-11 04:42:14 +00:00
|
|
|
#endif
|
2001-04-25 20:20:41 +00:00
|
|
|
|
2002-12-19 08:41:52 +00:00
|
|
|
/* The late 2.5 kernels saw a lot of new CLONE_* flags. Summarize
|
|
|
|
their availability with one define. The changes were made first
|
|
|
|
for i386 and the have to be done separately for the other archs.
|
2006-02-22 07:28:05 +00:00
|
|
|
For i386 we pick 2.5.50 as the first version with support.
|
2012-03-12 22:51:15 +00:00
|
|
|
For s390*, SPARC, PPC, x86-64, and SH we pick 2.5.64 as the first
|
2006-02-22 07:28:05 +00:00
|
|
|
version with support. */
|
2012-08-03 13:42:47 +00:00
|
|
|
#if (defined __i386__ || defined __s390__ || defined __sparc__ \
|
|
|
|
|| defined __powerpc__ || defined __x86_64__ || defined __sh__)
|
2002-12-19 08:41:52 +00:00
|
|
|
# define __ASSUME_CLONE_THREAD_FLAGS 1
|
|
|
|
#endif
|
2003-01-10 14:09:38 +00:00
|
|
|
|
2003-03-03 04:57:09 +00:00
|
|
|
/* Beginning with 2.5.63 support for realtime and monotonic clocks and
|
|
|
|
timers based on them is available. */
|
2012-08-03 13:42:47 +00:00
|
|
|
#define __ASSUME_POSIX_TIMERS 1
|
2003-03-11 19:02:26 +00:00
|
|
|
|
2005-12-06 00:35:22 +00:00
|
|
|
/* Beginning with 2.6.12 the clock and timer supports CPU clocks. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x2060c
|
|
|
|
# define __ASSUME_POSIX_CPU_TIMERS 1
|
|
|
|
#endif
|
|
|
|
|
2012-08-03 13:42:47 +00:00
|
|
|
/* The statfs64 syscalls are available in 2.5.74 (but not for alpha). */
|
|
|
|
#define __ASSUME_STATFS64 1
|
2003-06-26 19:54:29 +00:00
|
|
|
|
2010-05-05 07:26:14 +00:00
|
|
|
/* The tgkill syscall was instroduced for i386 in 2.5.75. On x86-64,
|
2012-03-12 22:51:15 +00:00
|
|
|
sparc, SH, ppc, and ppc64 it was introduced in 2.6.0-test3. */
|
2012-08-03 13:42:47 +00:00
|
|
|
#if defined __i386__ \
|
2012-03-12 22:51:15 +00:00
|
|
|
|| (__LINUX_KERNEL_VERSION >= 132609 \
|
|
|
|
&& (defined __x86_64__ || defined __powerpc__ \
|
|
|
|
|| defined __sh__ || defined __sparc__))
|
2003-07-08 03:40:49 +00:00
|
|
|
# define __ASSUME_TGKILL 1
|
|
|
|
#endif
|
2003-07-12 08:23:50 +00:00
|
|
|
|
2003-07-12 18:48:39 +00:00
|
|
|
/* The utimes syscall has been available for some architectures
|
2005-05-03 22:59:51 +00:00
|
|
|
forever. For x86 it was introduced after 2.5.75, for x86-64,
|
2005-04-28 22:31:00 +00:00
|
|
|
ppc, and ppc64 it was introduced in 2.6.0-test3. */
|
2012-01-07 17:23:45 +00:00
|
|
|
#if defined __sparc__ \
|
2012-08-03 13:42:47 +00:00
|
|
|
|| defined __i386__ \
|
2004-03-20 06:16:26 +00:00
|
|
|
|| (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \
|
2005-04-28 22:31:00 +00:00
|
|
|
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \
|
2004-03-20 06:16:26 +00:00
|
|
|
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __sh__)
|
2003-07-12 08:23:50 +00:00
|
|
|
# define __ASSUME_UTIMES 1
|
|
|
|
#endif
|
2003-08-03 05:23:52 +00:00
|
|
|
|
2004-09-10 21:16:28 +00:00
|
|
|
// XXX Disabled for now since the semantics we want is not achieved.
|
|
|
|
#if 0
|
2003-08-03 05:23:52 +00:00
|
|
|
/* The CLONE_STOPPED flag was introduced in the 2.6.0-test1 series. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 132609
|
|
|
|
# define __ASSUME_CLONE_STOPPED 1
|
|
|
|
#endif
|
2004-09-10 21:16:28 +00:00
|
|
|
#endif
|
2003-08-16 06:21:46 +00:00
|
|
|
|
|
|
|
/* The fixed version of the posix_fadvise64 syscall appeared in
|
2012-03-12 22:51:15 +00:00
|
|
|
2.6.0-test3. At least for x86 and sparc. Powerpc support appeared
|
|
|
|
in 2.6.2, but for 32-bit userspace only. */
|
|
|
|
#if (__LINUX_KERNEL_VERSION >= 132609 \
|
|
|
|
&& (defined __i386__ || defined __sparc__)) \
|
2005-04-28 22:31:00 +00:00
|
|
|
|| (__LINUX_KERNEL_VERSION >= 132610 && defined __powerpc__ \
|
|
|
|
&& !defined __powerpc64__)
|
2003-08-16 06:21:46 +00:00
|
|
|
# define __ASSUME_FADVISE64_64_SYSCALL 1
|
|
|
|
#endif
|
2003-11-27 05:24:58 +00:00
|
|
|
|
|
|
|
/* The PROT_GROWSDOWN/PROT_GROWSUP flags were introduced in the 2.6.0-test
|
|
|
|
series. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 132609
|
|
|
|
# define __ASSUME_PROT_GROWSUPDOWN 1
|
|
|
|
#endif
|
Update.
2004-01-14 Steven Munroe <sjmunroe@us.ibm.com>
* include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME]
(_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed symbols.
(_default_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed
symbols.
* sysdeps/powerpc/Makefile: Add rtld-global-offsets.sym to
gen-as-const-headers.
* sysdeps/powerpc/elf/rtld-global-offsets.sym: New file.
* sysdeps/powerpc/sysdep.h: Define v# symbols for vector registers.
Define PPC_FEATURE_* masks for Aux Vector AT_HWCAP.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_SWAPCONTEXT_SYSCALL): Define for PPC and 2.6.0 kernels.
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h [!__WORDSIZE == 32]:
Declare mcontext_t inline and include altivec state for 64-bit.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, and swapcontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
(__makecontext): Use parm save area instead of compiler_dw to hold
context pointer.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_swapcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
(SIGCONTEXT_V_REGS_PTR, SIGCONTEXT_V_RESERVE): Defined.
2004-01-12 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
(__makecontext): Upgrade to align for Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_makecontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)]
(__novec_swapcontext): Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h:
(_UC_VSCR, _UC_VRSAVE): Define.
(_FRAME_BACKCHAIN, _FRAME_LR_SAVE,_FRAME_PARM_SAVE1,_FRAME_PARM_SAVE2,
_FRAME_PARM_SAVE3, _FRAME_PARM_SAVE4): Defined.
2004-01-16 04:50:59 +00:00
|
|
|
|
2004-01-21 01:30:36 +00:00
|
|
|
/* Starting with 2.6.0 PowerPC adds signal/swapcontext support for Vector
|
|
|
|
SIMD (AKA Altivec, VMX) instructions and register state. This changes
|
Update.
2004-01-14 Steven Munroe <sjmunroe@us.ibm.com>
* include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME]
(_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed symbols.
(_default_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed
symbols.
* sysdeps/powerpc/Makefile: Add rtld-global-offsets.sym to
gen-as-const-headers.
* sysdeps/powerpc/elf/rtld-global-offsets.sym: New file.
* sysdeps/powerpc/sysdep.h: Define v# symbols for vector registers.
Define PPC_FEATURE_* masks for Aux Vector AT_HWCAP.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_SWAPCONTEXT_SYSCALL): Define for PPC and 2.6.0 kernels.
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h [!__WORDSIZE == 32]:
Declare mcontext_t inline and include altivec state for 64-bit.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, and swapcontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
(__makecontext): Use parm save area instead of compiler_dw to hold
context pointer.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_swapcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
(SIGCONTEXT_V_REGS_PTR, SIGCONTEXT_V_RESERVE): Defined.
2004-01-12 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
(__makecontext): Upgrade to align for Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_makecontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)]
(__novec_swapcontext): Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h:
(_UC_VSCR, _UC_VRSAVE): Define.
(_FRAME_BACKCHAIN, _FRAME_LR_SAVE,_FRAME_PARM_SAVE1,_FRAME_PARM_SAVE2,
_FRAME_PARM_SAVE3, _FRAME_PARM_SAVE4): Defined.
2004-01-16 04:50:59 +00:00
|
|
|
the overall size of the sigcontext and adds the swapcontext syscall. */
|
2012-08-03 13:42:47 +00:00
|
|
|
#ifdef __powerpc__
|
2004-03-01 21:34:36 +00:00
|
|
|
# define __ASSUME_SWAPCONTEXT_SYSCALL 1
|
Update.
2004-01-14 Steven Munroe <sjmunroe@us.ibm.com>
* include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME]
(_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed symbols.
(_default_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed
symbols.
* sysdeps/powerpc/Makefile: Add rtld-global-offsets.sym to
gen-as-const-headers.
* sysdeps/powerpc/elf/rtld-global-offsets.sym: New file.
* sysdeps/powerpc/sysdep.h: Define v# symbols for vector registers.
Define PPC_FEATURE_* masks for Aux Vector AT_HWCAP.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_SWAPCONTEXT_SYSCALL): Define for PPC and 2.6.0 kernels.
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h [!__WORDSIZE == 32]:
Declare mcontext_t inline and include altivec state for 64-bit.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, and swapcontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
(__makecontext): Use parm save area instead of compiler_dw to hold
context pointer.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_swapcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
(SIGCONTEXT_V_REGS_PTR, SIGCONTEXT_V_RESERVE): Defined.
2004-01-12 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
(__makecontext): Upgrade to align for Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_makecontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)]
(__novec_swapcontext): Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h:
(_UC_VSCR, _UC_VRSAVE): Define.
(_FRAME_BACKCHAIN, _FRAME_LR_SAVE,_FRAME_PARM_SAVE1,_FRAME_PARM_SAVE2,
_FRAME_PARM_SAVE3, _FRAME_PARM_SAVE4): Defined.
2004-01-16 04:50:59 +00:00
|
|
|
#endif
|
2004-01-21 01:30:36 +00:00
|
|
|
|
|
|
|
/* The CLONE_DETACHED flag is not necessary in 2.6.2 kernels, it is
|
|
|
|
implied. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 132610
|
2004-03-01 21:34:36 +00:00
|
|
|
# define __ASSUME_NO_CLONE_DETACHED 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Starting with version 2.6.4-rc1 the getdents syscall returns d_type
|
2006-01-06 07:30:36 +00:00
|
|
|
information as well and in between 2.6.5 and 2.6.8 most compat wrappers
|
|
|
|
were fixed too. Except s390{,x} which was fixed in 2.6.11. */
|
|
|
|
#if (__LINUX_KERNEL_VERSION >= 0x020608 && !defined __s390__) \
|
|
|
|
|| (__LINUX_KERNEL_VERSION >= 0x02060b && defined __s390__)
|
2004-03-01 21:34:36 +00:00
|
|
|
# define __ASSUME_GETDENTS32_D_TYPE 1
|
2004-01-21 01:30:36 +00:00
|
|
|
#endif
|
2004-08-15 23:33:02 +00:00
|
|
|
|
2005-04-28 22:31:00 +00:00
|
|
|
/* Starting with version 2.6.9, the waitid system call is available.
|
2006-01-06 07:30:36 +00:00
|
|
|
Except for powerpc{,64} and s390{,x}, where it is available in 2.6.12. */
|
|
|
|
#if (__LINUX_KERNEL_VERSION >= 0x020609 \
|
|
|
|
&& !defined __powerpc__ && !defined __s390__) \
|
|
|
|
|| (__LINUX_KERNEL_VERSION >= 0x02060c \
|
|
|
|
&& (defined __powerpc__ || defined __s390__))
|
2004-09-01 19:39:17 +00:00
|
|
|
# define __ASSUME_WAITID_SYSCALL 1
|
|
|
|
#endif
|
2004-09-06 02:19:36 +00:00
|
|
|
|
2006-01-09 19:50:01 +00:00
|
|
|
/* On sparc64 stat64/lstat64/fstat64 syscalls were introduced in 2.6.12. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x02060c && defined __sparc__ \
|
|
|
|
&& defined __arch64__
|
|
|
|
# define __ASSUME_STAT64_SYSCALL 1
|
|
|
|
#endif
|
2006-01-16 16:49:27 +00:00
|
|
|
|
2007-08-14 03:21:23 +00:00
|
|
|
/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way
|
|
|
|
the kernel versions are advertised we can only rely on 2.6.17 to have
|
|
|
|
the code. On x86_64 and SH this appeared first in 2.6.19-rc1,
|
2010-05-05 07:26:14 +00:00
|
|
|
on ia64 in 2.6.22-rc1. */
|
2007-08-14 03:21:23 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020611 \
|
2012-01-07 17:23:45 +00:00
|
|
|
&& ((!defined __x86_64__ && !defined __sh__) \
|
2007-08-14 03:21:23 +00:00
|
|
|
|| (__LINUX_KERNEL_VERSION >= 0x020613 \
|
2012-01-07 17:23:45 +00:00
|
|
|
&& (defined __x86_64__ || defined __sh__)))
|
2006-01-20 07:08:05 +00:00
|
|
|
# define __ASSUME_PSELECT 1
|
2007-08-14 03:21:23 +00:00
|
|
|
# define __ASSUME_PPOLL 1
|
2006-01-20 07:08:05 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the
|
|
|
|
kernel versions are advertised we can only rely on 2.6.17 to have
|
2010-05-05 07:26:14 +00:00
|
|
|
the code. On PPC they were introduced in 2.6.17-rc1,
|
|
|
|
on SH in 2.6.19-rc1. */
|
2007-08-14 03:21:23 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020611 \
|
2010-05-05 07:26:14 +00:00
|
|
|
&& (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613)
|
2006-01-20 07:08:05 +00:00
|
|
|
# define __ASSUME_ATFCTS 1
|
|
|
|
#endif
|
2006-03-28 04:25:17 +00:00
|
|
|
|
|
|
|
/* Support for inter-process robust mutexes was added in 2.6.17. */
|
2007-08-14 03:21:23 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020611 \
|
2010-05-05 07:26:14 +00:00
|
|
|
&& (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613)
|
2006-03-28 04:25:17 +00:00
|
|
|
# define __ASSUME_SET_ROBUST_LIST 1
|
|
|
|
#endif
|
2006-07-29 05:07:43 +00:00
|
|
|
|
2009-04-03 17:23:13 +00:00
|
|
|
/* Pessimistically assume that 2.6.18 introduced real handling of
|
|
|
|
large numbers of requests to readv and writev and that we don't
|
|
|
|
need a fallback. It likely worked for much longer. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020612
|
|
|
|
# define __ASSUME_COMPLETE_READV_WRITEV 1
|
|
|
|
#endif
|
|
|
|
|
2006-07-29 05:07:43 +00:00
|
|
|
/* Support for PI futexes was added in 2.6.18. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020612
|
|
|
|
# define __ASSUME_FUTEX_LOCK_PI 1
|
|
|
|
#endif
|
2007-05-10 21:44:41 +00:00
|
|
|
|
2010-05-05 07:26:14 +00:00
|
|
|
/* Support for utimensat syscall was added in 2.6.22, on SH
|
2007-08-14 03:21:23 +00:00
|
|
|
only after 2.6.22-rc1. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020616 \
|
2010-05-05 07:26:14 +00:00
|
|
|
&& (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020617)
|
2007-05-10 21:44:41 +00:00
|
|
|
# define __ASSUME_UTIMENSAT 1
|
|
|
|
#endif
|
2007-05-19 19:07:59 +00:00
|
|
|
|
|
|
|
/* Support for private futexes was added in 2.6.22. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020616
|
|
|
|
# define __ASSUME_PRIVATE_FUTEX 1
|
|
|
|
#endif
|
2007-07-23 18:09:13 +00:00
|
|
|
|
2007-08-14 03:21:23 +00:00
|
|
|
/* Support for fallocate was added in 2.6.23, on s390
|
|
|
|
only after 2.6.23-rc1. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020617 \
|
2010-05-05 07:26:14 +00:00
|
|
|
&& (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618)
|
2007-07-23 18:09:13 +00:00
|
|
|
# define __ASSUME_FALLOCATE 1
|
|
|
|
#endif
|
2007-12-10 23:51:42 +00:00
|
|
|
|
2008-07-31 20:12:34 +00:00
|
|
|
/* Support for various CLOEXEC and NONBLOCK flags was added for x86,
|
|
|
|
x86-64, PPC, IA-64, SPARC< and S390 in 2.6.23. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020617 \
|
|
|
|
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
|
2012-01-07 17:23:45 +00:00
|
|
|
|| defined __sparc__ || defined __s390__)
|
2008-07-31 20:12:34 +00:00
|
|
|
# define __ASSUME_O_CLOEXEC 1
|
|
|
|
#endif
|
|
|
|
|
2007-12-10 23:51:42 +00:00
|
|
|
/* Support for ADJ_OFFSET_SS_READ was added in 2.6.24. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020618
|
|
|
|
# define __ASSUME_ADJ_OFFSET_SS_READ 1
|
|
|
|
#endif
|
2008-07-24 18:33:44 +00:00
|
|
|
|
2008-07-26 05:41:16 +00:00
|
|
|
/* Support for various CLOEXEC and NONBLOCK flags was added for x86,
|
2008-07-26 05:44:56 +00:00
|
|
|
x86-64, PPC, IA-64, and SPARC in 2.6.27. */
|
2008-07-25 05:30:10 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x02061b \
|
2008-07-26 05:41:16 +00:00
|
|
|
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
|
2012-01-07 17:23:45 +00:00
|
|
|
|| defined __sparc__ || defined __s390__)
|
2008-07-25 05:30:10 +00:00
|
|
|
# define __ASSUME_SOCK_CLOEXEC 1
|
|
|
|
# define __ASSUME_IN_NONBLOCK 1
|
2008-07-27 18:26:13 +00:00
|
|
|
# define __ASSUME_PIPE2 1
|
2009-07-26 19:55:03 +00:00
|
|
|
# define __ASSUME_EVENTFD2 1
|
|
|
|
# define __ASSUME_SIGNALFD4 1
|
2011-05-15 19:28:46 +00:00
|
|
|
# define __ASSUME_DUP3 1
|
2008-12-03 04:23:18 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Support for the accept4 syscall was added in 2.6.28. */
|
2008-12-08 04:08:51 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x02061c \
|
2008-12-03 04:23:18 +00:00
|
|
|
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
|
2009-05-22 01:23:57 +00:00
|
|
|
|| defined __sparc__ || defined __s390__)
|
2008-12-03 04:23:18 +00:00
|
|
|
# define __ASSUME_ACCEPT4 1
|
2008-07-25 05:30:10 +00:00
|
|
|
#endif
|
2009-01-03 01:52:29 +00:00
|
|
|
|
|
|
|
/* Support for the FUTEX_CLOCK_REALTIME flag was added in 2.6.29. */
|
2009-01-03 03:45:07 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x02061d
|
2009-01-03 01:52:29 +00:00
|
|
|
# define __ASSUME_FUTEX_CLOCK_REALTIME 1
|
|
|
|
#endif
|
2009-04-03 19:57:16 +00:00
|
|
|
|
2009-05-09 06:54:31 +00:00
|
|
|
/* Support for the AT_RANDOM auxiliary vector entry was added in 2.6.29. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x02061d
|
|
|
|
# define __ASSUME_AT_RANDOM 1
|
|
|
|
#endif
|
|
|
|
|
2009-04-03 19:57:16 +00:00
|
|
|
/* Support for preadv and pwritev was added in 2.6.30. */
|
2009-04-18 02:37:43 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x02061e
|
2009-04-03 19:57:16 +00:00
|
|
|
# define __ASSUME_PREADV 1
|
|
|
|
# define __ASSUME_PWRITEV 1
|
|
|
|
#endif
|
2009-10-29 17:12:59 +00:00
|
|
|
|
|
|
|
/* Support for F_GETOWN_EX was introduced in 2.6.32. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020620
|
|
|
|
# define __ASSUME_F_GETOWN_EX 1
|
|
|
|
#endif
|
2010-05-21 19:11:28 +00:00
|
|
|
|
|
|
|
/* Support for the recvmmsg syscall was added in 2.6.33. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020621
|
|
|
|
# define __ASSUME_RECVMMSG 1
|
|
|
|
#endif
|
2010-08-11 21:07:28 +00:00
|
|
|
|
|
|
|
/* statfs fills in f_flags since 2.6.36. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020624
|
|
|
|
# define __ASSUME_STATFS_F_FLAGS 1
|
|
|
|
#endif
|
2010-12-26 01:12:27 +00:00
|
|
|
|
|
|
|
/* prlimit64 is available in 2.6.36. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020624
|
|
|
|
# define __ASSUME_PRLIMIT64 1
|
|
|
|
#endif
|
2011-05-28 05:43:20 +00:00
|
|
|
|
|
|
|
/* sendmmsg is available in 2.6.39. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 0x020627
|
|
|
|
# define __ASSUME_SENDMMSG 1
|
|
|
|
#endif
|
2011-09-06 04:12:18 +00:00
|
|
|
|
|
|
|
/* getcpu is a syscall for x86-64 since 3.1. */
|
|
|
|
#if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100
|
|
|
|
# define __ASSUME_GETCPU_SYSCALL 1
|
|
|
|
#endif
|