[fpc-devel] NowUTC in the RTL

Marco van de Voort marcov at stack.nl
Fri Dec 9 16:58:18 CET 2011


In our previous episode, Sven Barth said:
> > In our previous episode, Henry Vermaak said:
> >>> them, instead of pulling this into the core. (iow, like the users package)
> >>
> >> I don't understand.  Why link to libc for these?  They are syscalls, if
> >
> > Are they? On any OS and arch that calls itself posix or unix?
> 
> With that argumentation you could question any usage of syscalls in FPC 
> as we're not using syscalls on Mac OS X...

True, but they are libc functions on OS X. This isn't. 
 
> > Or maybe, the question should be the opposite, why not? Why shouldn't such
> > peripheral calls NOT be taken from libc?
> 
> If that function is indeed used to implement a fpGetTickCount which is 
> located in one of the core units (e.g. SysUtils) I wouldn't want to link 
> to a libc version (this is of course only if that hypothetic function 
> gets implemented in a core unit).

I don't see why it should be in sysutils.
 
> Also I personally(!) prefer direct "linkage" to the kernel.

Not always. See e.g. the readdir situation. Limiting the number of syscalls
drastically speeds up the process.

In Windows you also often call user32, not kernel32.



More information about the fpc-devel mailing list