[fpc-devel] NowUTC in the RTL

Michael Van Canneyt michael at freepascal.org
Fri Dec 9 15:57:14 CET 2011

On Fri, 9 Dec 2011, Marco van de Voort wrote:

> In our previous episode, Marco van de Voort said:
>> In our previous episode, Michael Van Canneyt said:
>>>> But maybe IMHO this kind of stuff should remain out of sysutils, certainly now
>>>> it is not entirely clear, and people are still searching for solutions.
>>> That's not the question.
>>> clock_gettime is a linux kernel call. No-one is proposing to add it to sysutils.
>> If we decide to use it via libc, we might not have to add it as a syscall.

That sounds as if you think a syscall is a bad thing ? 
In each case, it's not really relevant.

>>> The question is whether clock_gettime is POSIX, and if BSD has it.
>>> The linux man page seems to say it is POSIX 2001. My question is if BSD has it.
>> FreeBSD has it.  But OS X hasn't it seems, not even in recent versions.
> Let's not forget btw that it is not just a matter of the call, the constants
> matter too.

This is not a real argument; 
The constants or types for many other posixy-functions are system dependent; 
we introduced them anyway.

Well, if OS-X does not have it, we can't really say it is POSIX for our purposes, 
so then it goes to the linux unit. It's as simple as that.

Unless you have arguments for putting it in (base)unix anyway.


More information about the fpc-devel mailing list