[fpc-devel] strange code in TThread in classesh.inc
Tomas Hajny
XHajT03 at mbox.vol.cz
Fri Sep 29 12:26:39 CEST 2006
Graeme Geldenhuys wrote:
> What is the point of these ifdef's, they are identical in the sense of
> variable names and types...?
> ----------Line 1208 in classesh.inc ------------------------
> <snip>
> property Terminated: Boolean read FTerminated;
> {$ifdef Unix}
> private
> // see tthread.inc, ThreadFunc and TThread.Resume
> FSem: Pointer;
> FInitialSuspended: boolean;
> FSuspendedExternal: boolean;
> {$ifdef linux}
> FPid: LongInt;
> {$endif}
> {$endif}
> {$ifdef netwlibc}
> private
> // see tthread.inc, ThreadFunc and TThread.Resume
> FSem: Pointer;
> FInitialSuspended: boolean;
> FSuspendedExternal: boolean;
> FPid: LongInt;
> {$endif}
> public
> <snip>
> ----------------------------------
What would be your suggestion - change it to {$IF defined(UNIX) or
defined(NETWLIBC)}? I'd say that it would be better to make the interface
completely common, i.e. to get rid of these IFDEFs completely (e.g. by
including a record defined in platform specific part of the unit).
Tomas
More information about the fpc-devel
mailing list