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

Re: size_t in lber.h



I've cc'ed -devel on this to allow wider discussions.

Bert Vermeulen wrote:
> Since you've made the memory allocation changes in lber.h, it needs size_t
> defined... that means it won't work in a client unless stdio.h is included
> first. No big deal, but I wasn't sure if you were aware of this.

I am.  We haven't decided how best to deal with this.  One has to be very
careful to what headers <lber.h> and <ldap.h> include.  Including headers,
even STDC headers, can cause portability problems.  (Yes, we support
non-STDC C translators).

Right now, I am considering conditionally including <stddef.h>, not <stdio.h>,
as follows:

#ifndef LBER_SIZE_T_DEFINED
#include <stddef.h>
#endif

Including <stdio.h> would bring in too much junk.

> While I'm at it, shouldn't ldap.h include lber.h by default? 

<ldap.h> should unconditionally include <lber.h>.


I will likely commit changes to this effect soon.

Kurt