Some more feature dependencies in the RTL
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
As mentioned on fpc-devel I found another bunch of RTL feature dependencies while improving the Native NT port and decided to post patches for the easier dependencies (in the Zip archive are four patch files).
* rtl-dependencies-fileio: sysdir.inc was always included, although the interface part is ifdef'd; also I fixed a typo in endif comment of RTTI feature
* rtl-dependencies-variants: Including objpas.inc with FEATURE_CLASSES required to add VARIANTS as well, but in my opinion those aren't needed if one just wants to use classes. The problem is that the type PDispDesc used in fpc_dispatch_by_id and DoDispCallByIDError is only defined if variantsh.inc is included.
As a solution I simply ifdef'd the two methods. If you have a better idea (moving the PDispDesc type somewhere else?), let me know it and I'll update the patch.
* rtl-dependencies-rtti: I removed the dependencies on the features ANSISTRINGS, WIDESTRINGS, DYNARRAYS and OBJECTS. OBJECTS is not really a dependency and it wouldn't matter if I left it in there, but I wanted it to be as complete as possible.
* rtl-dependencies-objpas: I ifdef'd the dependencies on TEXTIO, FILEIO and COMMANDARGS, because using the objpas unit is required when using CLASSES, but those features might not yet be implemented.
I also tried to remove the dependency of DYNARRAYS on RTTI (which requires FPC_ADDREF and FPC_FINALIZEARRAY during linking), but I don't know a good way to solve this (at least currently).
Additional information:
Once these patches are applied I can update the Native NT patches with classes/objects/dynarrays support.
Also keep in mind, please, that this not only helps me in implementing Native NT, but also writers of RTLs for other new targets.
Mantis conversion info:
- Mantis ID: 15124
- OS: Win32
- OS Build: NT 6.0 (Vista)
- Platform: i386
- Version: 2.5.1
- Fixed in revision: 14212 (#4104d9f4)
- Target version: 2.5.1