glibc/sysdeps/unix/sysv/linux/kernel-features.h
Ulrich Drepper 0482576eec Update.
2000-01-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/bits/ipc.h: New file.
	* sysdeps/unix/sysv/linux/bits/sem.h: New file.
	* sysdeps/unix/sysv/linux/bits/shm.h: New file.
	* sysdeps/unix/sysv/linux/bits/msg.h: New file.
	* sysdeps/unix/sysv/linux/bits/alpha/ipc.h: Update for new ipc.
	* sysdeps/unix/sysv/linux/bits/alpha/sem.h: New file.
	* sysdeps/unix/sysv/linux/bits/alpha/shm.h: New file.
	* sysdeps/unix/sysv/linux/bits/alpha/msg.h: New file.
	* sysdeps/unix/sysv/linux/bits/sparc/ipc.h: New file.
	* sysdeps/unix/sysv/linux/bits/sparc/sem.h: New file.
	* sysdeps/unix/sysv/linux/bits/sparc/shm.h: New file.
	* sysdeps/unix/sysv/linux/bits/sparc/msg.h: New file.

	* sysdeps/unix/sysv/linux/msgctl.c (__old_msgctl):
	Renamed from msgctl.
	(__new_msgctl): New function.
	* sysdeps/unix/sysv/linux/semctl.c (__old_semctl):
	Renamed from semctl.
	(__new_semctl): New function.
	* sysdeps/unix/sysv/linux/shmctl.c (__old_shmctl):
	Renamed from shmctl.
	(__new_shmctl): New function.

	* sysdeps/unix/sysv/linux/msgget.c: Define __LIBC_IPC_INTERNAL.
	* sysdeps/unix/sysv/linux/msgrcv.c: Likewise.
	* sysdeps/unix/sysv/linux/semget.c: Likewise.
	* sysdeps/unix/sysv/linux/msgsnd.c: Likewise.
	* sysdeps/unix/sysv/linux/semop.c: Likewise.
	* sysdeps/unix/sysv/linux/shmat.c: Likewise.
	* sysdeps/unix/sysv/linux/shmdt.c: Likewise.
	* sysdeps/unix/sysv/linux/shmget.c: Likewise.

	* sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c: New file.

	* sysdeps/unix/sysv/linux/Versions: Add msgctl, semctl, shmctl.

2000-01-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/Dist: Remove setres[ug]id.
	* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: Kill warnings.
	* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Define needed
	syscalls.

	* sysdeps/unix/sysv/linux/pwrite64.c: Use proper prototype.
	* sysdeps/unix/sysv/linux/truncate64.c: Likewise.

	* sysdeps/unix/sysv/linux/kernel-features.h: [gs]etres[ug]id are
	available on sparc since 2.3.39.

	* sysdeps/unix/sysv/linux/execve.c: Kill warnings.

2000-01-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/chown.c (__syscall_chown): Use proper
	prototype.
	(__real_chown): Return EINVAL if owner or group are out of the range
	-1U .. 65534.
	* sysdeps/unix/sysv/linux/i386/lchown.c (__lchown): Likewise.
	* sysdeps/unix/sysv/linux/i386/fchown.c (__fchown): Likewise.
	* sysdeps/unix/sysv/linux/i386/setresuid.c (__setresuid): Return
	EINVAL if ruid, euid or suid are out of the range -1U .. 65534.
	* sysdeps/unix/sysv/linux/i386/setresgid.c (__setresgid): Similarly.
	* sysdeps/unix/sysv/linux/i386/setreuid.c (__setreuid): Simplify.
	* sysdeps/unix/sysv/linux/i386/setregid.c (__setregid): Likewise.
	* sysdeps/unix/sysv/linux/m68k/chown.c (__syscall_chown): Use proper
	prototype.
	Don't include non-existant header.
	(__chown): Return EINVAL if owner or group are out of the range
	-1U .. 65534.
	* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (setresuid,
	setresgid): Inherit standard linux/syscalls.list definitions.
	* sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: Remove.
	* sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: Remove.
	* sysdeps/unix/sysv/linux/syscalls.list (setresgid): Provide
	__setresgid symbol.
2000-01-18 04:33:34 +00:00

113 lines
4 KiB
C

/* Set flags signalling availability of kernel features based on given
kernel version number.
Copyright (C) 1999, 2000 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 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? */
#if __LINUX_KERNEL_VERSION >= 131584 && !defined __sparc__
# define __ASSUME_SETRESUID_SYSCALL 1
#endif
/* The SIOCGIFNAME ioctl is available starting with 2.1.50. */
#if __LINUX_KERNEL_VERSION >= 131408
# define __ASSUME_SIOCGIFNAME 1
#endif
/* 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
/* 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
/* On x86 the mmap2 syscall was introduced in 2.3.31. */
#if __LINUX_KERNEL_VERSION >= 131871 && defined __i386__
# define __ASSUME_MMAP2_SYSCALL 1
#endif
/* 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
/* On sparc and ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
syscalls were introduced in 2.3.35. */
#if __LINUX_KERNEL_VERSION >= 131875 && (defined __sparc__ || defined __arm__)
# define __ASSUME_TRUNCATE64_SYSCALL 1
# define __ASSUME_MMAP2_SYSCALL 1
# define __ASSUME_STAT64_SYSCALL 1
#endif
/* Linux 2.3.39 introduced 32bit UID/GIDs. */
#if __LINUX_KERNEL_VERSION >= 131879
# define __ASSUME_32BITUIDS 1
# ifdef __sparc__
# define __ASSUME_SETRESUID_SYSCALL 1
# endif
#endif