Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 20 Nov 1999 05:08:30 +0000 (05:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 20 Nov 1999 05:08:30 +0000 (05:08 +0000)
* sysdeps/unix/sysv/linux/setrlimit.c (__setrlimit): Don't modify
the rlimits structure passed in.

1999-11-19  Andreas Jaeger  <aj@suse.de>

* include/sys/resource.h (__setrlimit): Add prototype.

1999-11-19  Ulrich Drepper  <drepper@cygnus.com>

ChangeLog
include/sys/resource.h
sysdeps/unix/sysv/linux/setrlimit.c

index 10244c7..08a8ea9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 1999-11-19  Ulrich Drepper  <drepper@cygnus.com>
 
+       * sysdeps/unix/sysv/linux/setrlimit.c (__setrlimit): Don't modify
+       the rlimits structure passed in.
+
+1999-11-19  Andreas Jaeger  <aj@suse.de>
+
+       * include/sys/resource.h (__setrlimit): Add prototype.
+
+1999-11-19  Ulrich Drepper  <drepper@cygnus.com>
+
        * elf/dl-load.c (_dl_init_paths): Allocate correct number of
        entries for rtld_search_dirs[0].
        Patch by David Mosberger <davidm@hpl.hp.com>.
index e234cc0..8877b35 100644 (file)
@@ -3,6 +3,9 @@
 
 /* Now define the internal interfaces.  */
 extern int __getrlimit (enum __rlimit_resource __resource,
-                       struct rlimit *__rlimits) __THROW;
-extern int __getrusage (enum __rusage_who __who, struct rusage *__usage) __THROW;
+                       struct rlimit *__rlimits);
+extern int __getrusage (enum __rusage_who __who, struct rusage *__usage);
+
+extern int __setrlimit (enum __rlimit_resource __resource,
+                       const struct rlimit *__rlimits);
 #endif
index 9df9774..43bfdbb 100644 (file)
@@ -41,6 +41,10 @@ __setrlimit (resource, rlimits)
      enum __rlimit_resource resource;
      const struct rlimit *rlimits;
 {
+#ifndef __ASSUME_NEW_GETRLIMIT_SYSCALL
+  struct rlimit rlimits_small;
+#endif
+
 #ifdef __NR_ugetrlimit
   if (! no_new_getrlimit)
     {
@@ -62,13 +66,13 @@ __setrlimit (resource, rlimits)
 #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,
-                          RLIM_INFINITY >> 2);
-  rlimits->rlim_max = MIN ((unsigned long int) rlimits->rlim_max,
-                          RLIM_INFINITY >> 2);
+  rlimits_small.rlim_cur = MIN ((unsigned long int) rlimits->rlim_cur,
+                               RLIM_INFINITY >> 2);
+  rlimits_small.rlim_max = MIN ((unsigned long int) rlimits->rlim_max,
+                               RLIM_INFINITY >> 2);
 
   /* Fall back on the old system call.  */
-  return INLINE_SYSCALL (setrlimit, 2, resource, rlimits);
+  return INLINE_SYSCALL (setrlimit, 2, resource, &rlimits_small);
 #endif
 }
 weak_alias (__setrlimit, setrlimit)