[fpc-devel] libc translations
Daniël Mantione
daniel.mantione at freepascal.org
Sun Aug 10 11:19:31 CEST 2008
Op Sun, 10 Aug 2008, schreef Boian Mitov:
> Hi Daniel,
>
> Thank you!
> As I mentioned I am very new, and still don't know the exact rules of the
> purpose of specific units. I am not sure if the timers are available on other
> systems than Linux yet. I am sure there is some form of equivalent. I
> actually don't have any Kylix code.
In Free Pascal we have spread the functionality over multiple units:
- "baseunix" contains Unix system calls that are portable accross Unixes.
- "unix" contains generally available Unix routines that are portable
accross Unixes:
- "linux" contains Linux specific system calls.
If the HR timers are not part of any standard, implementing them in
"linux" seems the best approach to me.
> I am porting Windows code, actually making it cross platform as we
> support Delphi 5-2007, and plan to support Lazarus for Windows and Linux
> for now, and hopefully for other platforms in the future. Porting huge
> code from Windows is slow and error prone process, so I am doing it in
> stages. For now I have made everything to recompile under Lazarus in
> Linux, and now I am filling the items I had to cut from the code during
> the conversion. In Windows I use the Media Timers, and the only
> equivalent thing I have found in Linux is the High Resolution timers. I
> have been studding the FPC and Lazarus code, and I discovered the libc,
> and it seemed as the logical place such timers to be implemented. If
> they belong to a different location, this is fine. I can also keep them
> in my code, but I thought other people can benefit from the translation.
Timing on Unix is often done using alarm/setitimer system calls,
gettimeofday, etc. I don't know wether these satisfy your needs.
> As I said I am days fresh on Linux, and have been playing with Lazarus and
> FPC under Windows for only a month or so, and I have a lot to learn ;-) . I
> was able however to get the libraries to work nearly 80% already, and I think
> in few months can have them ready for deployment. I still will have to figure
> out how to package them in Linux, and how to deploy them compiled against
> different visual frameworks, but that is for the future. For now I am focused
> on getting the high resolution timers to work, so I can move to the next
> issue in the list ;-) .
Good to hear that you are making progress!
Daniël
More information about the fpc-devel
mailing list