]> granicus.if.org Git - apache/commitdiff
fix the bindprocessor() code selection; we need to test for the
authorJeff Trawick <trawick@apache.org>
Tue, 12 Jun 2001 14:04:12 +0000 (14:04 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 12 Jun 2001 14:04:12 +0000 (14:04 +0000)
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
server/mpm/perchild/perchild.c
server/mpm/prefork/prefork.c

index 865d9cf8fdeb9faf4f42e9b479f663fc934f0dc1..dbbb144b260bae3a16a4156f931f54a75b1d6bd8 100644 (file)
 #include <sys/stat.h>
 #include <sys/un.h>
 #include <setjmp.h>
+#ifdef HAVE_SYS_PROCESSOR_H
+#include <sys/processor.h> /* 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 <sys/processor.h>
+#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)
index 865d9cf8fdeb9faf4f42e9b479f663fc934f0dc1..dbbb144b260bae3a16a4156f931f54a75b1d6bd8 100644 (file)
 #include <sys/stat.h>
 #include <sys/un.h>
 #include <setjmp.h>
+#ifdef HAVE_SYS_PROCESSOR_H
+#include <sys/processor.h> /* 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 <sys/processor.h>
+#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)
index a845012bd731f588813ecfcd0961761bab95d553..638f070244aabfc2bde2ba6a3053212253481857 100644 (file)
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
+#ifdef HAVE_SYS_PROCESSOR_H
+#include <sys/processor.h> /* for bindprocessor() */
+#endif
 
 #include <signal.h>
 #include <sys/times.h>
@@ -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 <sys/processor.h>
+#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) {