Page 2 of 2

Posted: 19.01.2012, 10:25
by IndianaJones
There is {$IFDEF DARWIN} macro in FPC. The statements could be separated from UNIX
macro.

Posted: 19.01.2012, 12:51
by marcov
Not really. It should be the same for all unixy platforms.

Your problem is somewhere else, and as said earlier, using 2.4.4. or 2.6.0 it is the best to simply kill the whole ifdef FPC block in zclasses.

I'm currently revising the ifdef system of zeos, and hope to have an initial patch in about a week.

One of the problems is that I don't know much details about FPC versions before 2.4.2 anymore. Too long ago :-)

2.4.0 is a bit of a problem. It is still actively used (since default in Debian-stable), but was never used much with Lazarus.

Posted: 19.01.2012, 14:08
by papelhigienico
marcov wrote:One of the problems is that I don't know much details about FPC versions before 2.4.2 anymore. Too long ago :-)

2.4.0 is a bit of a problem. It is still actively used (since default in Debian-stable), but was never used much with Lazarus.
Really... a big problem.

I still suspecting about something related with your OS. I don't have a MacOS X to do tests. Because is strange the latest ZeosLib revision compiles fine on Linux with FPC 2.6.0 and Lazarus 0.9.31.

I checked to, if has something wrong with ZClasses.pas in /trunk and /branches/testing and are it equals.

Posted: 19.01.2012, 15:36
by marcov
I don't have a problem with 2.6.0 atm, I am not the original poster. From what I can see, the relevant fragment is correct for FPC 2.6.0 on OS X, but is not needed in the first place.

But I'm working with 2.7.1 which has TRecordBuffer like D2009 (which were recently merged back to 2.6.1), and noticed that about half of the ifdef FPC's are no longer necessary with 2.6.0

In time, 2.7.1 will be changed to the D2009 compatible definition of TRecordbuffer, and then Zeos must follow the Delphi12plus path of the relevant ifdefs. (but not all Delphi12plus bits are trecordbuffer related)

To this end, I've been playing and changing the define system for the last few days.

The goal is to totally eliminate the use of ver<x>, ver<x>plus and ver<x>below from the sources, and concentrate this in zeos.inc

For the current (not tidied) status see http://www.stack.nl/~marcov/zeos.patch

btw, maybe trecordbuffer shouldn't be solved with ifdefs at all, but should older Delphis simply define trecordbuffer=pchar or pansichar (which is the same for older Delphis), and should all relevant pchar() casts changed to trecordbuffer casts, eliminating the need for a ifdef at such positions.

Posted: 27.01.2012, 13:00
by IndianaJones
Tested with the revision 967 and now compiles without any error.
Thanks.

Posted: 27.01.2012, 22:47
by IndianaJones
Also plain files should be modified for DARWIN. It is different than windows(dll) and linux(so). it uses dylib.

Posted: 29.02.2012, 22:59
by mdaems
IndianaJones,
Can you propose (and test!) a fix for the dylib problem for your database driver of choice?
I suppose a few changes to the zplainloader and zplainxxxxdriver units may do the trick?

Mark

Posted: 01.03.2012, 21:32
by marcov
IndianaJones wrote:Also plain files should be modified for DARWIN. It is different than windows(dll) and linux(so). it uses dylib.
In case of FPC, it should use "sharedsuffix" in unit dynlibs. (the unit that contains portable loadlibrary etc in FPC).

This is loaded, in a platform depend way with .so, dylib and dll.

BTW, OS X does support .so, but that's a bit atypical.