]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
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 10244c7145d2757d5a201aee796769ae3cd9b756..08a8ea9ed9fafa8ea4e26469896a93337fe5f870 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index e234cc0426b254a92952337c04265db4106253e6..8877b35f2aa098e899cea0d1e129939a7ae947ea 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 9df977447af8077ebc995cc67203759c380dd1d0..43bfdbbbc42e16787b23fca415daa0dbd20c1ee9 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)