httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jchamp...@apache.org
Subject svn commit: r1791309 - /httpd/httpd/branches/trunk-openssl-threadid/acinclude.m4
Date Fri, 14 Apr 2017 00:14:24 GMT
Author: jchampion
Date: Fri Apr 14 00:14:24 2017
New Revision: 1791309

URL: http://svn.apache.org/viewvc?rev=1791309&view=rev
Log:
configure: bump thread count for the &errno test

Increase the number of threads from three to ten. Patch by rjung.

Modified:
    httpd/httpd/branches/trunk-openssl-threadid/acinclude.m4

Modified: httpd/httpd/branches/trunk-openssl-threadid/acinclude.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-openssl-threadid/acinclude.m4?rev=1791309&r1=1791308&r2=1791309&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-openssl-threadid/acinclude.m4 (original)
+++ httpd/httpd/branches/trunk-openssl-threadid/acinclude.m4 Fri Apr 14 00:14:24 2017
@@ -653,7 +653,7 @@ AC_DEFUN([APACHE_CHECK_OPENSSL],[
           #include "apr_thread_cond.h"
           #include "apr_thread_proc.h"
 
-          #define NUM_THREADS 3
+          #define NUM_THREADS 10
 
           struct thread_data {
               apr_thread_mutex_t *mutex;
@@ -692,6 +692,7 @@ AC_DEFUN([APACHE_CHECK_OPENSSL],[
           int ret = 0;
           apr_status_t status;
           int i;
+          int j;
 
           apr_pool_t         *pool;
           apr_thread_mutex_t *mutex;
@@ -738,10 +739,13 @@ AC_DEFUN([APACHE_CHECK_OPENSSL],[
           }
 
           /* Check that no addresses were duplicated. */
-          if ((tdata[0].errno_addr == tdata[1].errno_addr)
-              || (tdata[1].errno_addr == tdata[2].errno_addr)
-              || (tdata[0].errno_addr == tdata[2].errno_addr)) {
-              ret = 5;
+          for (i = 0; i < NUM_THREADS - 1; ++i) {
+              for (j = i + 1; j < NUM_THREADS; ++j) {
+                  if (tdata[i].errno_addr == tdata[j].errno_addr) {
+                      ret = 5;
+                      goto out;
+                  }
+              }
           }
 
       out:



Mime
View raw message