From aac11200a934390585492477e208e0b0f3a62cd3 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Tue, 12 Jun 2001 14:04:12 +0000 Subject: [PATCH] fix the bindprocessor() code selection; we need to test for the presence of the bindprocessor() function, not for sys/processor.h, which exists on some systems that don't have bindprocessor() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89352 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/experimental/perchild/perchild.c | 12 +++++++----- server/mpm/perchild/perchild.c | 12 +++++++----- server/mpm/prefork/prefork.c | 12 +++++++----- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index 865d9cf8fde..dbbb144b260 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -103,6 +103,9 @@ #include #include #include +#ifdef HAVE_SYS_PROCESSOR_H +#include /* for bindprocessor() */ +#endif /* * Actual definitions of config globals @@ -967,11 +970,10 @@ static int make_child(server_rec *s, int slot) } if (!pid) { -#ifdef HAVE_SYS_PROCESSOR_H - /* By default, AIX binds to a single processor. This bit unbinds - children which will then bind to another CPU. - */ -#include +#ifdef HAVE_BINDPROCESSOR + /* By default, AIX binds to a single processor. This bit unbinds + * children which will then bind to another CPU. + */ int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) diff --git a/server/mpm/perchild/perchild.c b/server/mpm/perchild/perchild.c index 865d9cf8fde..dbbb144b260 100644 --- a/server/mpm/perchild/perchild.c +++ b/server/mpm/perchild/perchild.c @@ -103,6 +103,9 @@ #include #include #include +#ifdef HAVE_SYS_PROCESSOR_H +#include /* for bindprocessor() */ +#endif /* * Actual definitions of config globals @@ -967,11 +970,10 @@ static int make_child(server_rec *s, int slot) } if (!pid) { -#ifdef HAVE_SYS_PROCESSOR_H - /* By default, AIX binds to a single processor. This bit unbinds - children which will then bind to another CPU. - */ -#include +#ifdef HAVE_BINDPROCESSOR + /* By default, AIX binds to a single processor. This bit unbinds + * children which will then bind to another CPU. + */ int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index a845012bd73..638f070244a 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -124,6 +124,9 @@ #ifdef HAVE_TIME_H #include #endif +#ifdef HAVE_SYS_PROCESSOR_H +#include /* for bindprocessor() */ +#endif #include #include @@ -868,11 +871,10 @@ static int make_child(server_rec *s, int slot) } if (!pid) { -#ifdef HAVE_SYS_PROCESSOR_H -/* by default AIX binds to a single processor - * this bit unbinds children which will then bind to another cpu - */ -#include +#ifdef HAVE_BINDPROCESSOR + /* by default AIX binds to a single processor + * this bit unbinds children which will then bind to another cpu + */ int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) { -- 2.47.2