From: Ulrich Drepper Date: Sun, 14 Nov 1999 07:07:03 +0000 (+0000) Subject: Remove features available only in glibc 2.2. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c93cbc4252bb024e30f14334232442d1737e1276;p=thirdparty%2Fglibc.git Remove features available only in glibc 2.2. --- diff --git a/sysdeps/unix/sysv/linux/setrlimit.c b/sysdeps/unix/sysv/linux/setrlimit.c index 50506c3ad08..b0e64920b7b 100644 --- a/sysdeps/unix/sysv/linux/setrlimit.c +++ b/sysdeps/unix/sysv/linux/setrlimit.c @@ -23,12 +23,10 @@ #include #include -#include "kernel-features.h" - /* Linux 2.3.25 introduced a new system call since the types used for the limits are now unsigned. */ -#if !defined __ASSUME_NEW_GETRLIMIT_SYSCALL && defined __NR_ugetrlimit +#ifdef __NR_ugetrlimit static int no_new_getrlimit; #else # define no_new_getrlimit 0 @@ -44,20 +42,15 @@ __setrlimit (resource, rlimits) { int result = INLINE_SYSCALL (setrlimit, 2, resource, rlimits); -# ifndef __ASSUME_NEW_GETRLIMIT_SYSCALL /* If the system call is available return. */ if (result != -1 || errno != ENOSYS) -# endif return result; -# ifndef __ASSUME_NEW_GETRLIMIT_SYSCALL /* Remember that the system call is not available. */ no_new_getrlimit = 1; -# endif } #endif -#ifndef __ASSUME_NEW_GETRLIMIT_SYSCALL /* We might have to correct the limits values. Since the old values were signed the new values are too large. */ rlimits->rlim_cur = MIN ((unsigned long int) rlimits->rlim_cur, @@ -67,6 +60,5 @@ __setrlimit (resource, rlimits) /* Fall back on the old system call. */ return INLINE_SYSCALL (setrlimit, 2, resource, rlimits); -#endif } weak_alias (__setrlimit, setrlimit)