This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Add PRIO_* macros
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: roland at gnu dot org
- Cc: libc-alpha at sources dot redhat dot com
- Date: Sat, 3 Jan 2009 15:54:30 +0100
- Subject: [PATCH] Add PRIO_* macros
Hello,
As documented earlier in the same file, "some programs want to test for
operating system features with #ifdef foo", so the patch below adds
macros in addition to the enumeration.
Samuel
2009-01-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
* bits/resource.h (PRIO_PROCESS, PRIO_PGRP, PRIO_USER): Add
macros.
Index: ./bits/resource.h
===================================================================
RCS file: /cvs/glibc/libc/bits/resource.h,v
retrieving revision 1.8
diff -u -p -r1.8 resource.h
--- ./bits/resource.h 5 Mar 2006 22:48:10 -0000 1.8
+++ ./bits/resource.h 3 Jan 2009 14:47:20 -0000
@@ -185,6 +185,9 @@ struct rusage
enum __priority_which
{
PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
};