diff options
author | Christian Heimes <christian@cheimes.de> | 2013-12-08 13:35:55 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-12-08 13:35:55 (GMT) |
commit | 5bb414d176b5c99d9f2500738fe77c47ea938763 (patch) | |
tree | 84b7bfa89c46eb75e08ddb25ba174ac2b769271e /Modules/resource.c | |
parent | ead8d0858b326ec8d902dc597aa3da23e4c5a82b (diff) | |
download | cpython-5bb414d176b5c99d9f2500738fe77c47ea938763.zip cpython-5bb414d176b5c99d9f2500738fe77c47ea938763.tar.gz cpython-5bb414d176b5c99d9f2500738fe77c47ea938763.tar.bz2 |
Issue #19343: Expose FreeBSD-specific APIs in resource module. Original patch by Koobs.
Diffstat (limited to 'Modules/resource.c')
-rw-r--r-- | Modules/resource.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/resource.c b/Modules/resource.c index c12ce34..3a1cf09 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -424,6 +424,20 @@ PyInit_resource(void) PyModule_AddIntMacro(m, RUSAGE_THREAD); #endif +/* FreeBSD specific */ + +#ifdef RLIMIT_SWAP + PyModule_AddIntMacro(m, RLIMIT_SWAP); +#endif + +#ifdef RLIMIT_SBSIZE + PyModule_AddIntMacro(m, RLIMIT_SBSIZE); +#endif + +#ifdef RLIMIT_NPTS + PyModule_AddIntMacro(m, RLIMIT_NPTS); +#endif + #if defined(HAVE_LONG_LONG) if (sizeof(RLIM_INFINITY) > sizeof(long)) { v = PyLong_FromLongLong((PY_LONG_LONG) RLIM_INFINITY); |