diff options
| author | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-10-04 00:42:13 +0200 |
|---|---|---|
| committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-10-04 00:42:13 +0200 |
| commit | 4a35105b209c301acb0cbbed6f70a9a7c558c643 (patch) | |
| tree | 761be53f9d33a39ae8107dfb5e0e49d343f71f57 /psutil/_psutil_linux.c | |
| parent | 95d343266d800910b75ccdd2e96d0d12c067f2dc (diff) | |
| download | psutil-4a35105b209c301acb0cbbed6f70a9a7c558c643.tar.gz | |
(linux / C pre-processor) use HAVE_* instead of HAS_* for consistency with Python source code
Diffstat (limited to 'psutil/_psutil_linux.c')
| -rw-r--r-- | psutil/_psutil_linux.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/psutil/_psutil_linux.c b/psutil/_psutil_linux.c index e321d346..6162d714 100644 --- a/psutil/_psutil_linux.c +++ b/psutil/_psutil_linux.c @@ -23,11 +23,11 @@ // Linux >= 2.6.13 -#define HAS_IOPRIO defined(__NR_ioprio_get) && defined(__NR_ioprio_set) +#define HAVE_IOPRIO defined(__NR_ioprio_get) && defined(__NR_ioprio_set) // Linux >= 2.6.36 kernels, glibc >= 2.13 -#define HAS_PRLIMIT defined(prlimit) +#define HAVE_PRLIMIT defined(prlimit) -#if HAS_IOPRIO +#if HAVE_IOPRIO enum { IOPRIO_WHO_PROCESS = 1, }; @@ -99,7 +99,7 @@ linux_ioprio_set(PyObject* self, PyObject* args) #endif -#ifdef HAS_PRLIMIT +#ifdef HAVE_PRLIMIT /* * A wrapper around prlimit(2); sets process resource limits. * This can be used for both get and set, in which case extra @@ -325,13 +325,13 @@ PsutilMethods[] = { // --- per-process functions -#if HAS_IOPRIO +#if HAVE_IOPRIO {"ioprio_get", linux_ioprio_get, METH_VARARGS, "Get process I/O priority"}, {"ioprio_set", linux_ioprio_set, METH_VARARGS, "Set process I/O priority"}, #endif -#ifdef HAS_PRLIMIT +#ifdef HAVE_PRLIMIT {"prlimit", linux_prlimit, METH_VARARGS, "Get or set process resource limits."}, #endif @@ -408,7 +408,7 @@ void init_psutil_linux(void) #endif -#ifdef HAS_PRLIMIT +#ifdef HAVE_PRLIMIT PyModule_AddIntConstant(module, "RLIM_INFINITY", RLIM_INFINITY); PyModule_AddIntConstant(module, "RLIMIT_AS", RLIMIT_AS); PyModule_AddIntConstant(module, "RLIMIT_CORE", RLIMIT_CORE); |
