[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#314435: libc6-dev: struct timespec and nanosleep() not available with -std=c99



At Sat, 18 Jun 2005 11:44:00 +0200,
Baurzhan Ismagulov wrote:
> However, I still have a problem. My intention is to use -std=c99 and
> define macros like _BSD_SOURCE in order to document all portability
> issues at the top of the files. After I defined _POSIX_C_SOURCE to
> 200201L, I'm able to compile the file without problems. However, neither
> SUSv3, nor Linux man page say anything about it. That is why I used to
> think that struct timespec and nanosleep MUST be available after a bare
> #include <time.h>. Does POSIX specify whether the availability can be
> controlled with a macro? Should Linux man page be updated to mention
> _POSIX_C_SOURCE?

I also don't know it should be described to linux man pages - if you
think so, please reassign it to manpages-dev.  However linux manpages
is not the only reference, I think.

> BTW, defining _POSIX_SOURCE, which is described in the glibc
> documentation, didn't work for me. Is it a bug, or does "POSIX.1" mean
> POSIX 1990 only?

"/usr/include/features.h" describes the actual detail, please check it
out.

Regards,
-- gotom



Reply to: