]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Moved into i386 subdir.
authorUlrich Drepper <drepper@redhat.com>
Sat, 18 Dec 1999 23:04:43 +0000 (23:04 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 18 Dec 1999 23:04:43 +0000 (23:04 +0000)
sysdeps/unix/sysv/linux/getrlimit.c [deleted file]
sysdeps/unix/sysv/linux/getrlimit64.c [deleted file]
sysdeps/unix/sysv/linux/oldgetrlimit64.c [deleted file]
sysdeps/unix/sysv/linux/oldsetrlimit64.c [deleted file]
sysdeps/unix/sysv/linux/setrlimit.c [deleted file]
sysdeps/unix/sysv/linux/setrlimit64.c [deleted file]

diff --git a/sysdeps/unix/sysv/linux/getrlimit.c b/sysdeps/unix/sysv/linux/getrlimit.c
deleted file mode 100644 (file)
index 878720a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* 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;
-}
-
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_getrlimit, __getrlimit, GLIBC_2.1.3);
-strong_alias (__new_getrlimit, _new_getrlimit);
-default_symbol_version (_new_getrlimit, getrlimit, GLIBC_2.1.3);
-#else
-weak_alias (__new_getrlimit, __getrlimit);
-weak_alias (__new_getrlimit, getrlimit);
-#endif
diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c
deleted file mode 100644 (file)
index 602dd28..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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
diff --git a/sysdeps/unix/sysv/linux/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/oldgetrlimit64.c
deleted file mode 100644 (file)
index 5fb0bec..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 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 */
diff --git a/sysdeps/unix/sysv/linux/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/oldsetrlimit64.c
deleted file mode 100644 (file)
index c5448dc..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 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 */
diff --git a/sysdeps/unix/sysv/linux/setrlimit.c b/sysdeps/unix/sysv/linux/setrlimit.c
deleted file mode 100644 (file)
index b2f25ca..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/* 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)
-    {
-      int result = INLINE_SYSCALL (setrlimit, 2, resource, rlimits);
-
-      /* Return if the values are not out of range or if we positively
-         know that the ugetrlimit system call exists.  */
-      if (result != -1 || errno != EINVAL || __have_no_new_getrlimit < 0)
-       return result;
-
-      /* Check if the new ugetrlimit syscall exists.  */
-      if (INLINE_SYSCALL (ugetrlimit, 2, resource, &rlimits_small) != -1
-         || errno != ENOSYS)
-       {
-         /* There was some other error, probably RESOURCE out of range.
-             Remember that the ugetrlimit system call really exists.  */
-         __have_no_new_getrlimit = -1;
-         /* Restore previous errno value.  */
-         __set_errno (EINVAL);
-         return result;
-       }
-
-      /* Remember that the kernel uses the old interface.  */
-      __have_no_new_getrlimit = 1;
-    }
-#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);
-
-  /* Try again with the adjusted values.  */
-  return INLINE_SYSCALL (setrlimit, 2, resource, &rlimits_small);
-}
-
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_setrlimit, __setrlimit, GLIBC_2.1.3);
-strong_alias (__new_setrlimit, _new_setrlimit);
-default_symbol_version (_new_setrlimit, setrlimit, GLIBC_2.1.3);
-#else
-weak_alias (__new_setrlimit, __setrlimit);
-weak_alias (__new_setrlimit, setrlimit);
-#endif
diff --git a/sysdeps/unix/sysv/linux/setrlimit64.c b/sysdeps/unix/sysv/linux/setrlimit64.c
deleted file mode 100644 (file)
index 3e7e5cc..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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