[fpc-pascal] Dependencies of FPC_HAS_FEATURE_XXX

Sven Barth svenmauren at vr-web.de
Sun May 3 00:13:33 CEST 2009


Hello together!

As you (might) know I'm currently implementing the RTL for NT's native 
usermode API and I found some (at least in my opinion) unnecessary 
dependencies in FPC's FPC_HAS_FEATURE_XXX system.

If I disable all features (by simply undef-ing them before the inclusion 
of systemh.inc) the platform dependent code (in my case i386) asks for 
the function "fpc_truely_ansistr_unique" which is included only if 
FPC_HAS_FEATURE_ANSISTRINGS is defined (that's not very nice ^^ ).
When I enable the ansistrings the compiler asks for the heap methods. 
That's natural and so I'm ok with it.
But the heap feature relies on the threading feature, which is really 
annoying: now I have to implement critical section support, what I 
wanted to do at a later time (although I could simply stub the procedures).

In my (!) opinion those two cases (i386.inc and heap.inc) should check 
whether the features, which they "optionally" depend on, are enabled .

So... before I write a bug report about this, I wanted to ask you if 
this behavior is by design or just a bug that no one encountered, 
because no one enabled the features step by step? ;)

Greetings,
Sven

PS: Just curios: why does system.pp set mode to objfpc?



More information about the fpc-pascal mailing list