+++ /dev/null
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
+++ /dev/null
-#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
+++ /dev/null
-#include <sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c>
+++ /dev/null
-#include <sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c>
+++ /dev/null
-#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
+++ /dev/null
-#include <sysdeps/unix/sysv/linux/i386/setrlimit64.c>
+++ /dev/null
-/* Copyright (C) 1999 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. */
-
-#include <errno.h>
-#include <sys/resource.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-extern int __syscall_ugetrlimit __P ((unsigned int resource,
- struct rlimit *rlimits));
-extern int __syscall_getrlimit __P ((unsigned int resource,
- struct rlimit *rlimits));
-
-/* Linux 2.3.25 introduced a new system call since the types used for
- the limits are now unsigned. */
-#ifdef __NR_ugetrlimit
-int __have_no_new_getrlimit;
-#endif
-
-int
-__new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
-{
- int result;
-
-#ifdef __NR_ugetrlimit
- if (__have_no_new_getrlimit <= 0)
- {
- result = INLINE_SYSCALL (ugetrlimit, 2, resource, rlimits);
-
- /* If the system call is available remember this fact and return. */
- if (result != -1 || errno != ENOSYS)
- {
- __have_no_new_getrlimit = -1;
- return result;
- }
-
- /* Remember that the system call is not available. */
- __have_no_new_getrlimit = 1;
- }
-#endif
-
- /* Fall back to the old system call. */
- result = INLINE_SYSCALL (getrlimit, 2, resource, rlimits);
-
- if (result == -1)
- return result;
-
- /* We might have to correct the limits values. Since the old values
- were signed the infinity value is too small. */
- if (rlimits->rlim_cur == RLIM_INFINITY >> 1)
- rlimits->rlim_cur = RLIM_INFINITY;
- if (rlimits->rlim_max == RLIM_INFINITY >> 1)
- rlimits->rlim_max = RLIM_INFINITY;
-
- return result;
-}
-
-weak_alias (__new_getrlimit, __getrlimit);
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_getrlimit, getrlimit, GLIBC_2.1.3);
-#else
-weak_alias (__new_getrlimit, getrlimit);
-#endif
+++ /dev/null
-/* Copyright (C) 1999 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. */
-
-#define getrlimit64 __new_getrlimit64
-
-#include <sysdeps/generic/getrlimit64.c>
-
-#undef getrlimit64
-#if defined PIC && defined DO_VERSIONING
-default_symbol_version (__new_getrlimit64, getrlimit64, GLIBC_2.1.3);
-#else
-weak_alias (__new_getrlimit64, getrlimit64);
-#endif
+++ /dev/null
-/* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 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 is a compatibility file. If we don't build the libc with
- versioning don't compile this file. */
-#if defined PIC && DO_VERSIONING
-
-#include <errno.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-
-extern int __old_getrlimit (enum __rlimit_resource, struct rlimit *);
-
-/* Put the soft and hard limits for RESOURCE in *RLIMITS.
- Returns 0 if successful, -1 if not (and sets errno). */
-int
-__old_getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
-{
- struct rlimit rlimits32;
-
- if (__old_getrlimit (resource, &rlimits32) < 0)
- return -1;
-
- if (rlimits32.rlim_cur == RLIM_INFINITY >> 1)
- rlimits->rlim_cur = RLIM64_INFINITY >> 1;
- else
- rlimits->rlim_cur = rlimits32.rlim_cur;
- if (rlimits32.rlim_max == RLIM_INFINITY >> 1)
- rlimits->rlim_max = RLIM64_INFINITY >> 1;
- else
- rlimits->rlim_max = rlimits32.rlim_max;
-
- return 0;
-}
-
-symbol_version (__old_getrlimit64, getrlimit64, GLIBC_2.1);
-
-#endif /* PIC && DO_VERSIONING */
+++ /dev/null
-/* Copyright (C) 1991, 95, 96, 97, 98, 1999 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 is a compatibility file. If we don't build the libc with
- versioning don't compile this file. */
-#if defined PIC && DO_VERSIONING
-
-#include <errno.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-
-extern int __old_setrlimit (enum __rlimit_resource, const struct rlimit *);
-
-/* Set the soft and hard limits for RESOURCE to *RLIMITS.
- Only the super-user can increase hard limits.
- Return 0 if successful, -1 if not (and sets errno). */
-int
-__old_setrlimit64 (enum __rlimit_resource resource,
- const struct rlimit64 *rlimits)
-{
- struct rlimit rlimits32;
-
- if (rlimits->rlim_cur >= RLIM_INFINITY >> 1)
- rlimits32.rlim_cur = RLIM_INFINITY >> 1;
- else
- rlimits32.rlim_cur = rlimits->rlim_cur;
- if (rlimits->rlim_max >= RLIM_INFINITY >> 1)
- rlimits32.rlim_max = RLIM_INFINITY >> 1;
- else
- rlimits32.rlim_max = rlimits->rlim_max;
-
- return __old_setrlimit (resource, &rlimits32);
-}
-
-symbol_version (__old_setrlimit64, setrlimit64, GLIBC_2.1);
-
-#endif /* PIC && DO_VERSIONING */
+++ /dev/null
-/* Copyright (C) 1999 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. */
-
-#include <errno.h>
-#include <sys/param.h>
-#include <sys/resource.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-extern int __syscall_setrlimit (unsigned int resource,
- const struct rlimit *rlimits);
-extern int __syscall_ugetrlimit (unsigned int resource,
- const struct rlimit *rlimits);
-
-/* Linux 2.3.25 introduced a new system call since the types used for
- the limits are now unsigned. */
-#ifdef __NR_ugetrlimit
-extern int __have_no_new_getrlimit; /* In getrlimit.c. */
-#endif
-
-int
-__new_setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
-{
- struct rlimit rlimits_small;
-
-#ifdef __NR_ugetrlimit
- if (__have_no_new_getrlimit == 0)
- {
- /* Check if the new ugetrlimit syscall exists. We must do this
- first because older kernels don't reject negative rlimit
- values in setrlimit. */
- int result = INLINE_SYSCALL (ugetrlimit, 2, resource, &rlimits_small);
- if (result != -1 || errno != ENOSYS)
- /* The syscall exists. */
- __have_no_new_getrlimit = -1;
- else
- /* The syscall does not exist. */
- __have_no_new_getrlimit = 1;
- }
- if (__have_no_new_getrlimit < 0)
- return INLINE_SYSCALL (setrlimit, 2, resource, rlimits);
-#endif
-
- /* We might have to correct the limits values. Since the old values
- were signed the new values might be too large. */
- rlimits_small.rlim_cur = MIN ((unsigned long int) rlimits->rlim_cur,
- RLIM_INFINITY >> 1);
- rlimits_small.rlim_max = MIN ((unsigned long int) rlimits->rlim_max,
- RLIM_INFINITY >> 1);
-
- /* Use the adjusted values. */
- return INLINE_SYSCALL (setrlimit, 2, resource, &rlimits_small);
-}
-
-weak_alias (__new_setrlimit, __setrlimit);
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_setrlimit, setrlimit, GLIBC_2.1.3);
-#else
-weak_alias (__new_setrlimit, setrlimit);
-#endif
+++ /dev/null
-/* Copyright (C) 1999 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. */
-
-#define setrlimit64 __new_setrlimit64
-
-#include <sysdeps/generic/setrlimit64.c>
-
-#undef setrlimit64
-#if defined PIC && defined DO_VERSIONING
-default_symbol_version (__new_setrlimit64, setrlimit64, GLIBC_2.1.3);
-#else
-weak_alias (__new_setrlimit64, setrlimit64);
-#endif