From patchwork Wed May 14 11:06:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 348747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 52460140084 for ; Wed, 14 May 2014 21:06:34 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=aqZvU3p9gq5hw0mScFlYMsU2z/tIHgx5fDeXyuB0RJzdUGGNJzO6P Mw6WdKZpn0EoiDztmtXTnTEsCGuPzdjJqXp1tvtE7eYJbVkIBCi8RnvdK5tJ5MXT Bd7YiPuL7we2VTFvHm11tK+SbbPdjFG2YNmIxb3Ic/mgFKFMGh+XaM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=1TuSX6sRyXwIXIEW8WN/Op9ezCA=; b=qTTE0mrULFRaLMnkpIpMb8EfMGb/ BWcTMHC4wtRdErh4fT7af+VDMBVmBE+zEd66RW7tNyrX9TFkqjUqFXdgfDhGwzn2 5dasZfw1upqALLzHmymJEPQ38/SWcrmVC4kO5kohrZUZFpU5rEH/Gf3Ww8l55HSD k6uD/kg8sve5umQ= Received: (qmail 22683 invoked by alias); 14 May 2014 11:06:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 22671 invoked by uid 89); 14 May 2014 11:06:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: hall.aurel32.net From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: David Miller , Aurelien Jarno Subject: [PATCH] SPARC: add prlimit and prlimit64 in (BZ #16943) Date: Wed, 14 May 2014 13:06:15 +0200 Message-Id: <1400065575-31643-1-git-send-email-aurelien@aurel32.net> prlimit and prlimit64 have been added in the main , but not in the SPARC specific version. Fix that. Note: this is Debian bug#703559, reported by Emilio Pozuelo Monfort --- ChangeLog | 6 ++++++ NEWS | 2 +- sysdeps/unix/sysv/linux/sparc/bits/resource.h | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 04fdbe1..62e0a7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2014-05-14 Aurelien Jarno + [BZ #16943] + * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Declare prlimit + and prlimit64. + +2014-05-14 Aurelien Jarno + [BZ #16917] * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): Return errno if the TIOCGPTN ioctl fails with an error different than diff --git a/NEWS b/NEWS index f081e8e..42a5ecf 100644 --- a/NEWS +++ b/NEWS @@ -17,7 +17,7 @@ Version 2.20 16714, 16731, 16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16854, 16876, 16877, 16885, 16888, 16890, 16912, 16915, 16916, 16917, - 16922, 16932. + 16922, 16932, 16943. * The minimum Linux kernel version that this version of the GNU C Library can be used with is 2.6.32. diff --git a/sysdeps/unix/sysv/linux/sparc/bits/resource.h b/sysdeps/unix/sysv/linux/sparc/bits/resource.h index aa201fe..518264f 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/resource.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/resource.h @@ -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