This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Undo setrlimit patch for 2.1.3



Hi,

Cristian Gafton, Andreas Schwab, Andreas Jaeger and me have the opinium,
that we should revert the setrlimit changes for glibc 2.1.3. Which means,
RedHat and SuSE will ship the next glibc 2.1.3 without the setrlimit
changes.

The reason is simple: We have a binary incompatiblity between glibc 2.1.3
and glibc 2.1.2, but no new functionality or bug fixes.
All Distributors uses the stable 2.2.x kernel, and nobody knows when
2.4 is ready. So it doesn't make sense to have unused support for one
new feature.

Instead, we should try to release glibc 2.1.3 asap. In the moment we
have enuogh bug fixes. Then we should try to make glibc 2.2 stable
and release it with kenrel 2.4. In glibc 2.2 we have a lot of new
features for the new kernel, so we should try to release it at the
same time, and not months later.

Cristian, I hope the patch is ok for you ?

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/       kukuk@suse.de
SuSE GmbH            Schanzaeckerstr. 10            90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.
2000-01-23  Thorsten Kukuk  <kukuk@suse.de>

	* sysdeps/unix/sysv/linux/i386/getrlimit.c: Move from here ...
	* sysdeps/unix/sysv/linux/arm/getrlimit.c: ... to here.
	* sysdeps/unix/sysv/linux/i386/setrlimit.c: Move from here ...
	* sysdeps/unix/sysv/linux/arm/setrlimit.c: ... to here.
	* sysdeps/unix/sysv/linux/i386/getrlimit64.c: Move from here ...
	* sysdeps/unix/sysv/linux/arm/getrlimit64.c: ... to here.
	* sysdeps/unix/sysv/linux/i386/setrlimit64.c: Move from here ...
	* sysdeps/unix/sysv/linux/arm/setrlimit64.c: ... to here.
	* sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c: Move from here ...
	* sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c: ... to here.
	* sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c: Move from here ...
	* sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c: ... to here.

	* sysdeps/unix/sysv/linux/i386/Dist: Remove oldgetrlimit64.c and
	  oldsetrlimit64.c
	* sysdeps/unix/sysv/linux/i386/Makefile: Remove oldget[sr]limit64.c
	* sysdeps/unix/sysv/linux/i386/Versions: Remove new 2.1.3 VERSION.
	* sysdeps/unix/sysv/linux/i386/bits/resource.h: Change back old
	  RLIM_INFINITY value.
	* 
	
--- glibc-2.1/sysdeps/unix/sysv/linux/arm/getrlimit.c	Wed Jan 12 12:53:54 2000
+++ glibc-2.1/sysdeps/unix/sysv/linux/arm/getrlimit.c	Wed Dec 22 01:04:26 1999
@@ -1 +1,79 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
+/* 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
--- glibc-2.1/sysdeps/unix/sysv/linux/arm/getrlimit64.c	Wed Jan 12 12:54:01 2000
+++ glibc-2.1/sysdeps/unix/sysv/linux/arm/getrlimit64.c	Sun Dec 19 00:06:34 1999
@@ -1 +1,28 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
+/* 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
--- glibc-2.1/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c	Wed Jan 12 12:54:40 2000
+++ glibc-2.1/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c	Sun Dec 19 00:06:46 1999
@@ -1 +1,53 @@
-#include <sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c>
+/* 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 */
--- glibc-2.1/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c	Wed Jan 12 12:54:27 2000
+++ glibc-2.1/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c	Sun Dec 19 00:06:54 1999
@@ -1 +1,52 @@
-#include <sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c>
+/* 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 */
--- glibc-2.1/sysdeps/unix/sysv/linux/arm/setrlimit.c	Wed Jan 12 12:53:47 2000
+++ glibc-2.1/sysdeps/unix/sysv/linux/arm/setrlimit.c	Wed Dec 22 01:04:26 1999
@@ -1 +1,76 @@
-#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
+/* 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
--- glibc-2.1/sysdeps/unix/sysv/linux/arm/setrlimit64.c	Wed Jan 12 12:54:11 2000
+++ glibc-2.1/sysdeps/unix/sysv/linux/arm/setrlimit64.c	Sun Dec 19 00:07:14 1999
@@ -1 +1,28 @@
-#include <sysdeps/unix/sysv/linux/i386/setrlimit64.c>
+/* 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
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/Dist	Thu Jan  6 07:48:20 2000
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/Dist	Sat Jan 22 16:58:37 2000
@@ -1,6 +1,4 @@
 clone.S
-oldgetrlimit64.c
-oldsetrlimit64.c
 setresuid.c
 setresgid.c
 setfsuid.c
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/Makefile	Fri Dec 10 07:33:26 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/Makefile	Sat Jan 22 16:58:57 2000
@@ -12,6 +12,3 @@
 CFLAGS-initfini.s += -DWEAK_GMON_START
 endif
 
-ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit64 oldsetrlimit64
-endif
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/Versions	Fri Dec 10 07:33:26 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/Versions	Sat Jan 22 16:52:05 2000
@@ -7,8 +7,4 @@
   GLIBC_2.1 {
     __modify_ldt; modify_ldt;
   }
-  GLIBC_2.1.3 {
-    # New rlimit interface
-    getrlimit; setrlimit; getrlimit64; setrlimit64;
-  }
 }
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/bits/resource.h	Sun Dec 19 00:08:45 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/bits/resource.h	Sat Jan 22 16:51:53 2000
@@ -84,13 +84,13 @@
 
 /* Value to indicate that there is no limit.  */
 #ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((unsigned long int) (~0UL))
+# define RLIM_INFINITY ((long int) (~0UL >> 1))
 #else
-# define RLIM_INFINITY 0xffffffffffffffffuLL
+# define RLIM_INFINITY 0x7fffffffffffffffLL
 #endif
 
 #ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0xffffffffffffffffuLL
+# define RLIM64_INFINITY 0x7fffffffffffffffLL
 #endif
 
 /* We can represent all limits.  */
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/getrlimit.c	Wed Dec 22 01:04:26 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/getrlimit.c	Thu Jan  1 01:00:00 1970
@@ -1,79 +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;
-}
-
-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
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/getrlimit64.c	Sun Dec 19 00:06:34 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/getrlimit64.c	Thu Jan  1 01:00:00 1970
@@ -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
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c	Sun Dec 19 00:06:46 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c	Thu Jan  1 01:00:00 1970
@@ -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 */
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c	Sun Dec 19 00:06:54 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c	Thu Jan  1 01:00:00 1970
@@ -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 */
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/setrlimit.c	Wed Dec 22 01:04:26 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/setrlimit.c	Thu Jan  1 01:00:00 1970
@@ -1,76 +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)
-    {
-      /* 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
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/setrlimit64.c	Sun Dec 19 00:07:14 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/setrlimit64.c	Thu Jan  1 01:00:00 1970
@@ -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
--- glibc-2.1/sysdeps/unix/sysv/linux/i386/syscalls.list	Fri Dec 10 07:33:26 1999
+++ glibc-2.1/sysdeps/unix/sysv/linux/i386/syscalls.list	Sat Jan 22 17:03:32 2000
@@ -2,5 +2,3 @@
 
 modify_ldt	EXTRA	modify_ldt	3	__modify_ldt	modify_ldt
 vm86		-	vm86		1	__vm86		vm86
-oldgetrlimit	EXTRA	getrlimit	2	__old_getrlimit	getrlimit@GLIBC_2.0
-oldsetrlimit	EXTRA	setrlimit	2	__old_setrlimit	setrlimit@GLIBC_2.0

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]