1999-05-26 23:37:38 +00:00
|
|
|
/* Set flags signalling availability of kernel features based on given
|
|
|
|
kernel version number.
|
2000-01-03 23:22:35 +00:00
|
|
|
Copyright (C) 1999, 2000 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
|
|
|
|
modify it under the terms of the GNU Library General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 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
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
|
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
corrected. Most of the numbers here are set corresponding to
|
|
|
|
2.2.0. */
|
|
|
|
|
|
|
|
/* `getcwd' system call. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131584
|
|
|
|
# define __ASSUME_GETCWD_SYSCALL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Real-time signal became usable in 2.1.70. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131398
|
|
|
|
# define __ASSUME_REALTIME_SIGNALS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* When were the `pread'/`pwrite' syscalls introduced? */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131584
|
|
|
|
# define __ASSUME_PREAD_SYSCALL 1
|
|
|
|
# define __ASSUME_PWRITE_SYSCALL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* When was `poll' introduced? */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131584
|
|
|
|
# define __ASSUME_POLL_SYSCALL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The `lchown' syscall was introduced in 2.1.80. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131408
|
|
|
|
# define __ASSUME_LCHOWN_SYSCALL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* When did the `setresuid' sysall became available? */
|
2000-01-18 04:33:34 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 131584 && !defined __sparc__
|
1999-05-26 23:37:38 +00:00
|
|
|
# define __ASSUME_SETRESUID_SYSCALL 1
|
|
|
|
#endif
|
1999-06-07 00:02:14 +00:00
|
|
|
|
|
|
|
/* The SIOCGIFNAME ioctl is available starting with 2.1.50. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131408
|
|
|
|
# define __ASSUME_SIOCGIFNAME 1
|
|
|
|
#endif
|
1999-11-02 01:01:03 +00:00
|
|
|
|
|
|
|
/* On x86 another `getrlimit' syscall was added in 2.3.25. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131865 && defined __i386__
|
|
|
|
# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
|
|
|
|
#endif
|
1999-12-08 23:48:24 +00:00
|
|
|
|
|
|
|
/* On x86 the truncate64/ftruncate64 syscalls were introduced in 2.3.31. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131871 && defined __i386__
|
|
|
|
# define __ASSUME_TRUNCATE64_SYSCALL 1
|
|
|
|
#endif
|
|
|
|
|
1999-12-19 00:04:05 +00:00
|
|
|
/* On x86 the mmap2 syscall was introduced in 2.3.31. */
|
1999-12-08 23:48:24 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 131871 && defined __i386__
|
|
|
|
# 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. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131874 && defined __i386__
|
|
|
|
# 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
|
|
|
|
2000-01-03 23:22:35 +00:00
|
|
|
/* On sparc and ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
|
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
|
|
|
syscalls were introduced in 2.3.35. */
|
2000-01-03 23:22:35 +00:00
|
|
|
#if __LINUX_KERNEL_VERSION >= 131875 && (defined __sparc__ || defined __arm__)
|
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_TRUNCATE64_SYSCALL 1
|
|
|
|
# define __ASSUME_MMAP2_SYSCALL 1
|
|
|
|
# define __ASSUME_STAT64_SYSCALL 1
|
|
|
|
#endif
|
2000-01-17 05:24:52 +00:00
|
|
|
|
* 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
|
|
|
/* I know for sure that these are in 2.3.35 on powerpc. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131875 && defined __powerpc__
|
|
|
|
# define __ASSUME_TRUNCATE64_SYSCALL 1
|
|
|
|
# define __ASSUME_STAT64_SYSCALL 1
|
|
|
|
# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
|
|
|
|
#endif
|
|
|
|
|
2000-01-17 05:24:52 +00:00
|
|
|
/* Linux 2.3.39 introduced 32bit UID/GIDs. */
|
|
|
|
#if __LINUX_KERNEL_VERSION >= 131879
|
|
|
|
# define __ASSUME_32BITUIDS 1
|
2000-01-18 04:33:34 +00:00
|
|
|
# ifdef __sparc__
|
|
|
|
# define __ASSUME_SETRESUID_SYSCALL 1
|
|
|
|
# endif
|
2000-01-17 05:24:52 +00:00
|
|
|
#endif
|