Bladeren bron

Add TODO to deal with systems with sizeof(pthread_t) > sizeof(unsigned long)

bel 9 jaren geleden
bovenliggende
commit
7739a5135a
1 gewijzigde bestanden met toevoegingen van 10 en 3 verwijderingen
  1. 10 3
      src/civetweb.c

+ 10 - 3
src/civetweb.c

@@ -9563,9 +9563,16 @@ static unsigned long ssl_id_callback(void)
 	/* CRYPTO_set_id_callback() assumes thread IDs can be represented by
 	 * unsigned long. See
 	 * https://www.openssl.org/docs/manmaster/crypto/threads.html#HISTORY */
-	mg_static_assert(sizeof(pthread_t) <= sizeof(unsigned long),
-	                 "Thread-ID data type size check"
-	                 " - set pthread_t_LARGER_THAN_unsigned_long");
+
+	/* TODO(high): Deal with sizeof(pthread_t) > sizeof(unsigned long) in
+	 * another way. Using the new openSSL API would cause an in incompatibility
+	 * with systems running the old SSL library. Maybe the entire function is
+	 * not required at all, since the default function will work?
+
+	    mg_static_assert(sizeof(pthread_t) <= sizeof(unsigned long),
+	                     "Thread-ID data type size check"
+	                     " - set pthread_t_LARGER_THAN_unsigned_long");
+	*/
 
 	return (unsigned long)pthread_self();
 #endif