On Tue, 25 Jun 2002, Alexander Kabaev wrote:

> The last commit to sys/sys/stat.h made by Kirk broke compilation of
> _POSIX_SOURCE programs. It uses sizeof(struct timespec) to pad the
> st_createtimespec field to 16 bytes, but struct timespec is not visible
> when _POSIX_SOURCE is defined.

Oops.  The patch was supposed to fix _POSIX_SOURCE problems as well as
the things mentioned in the log message, but added this new one.

The correct fix probably involves using <sys/_timespec.h> in the
_POSIX_SOURCE case and <sys/timespec.h> in the !_POSIX_SOURCE case.
I already use the latter (instead of <sys/time.h>) locally.  I had
hoped to completely avoid using the former because it's better to have
actual struct members named st_[acm]time than #defines of these names
as __st_[acm]timespec.__tv_sec.  The latter is bad for debugging and
might not be standards conformant.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to