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

Re: timeval in ldapext-ldap-c-api-01



Anoop Anantha wrote:
> If you are worried about namespace collision, why not define your own
> timeval structure with a slightly different name like
> 
> typedef struct l_timeval {
>     LONG    tv_sec;
>     LONG    tv_usec;
> } LDAP_TIMEVAL, * PLDAP_TIMEVAL;
> 
> int ldap_result(
>         LDAP            *ld,
>         int             msgid,
>         int             all,
>         struct l_timeval  *timeout,
>         LDAPMessage     **res
> );
> 

Yiks!

If I put this in my implementation's header(s), I would
	1) cause compiler warnings with compliant programs
	2) promote use of nonstandard types and prototypes.
	   (any program written against my implementation's
	   header wouldn't be portable).

Any implementation which provides a prototype which is in
direct conflict with the API must be considered nonconformant.

Kurt