From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22032 invoked by alias); 12 Aug 2004 13:48:03 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 21966 invoked from network); 12 Aug 2004 13:47:58 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 12 Aug 2004 13:47:58 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i7CBUr3j007164; Thu, 12 Aug 2004 13:30:53 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i7CBUqv4007162; Thu, 12 Aug 2004 13:30:53 +0200 Date: Thu, 12 Aug 2004 13:48:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Roland McGrath Cc: Glibc hackers Subject: [PATCH] Update Message-ID: <20040812113052.GZ30497@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-08/txt/msg00043.txt.bz2 Hi! Linux kernel recently added RLIMIT_SIGPENDING and RLIMIT_MSGQUEUE. While adding that, I have noticed that alpha, sparc and mips incorrectly define RLIMIT_NLIMITS as well (there was no corresponing enum and #define defined it to itself). BTW, in the light of http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html#tag_02_02_02 are the enums in bits/resource.h even standard compliant? My understanding is that for these prefixes (RLIM_*, RLIMIT_*, RUSAGE_* and PRIO_*), one should be able to: #define _XOPEN_SOURCE 600 #include #undef RLIMIT_LOCKS int RLIMIT_LOCKS; but this doesn't work. If I'm right, maybe the enum values should have __ prefix added and the defines adjusted accordingly. 2004-08-12 Jakub Jelinek * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE): Add. (RLIMIT_NLIMITS, RLIM_NLIMITS): Adjust. * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. (RLIM_NLIMITS): Adjust. * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. (RLIM_NLIMITS): Adjust. * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. (RLIM_NLIMITS): Adjust. --- libc/sysdeps/unix/sysv/linux/alpha/bits/resource.h.jj 2001-07-06 06:56:13.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/alpha/bits/resource.h 2004-08-12 15:30:29.239434576 +0200 @@ -1,5 +1,6 @@ /* Bit values & structures for resource limits. Alpha/Linux version. - Copyright (C) 1994,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + 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 @@ -80,7 +81,16 @@ enum __rlimit_resource RLIMIT_LOCKS = 10, #define RLIMIT_LOCKS RLIMIT_LOCKS - RLIM_NLIMITS = 11 + /* Maximum number of pending signals. */ + RLIMIT_SIGPENDING = 11, +#define RLIMIT_SIGPENDING RLIMIT_SIGPENDING + + /* Maximum bytes in POSIX message queues. */ + RLIMIT_MSGQUEUE = 12, +#define RLIMIT_MSGQUEUE RLIMIT_MSGQUEUE + + RLIMIT_NLIMITS = 13, + RLIM_NLIMITS = RLIMIT_NLIMITS #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS }; --- libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h.jj 2001-07-06 06:56:21.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h 2004-08-12 15:29:54.460493882 +0200 @@ -1,5 +1,6 @@ /* Bit values & structures for resource limits. Linux/SPARC version. - Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + 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 @@ -80,7 +81,16 @@ enum __rlimit_resource RLIMIT_LOCKS = 10, #define RLIMIT_LOCKS RLIMIT_LOCKS - RLIM_NLIMITS = 11 + /* Maximum number of pending signals. */ + RLIMIT_SIGPENDING = 11, +#define RLIMIT_SIGPENDING RLIMIT_SIGPENDING + + /* Maximum bytes in POSIX message queues. */ + RLIMIT_MSGQUEUE = 12, +#define RLIMIT_MSGQUEUE RLIMIT_MSGQUEUE + + RLIMIT_NLIMITS = 13, + RLIM_NLIMITS = RLIMIT_NLIMITS #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS }; --- libc/sysdeps/unix/sysv/linux/mips/bits/resource.h.jj 2001-07-06 06:56:18.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/mips/bits/resource.h 2004-08-12 15:31:56.112299700 +0200 @@ -1,5 +1,6 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + 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 @@ -80,7 +81,16 @@ enum __rlimit_resource RLIMIT_LOCKS = 10, #define RLIMIT_LOCKS RLIMIT_LOCKS - RLIM_NLIMITS = 11 + /* Maximum number of pending signals. */ + RLIMIT_SIGPENDING = 11, +#define RLIMIT_SIGPENDING RLIMIT_SIGPENDING + + /* Maximum bytes in POSIX message queues. */ + RLIMIT_MSGQUEUE = 12, +#define RLIMIT_MSGQUEUE RLIMIT_MSGQUEUE + + RLIMIT_NLIMITS = 13, + RLIM_NLIMITS = RLIMIT_NLIMITS #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS }; --- libc/sysdeps/unix/sysv/linux/bits/resource.h.jj 2002-10-16 03:02:22.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/bits/resource.h 2004-08-12 15:30:02.286130464 +0200 @@ -1,5 +1,6 @@ /* Bit values & structures for resource limits. Linux version. - Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004 + 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 @@ -80,7 +81,15 @@ enum __rlimit_resource RLIMIT_LOCKS = 10, #define RLIMIT_LOCKS RLIMIT_LOCKS - RLIMIT_NLIMITS = 11, + /* Maximum number of pending signals. */ + RLIMIT_SIGPENDING = 11, +#define RLIMIT_SIGPENDING RLIMIT_SIGPENDING + + /* Maximum bytes in POSIX message queues. */ + RLIMIT_MSGQUEUE = 12, +#define RLIMIT_MSGQUEUE RLIMIT_MSGQUEUE + + RLIMIT_NLIMITS = 13, RLIM_NLIMITS = RLIMIT_NLIMITS #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS Jakub