]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
SPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 15 May 2014 22:04:41 +0000 (00:04 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 15 May 2014 22:07:32 +0000 (00:07 +0200)
prlimit and prlimit64 have been added in the main <bits/resource.h>, but
not in the SPARC specific version. Fix that.

Note: this is Debian bug#703559, reported by Emilio Pozuelo Monfort
<pochu@debian.org>

ChangeLog
NEWS
sysdeps/unix/sysv/linux/sparc/bits/resource.h

index a4db7030e466d773a712ac43917ba66ee09c05d3..09a7f7db9c0fe7575d1f89469c7f3429b8ca2944 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@
        * login/tst-ptsname.c: New file.
        * login/Makefile (tests): Add tst-ptsname.
 
+       [BZ #16943]
+       * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Declare prlimit
+       and prlimit64.
+
 2014-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        [BZ #16849]
diff --git a/NEWS b/NEWS
index 256d9751d23bcb1a1dbd3c7f7e8c3d4ca3bc303b..052ada84b84290aeae2512d2b8568b52be5d4c42 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,7 +17,7 @@ Version 2.20
   16712, 16713, 16714, 16731, 16739, 16740, 16743, 16754, 16758, 16759,
   16760, 16770, 16786, 16789, 16791, 16799, 16800, 16815, 16823, 16824,
   16831, 16838, 16849, 16854, 16876, 16877, 16885, 16888, 16890, 16912,
-  16916, 16917, 16922, 16927, 16928, 16932.
+  16916, 16917, 16922, 16927, 16928, 16932, 16943.
 
 * The minimum Linux kernel version that this version of the GNU C Library
   can be used with is 2.6.32.
index aa201fe148b6068cdce29f3fe5bcbb8c2ee47fb1..518264fa44ad494dcf57973d32fd18baa15dadd1 100644 (file)
@@ -252,3 +252,30 @@ enum __priority_which
   PRIO_USER = 2                        /* WHO is a user ID.  */
 #define PRIO_USER PRIO_USER
 };
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically.  */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+                   const struct rlimit *__new_limit,
+                   struct rlimit *__old_limit) __THROW;
+# else
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+                                    enum __rlimit_resource __resource,
+                                    const struct rlimit *__new_limit,
+                                    struct rlimit *__old_limit), prlimit64);
+#  else
+#   define prlimit prlimit64
+#  endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+                     const struct rlimit64 *__new_limit,
+                     struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS