From: Craig P. <cr...@sc...> - 2011-12-05 15:24:24
|
> Can you briefly highlith the differences as well as potential impact > on existing code. Sure. From top to bottom: * Added {$IFDEF FPC} block to turn on {$MODE DELPHI} and the PUREPASCAL define. * Fixed CallerAddr's declaration to use {$IFDEF PUREPASCAL} instead of {$IFDEF CLR} around the "assembler" statement. This just makes it match the implementation block. * Added "unix" to implementation uses clause when appropriate, needed for fpgettimeofday. * Added NativeInt type declaration in the implementation section for cases where it isn't available or is declared incorrectly (Delphi 2009 and earlier, FreePascal 2.4). * InitPerformanceCounter/QueryPerformanceCounter (unix) use FreePascal's fpgettimeofday rather than libc's gettimeofday (in $IFDEF). * Stubbed out CheckMethodIsNotEmpty for FPC. The byte read was causing a crash, but I didn't look into it further, and I did this before I realized TMethodEnumerator was broken, so this change might not be necessary. * Implemented FPC-specific version of TMethodEnumerator.Create. * In CreateRegistry I removed the non-CLR codepath, so it always uses ParamStr(0) instead of calling GetModuleFilename. At least under Delph 7+/Kylix 3, ParamStr(0) already uses GetModuleFilename, rather than returning the real command line parameter, so there /shouldn't/ be a change in functionality here. The CreateRegistry change is the only one that could conceivably affect existing code, though I don't know how. Everything else is in an {$IFDEF FPC} or similar block. I haven't gotten DUnit's own tests to compile under FreePascal yet, but the Abbrevia testsuite works fine. All of the tests still pass under Delphi XE2. -- Craig Peterson Scooter Software |