summaryrefslogtreecommitdiff
path: root/Modules/resource.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-10-22 11:09:27 +0200
committerChristian Heimes <christian@cheimes.de>2013-10-22 11:09:27 +0200
commit6fc79bf813de21015208d989e38cdc95bda03292 (patch)
tree84bbc4d5b1596b3f215efd1ff4c23af5345ee75c /Modules/resource.c
parentd1d7576fb4a6787e3ebc0b5060561c076c9a4bf7 (diff)
downloadcpython-git-6fc79bf813de21015208d989e38cdc95bda03292.tar.gz
Issue #19324: Expose Linux-specific constants in resource module
Diffstat (limited to 'Modules/resource.c')
-rw-r--r--Modules/resource.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/Modules/resource.c b/Modules/resource.c
index 8768315372..0ae24c0bb9 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -326,6 +326,28 @@ PyInit_resource(void)
PyModule_AddIntMacro(m, RLIMIT_SBSIZE);
#endif
+/* Linux specific */
+#ifdef RLIMIT_MSGQUEUE
+ PyModule_AddIntMacro(m, RLIMIT_MSGQUEUE);
+#endif
+
+#ifdef RLIMIT_NICE
+ PyModule_AddIntMacro(m, RLIMIT_NICE);
+#endif
+
+#ifdef RLIMIT_RTPRIO
+ PyModule_AddIntMacro(m, RLIMIT_RTPRIO);
+#endif
+
+#ifdef RLIMIT_RTTIME
+ PyModule_AddIntMacro(m, RLIMIT_RTTIME);
+#endif
+
+#ifdef RLIMIT_SIGPENDING
+ PyModule_AddIntMacro(m, RLIMIT_SIGPENDING);
+#endif
+
+/* target */
#ifdef RUSAGE_SELF
PyModule_AddIntMacro(m, RUSAGE_SELF);
#endif