[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5824) #if/#elif issues in thread #includes

Full_Name: Hallvard B Furuseth
Version: HEAD, RE24
OS: Linux
Submission from: (NULL) (
Submitted by: hallvard

 This ldap_pvt_thread.h snippet is invalid:
  #define LDAP_PVT_THREAD_STACK_SIZE	( 1 * 1024 * 1024 * sizeof(void *) )
The standard is worded so that the #elif expression is evaluated even
when the preceding #if was true - so the sizeof(void*) causes a syntax
error in the preprocessor.

Noticed by Debian when compiling with the upcoming gcc 4.4:

This ldap_int_thread.h snippet:
  #elif defined( HAVE_CTHREAD_H
  #	include <cthreads.h>
lacks a ')' and should test HAVE_CTHREAD*S*_H.