@@ -4555,6 +4555,8 @@ posix_fork(PyObject *self, PyObject *noargs)
45554555
45564556#ifdef HAVE_SCHED_H
45574557
4558+ #ifdef HAVE_SCHED_GET_PRIORITY_MAX
4559+
45584560PyDoc_STRVAR (posix_sched_get_priority_max__doc__ ,
45594561"sched_get_priority_max(policy)\n\n\
45604562Get the maximum scheduling priority for *policy*." );
@@ -4589,6 +4591,8 @@ posix_sched_get_priority_min(PyObject *self, PyObject *args)
45894591 return PyLong_FromLong (min );
45904592}
45914593
4594+ #endif /* HAVE_SCHED_GET_PRIORITY_MAX */
4595+
45924596#ifdef HAVE_SCHED_SETSCHEDULER
45934597
45944598PyDoc_STRVAR (posix_sched_getscheduler__doc__ ,
@@ -10452,8 +10456,10 @@ static PyMethodDef posix_methods[] = {
1045210456 {"fork" , posix_fork , METH_NOARGS , posix_fork__doc__ },
1045310457#endif /* HAVE_FORK */
1045410458#ifdef HAVE_SCHED_H
10459+ #ifdef HAVE_SCHED_GET_PRIORITY_MAX
1045510460 {"sched_get_priority_max" , posix_sched_get_priority_max , METH_VARARGS , posix_sched_get_priority_max__doc__ },
1045610461 {"sched_get_priority_min" , posix_sched_get_priority_min , METH_VARARGS , posix_sched_get_priority_min__doc__ },
10462+ #endif
1045710463#ifdef HAVE_SCHED_SETPARAM
1045810464 {"sched_getparam" , posix_sched_getparam , METH_VARARGS , posix_sched_getparam__doc__ },
1045910465#endif
@@ -10474,7 +10480,7 @@ static PyMethodDef posix_methods[] = {
1047410480 {"sched_setaffinity" , posix_sched_setaffinity , METH_VARARGS , posix_sched_setaffinity__doc__ },
1047510481 {"sched_getaffinity" , posix_sched_getaffinity , METH_VARARGS , posix_sched_getaffinity__doc__ },
1047610482#endif
10477- #endif
10483+ #endif /* HAVE_SCHED_H */
1047810484#if defined(HAVE_OPENPTY ) || defined (HAVE__GETPTY ) || defined (HAVE_DEV_PTMX )
1047910485 {"openpty" , posix_openpty , METH_NOARGS , posix_openpty__doc__ },
1048010486#endif /* HAVE_OPENPTY || HAVE__GETPTY || HAVE_DEV_PTMX */
0 commit comments