From: Jeff Trawick Date: Tue, 12 Jun 2001 14:04:12 +0000 (+0000) Subject: fix the bindprocessor() code selection; we need to test for the X-Git-Tag: 2.0.19~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aac11200a934390585492477e208e0b0f3a62cd3;p=apache 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 --- diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index 865d9cf8fd..dbbb144b26 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 865d9cf8fd..dbbb144b26 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 a845012bd7..638f070244 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) {