Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-06

OS and Architecture detection...

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tom Lisjac

Today's project is to try and clean up the code I've written so it will work across the operating systems and architectures that FPC and Lazarus support. I've noticed conditionals for "i386", "BSD", "Solaris" etc, but I can't find the place where they're set. Getting a dump of them all and seeing when they're applied would be very useful.

I'm also interested in runtime capability detection. I have some routines for the IA-32 (processor type, SN, stepping, id, time stamp counter, clock speed etc) but nothing for any other architecture.

If there isn't a "Developer's guide for cross platform coding", I'll start one if someone will point me in the right direction.

-Tom

Reply by email

Unknown author
to Tom Lisjac
Tom Lisjac wrote 5 lines
Today's project is to try and clean up the code I've written so it will work across the operating systems and architectures that FPC and Lazarus support. I've noticed conditionals for "i386", "BSD", "Solaris" etc, but I can't find the place where they're set.

They are set internally by the compiler.

Getting a dump of them all and seeing when they're applied would be very useful.

When compiling, 'ppc386 -vm' will report all macros defined by the compiler, and will report what the compiler does when it encounters a macro directive.

I'm also interested in runtime capability detection. I have some routines for the IA-32 (processor type, SN, stepping, id, time stamp counter, clock speed etc) but nothing for any other architecture.

Neither have we, I suspect :-)

But you can ask:

Jonas Maebe () is the PPC architecture expert.
Pierre Muller or Carl-Eric codere are M68k experts. ( or ) Peter Vreman or Mazen Neifer take care of the SPARC port (, ) Feel free to start a new architecture yourself ;-)

It would be a good idea to have some cross-CPU capability detection routines.

Michael.

Reply by email