public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Update <bits/resource.h>
@ 2004-08-12 13:48 Jakub Jelinek
  2004-08-12 17:36 ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2004-08-12 13:48 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

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 <sys/resource.h>
#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  <jakub@redhat.com>

	* 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Update <bits/resource.h>
  2004-08-12 13:48 [PATCH] Update <bits/resource.h> Jakub Jelinek
@ 2004-08-12 17:36 ` Ulrich Drepper
  2004-08-12 18:53   ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Drepper @ 2004-08-12 17:36 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

Jakub Jelinek wrote:

> If I'm right, maybe the enum values should have __ prefix added
> and the defines adjusted accordingly.

Yes, non-standard RLIMIT_ enums must be __RLIMIT_ and the macros must be
appropriately defined.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Update <bits/resource.h>
  2004-08-12 17:36 ` Ulrich Drepper
@ 2004-08-12 18:53   ` Jakub Jelinek
  2004-08-12 20:25     ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2004-08-12 18:53 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

On Thu, Aug 12, 2004 at 10:35:23AM -0700, Ulrich Drepper wrote:
> Jakub Jelinek wrote:
> 
> > If I'm right, maybe the enum values should have __ prefix added
> > and the defines adjusted accordingly.
> 
> Yes, non-standard RLIMIT_ enums must be __RLIMIT_ and the macros must be
> appropriately defined.

And the standard ones can stay as is?
If so, here is the updated patch.
RLIMIT_RSS, RLIMIT_OFILE, RLIMIT_LOCKS, RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE
and RUSAGE_BOTH don't seem to appear in the standard and neither does
RLIMIT_NLIMITS nor RLIM_NLIMITS, so I have prefixed them all with __.

2004-08-12  Jakub Jelinek  <jakub@redhat.com>

        * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_SIGPENDING,
        RLIMIT_MSGQUEUE): Add.
	(RLIMIT_RSS, RLIMIT_OFILE, RLIMIT_LOCKS, RUSAGE_BOTH): Prefix
	the enum value with __, adjust define.
        (RLIMIT_NLIMITS, RLIM_NLIMITS): Likewise, adjust for the added
	two limits.
        * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_SIGPENDING,
        RLIMIT_MSGQUEUE): Add.
	(RLIMIT_RSS, RLIMIT_OFILE, RLIMIT_LOCKS, RUSAGE_BOTH): Prefix
	the enum value with __, adjust define.
        (RLIM_NLIMITS): Likewise, adjust for the added two limits.
	(RLIMIT_NLIMITS): Add corresponding enum value, adjust define.
        * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIMIT_SIGPENDING,
        RLIMIT_MSGQUEUE): Add.
	(RLIMIT_RSS, RLIMIT_OFILE, RLIMIT_LOCKS, RUSAGE_BOTH): Prefix
	the enum value with __, adjust define.
        (RLIM_NLIMITS): Likewise, adjust for the added two limits.
	(RLIMIT_NLIMITS): Add corresponding enum value, adjust define.
        * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_SIGPENDING,
        RLIMIT_MSGQUEUE): Add.
	(RLIMIT_RSS, RLIMIT_OFILE, RLIMIT_LOCKS, RUSAGE_BOTH): Prefix
	the enum value with __, adjust define.
        (RLIM_NLIMITS): Likewise, adjust for the added two limits.
	(RLIMIT_NLIMITS): Add corresponding enum value, adjust define.

--- 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 20:17:41.856018498 +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
@@ -55,34 +56,43 @@ enum __rlimit_resource
      This affects swapping; processes that are exceeding their
      resident set size will be more likely to have physical memory
      taken from them.  */
-  RLIMIT_RSS = 5,
-#define	RLIMIT_RSS RLIMIT_RSS
+  __RLIMIT_RSS = 5,
+#define	RLIMIT_RSS __RLIMIT_RSS
 
   /* Number of open files.  */
   RLIMIT_NOFILE = 6,
-  RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
+  __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
 #define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
 
   /* Address space limit (?) */
   RLIMIT_AS = 7,
 #define RLIMIT_AS RLIMIT_AS
 
   /* Number of processes.  */
-  RLIMIT_NPROC = 8,
-#define RLIMIT_NPROC RLIMIT_NPROC
+  __RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC __RLIMIT_NPROC
 
   /* Locked-in-memory address space.  */
-  RLIMIT_MEMLOCK = 9,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+  __RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
 
   /* Maximum number of file locks.  */
-  RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
+  __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
 
-  RLIM_NLIMITS = 11
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+  /* 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
 };
 
 /* Value to indicate that there is no limit.  */
@@ -141,8 +151,8 @@ enum __rusage_who
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
 
   /* Both.  */
-  RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
+  __RUSAGE_BOTH = -2
+#define RUSAGE_BOTH __RUSAGE_BOTH
 };
 
 #define __need_timeval
--- 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 20:19:24.507146532 +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
@@ -55,34 +56,43 @@ enum __rlimit_resource
      This affects swapping; processes that are exceeding their
      resident set size will be more likely to have physical memory
      taken from them.  */
-  RLIMIT_RSS = 5,
-#define	RLIMIT_RSS RLIMIT_RSS
+  __RLIMIT_RSS = 5,
+#define	RLIMIT_RSS __RLIMIT_RSS
 
   /* Number of open files.  */
   RLIMIT_NOFILE = 6,
-  RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
+  __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
 #define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
 
   /* Address space limit (?) */
   RLIMIT_AS = 9,
 #define RLIMIT_AS RLIMIT_AS
 
   /* Number of processes.  */
-  RLIMIT_NPROC = 7,
-#define RLIMIT_NPROC RLIMIT_NPROC
+  __RLIMIT_NPROC = 7,
+#define RLIMIT_NPROC __RLIMIT_NPROC
 
   /* Locked-in-memory address space.  */
-  RLIMIT_MEMLOCK = 8,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+  __RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
 
   /* Maximum number of file locks.  */
-  RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
+  __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
 
-  RLIM_NLIMITS = 11
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+  /* 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
 };
 
 /* Value to indicate that there is no limit.  */
@@ -157,8 +167,8 @@ enum __rusage_who
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
 
   /* Both.  */
-  RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
+  __RUSAGE_BOTH = -2
+#define RUSAGE_BOTH __RUSAGE_BOTH
 };
 
 #define __need_timeval
--- 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 20:21:02.873020046 +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
@@ -55,34 +56,43 @@ enum __rlimit_resource
      This affects swapping; processes that are exceeding their
      resident set size will be more likely to have physical memory
      taken from them.  */
-  RLIMIT_RSS = 7,
-#define	RLIMIT_RSS RLIMIT_RSS
+  __RLIMIT_RSS = 7,
+#define	RLIMIT_RSS __RLIMIT_RSS
 
   /* Number of open files.  */
   RLIMIT_NOFILE = 5,
-  RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
+  __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
 #define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
 
   /* Address space limit (?) */
   RLIMIT_AS = 6,
 #define RLIMIT_AS RLIMIT_AS
 
   /* Number of processes.  */
-  RLIMIT_NPROC = 8,
-#define RLIMIT_NPROC RLIMIT_NPROC
+  __RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC __RLIMIT_NPROC
 
   /* Locked-in-memory address space.  */
-  RLIMIT_MEMLOCK = 9,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+  __RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
 
   /* Maximum number of file locks.  */
-  RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
+  __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
 
-  RLIM_NLIMITS = 11
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+  /* 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
 };
 
 /* Value to indicate that there is no limit.  */
@@ -141,8 +151,8 @@ enum __rusage_who
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
 
   /* Both.  */
-  RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
+  __RUSAGE_BOTH = -2
+#define RUSAGE_BOTH __RUSAGE_BOTH
 };
 
 #define __need_timeval
--- 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 20:11:47.340748256 +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
@@ -55,35 +56,43 @@ enum __rlimit_resource
      This affects swapping; processes that are exceeding their
      resident set size will be more likely to have physical memory
      taken from them.  */
-  RLIMIT_RSS = 5,
-#define	RLIMIT_RSS RLIMIT_RSS
+  __RLIMIT_RSS = 5,
+#define	RLIMIT_RSS __RLIMIT_RSS
 
   /* Number of open files.  */
   RLIMIT_NOFILE = 7,
-  RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
+  __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
 #define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
 
   /* Address space limit.  */
   RLIMIT_AS = 9,
 #define RLIMIT_AS RLIMIT_AS
 
   /* Number of processes.  */
-  RLIMIT_NPROC = 6,
-#define RLIMIT_NPROC RLIMIT_NPROC
+  __RLIMIT_NPROC = 6,
+#define RLIMIT_NPROC __RLIMIT_NPROC
 
   /* Locked-in-memory address space.  */
-  RLIMIT_MEMLOCK = 8,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+  __RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
 
   /* Maximum number of file locks.  */
-  RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
+  __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
 
-  RLIMIT_NLIMITS = 11,
-  RLIM_NLIMITS = RLIMIT_NLIMITS
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+  /* 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
 };
 
 /* Value to indicate that there is no limit.  */
@@ -142,8 +151,8 @@ enum __rusage_who
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
 
   /* Both.  */
-  RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
+  __RUSAGE_BOTH = -2
+#define RUSAGE_BOTH __RUSAGE_BOTH
 };
 
 #define __need_timeval


	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Update <bits/resource.h>
  2004-08-12 18:53   ` Jakub Jelinek
@ 2004-08-12 20:25     ` Ulrich Drepper
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Drepper @ 2004-08-12 20:25 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers


> If so, here is the updated patch.

I already checked in some changes.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-12 20:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-12 13:48 [PATCH] Update <bits/resource.h> Jakub Jelinek
2004-08-12 17:36 ` Ulrich Drepper
2004-08-12 18:53   ` Jakub Jelinek
2004-08-12 20:25     ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).