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

Re: (a.josey 12144) Re: (c.harding 29009) Re: c-api-03 minor nits




Chris Harding wrote:
> ...
> struct timeval is defined in the Single UNIX Specification (Open Group
> Publication, see
> http://www.opengroup.org/onlinepubs/007908799/xsh/systime.h.html ) to be
> available when <sys/time.h> is included and to contain fields
> 
>    time_t       tv_sec        seconds
>    suseconds_t  tv_usec       microseconds
> 
> I don't beleive that it is defined in ISO 9945 or IEEE 1003.1 (POSIX).
> Rather, POSIX defines struct timespec, to be available when <time.h> is
> included, and containing:
> 
>    time_t       tv_sec        seconds
>    long         tv_nsec       nanoseconds
> 
> The argument for the timespec as opposed to the timeval structure is that,
> these days, microseconds are a pretty coarse granularity for timers.
> 
> You might consider changing the LDAP API to use timespecs rather than
> timevals.

Thanks for the information.  I personally believe the disruptions that
would be caused by any movement away from struct timeval far outweigh
any advantages.  But it is clear that we need to avoid specifying the
types for tv_sec and tv_usec as they vary from implementation to
implementation.


> ...
> BTW, a very minor nit, in the definition of ldap_compare_ext (section 10.9,
> page 30), there should be a comma following "struct berval *bvalue".\

Good catch.  Thanks!

-- 
Mark Smith
Directory Architect / Netscape Communications Corp.
My words are my own, not my employer's.  Got LDAP?