* Patch from Rika to enable assembler version of MD5 on i386-darwin. Fixes issue #40470

This commit is contained in:
Michaël Van Canneyt 2023-10-15 10:23:51 +02:00
parent 66e2cf5e5c
commit aa841d584d
2 changed files with 4 additions and 9 deletions

View File

@ -32,7 +32,7 @@ begin
P.Version:='3.3.1';
T:=P.Targets.AddUnit('src/md5.pp');
T.Dependencies.AddInclude('src/md5i386.inc', [i386], AllOSes-[darwin]);
T.Dependencies.AddInclude('src/md5i386.inc', [i386], AllOSes);
T:=P.Targets.AddUnit('src/sha1.pp');
T.Dependencies.AddInclude('src/sha1i386.inc', [i386], AllOSes);
T:=P.Targets.AddUnit('src/crc.pas');
@ -43,8 +43,6 @@ begin
T.OSes:=[Linux];
T:=P.Targets.AddExampleunit('examples/mdtest.pas');
T:=P.Targets.AddExampleunit('examples/crctest.pas');
T:=P.Targets.AddExampleunit('examples/sha1test.pp');
T:=P.Targets.AddExampleunit('examples/hmd5.pp');
T:=P.Targets.AddExampleunit('examples/hsha1.pp');
T:=P.Targets.AddExampleunit('examples/md5performancetest.pas');

View File

@ -42,12 +42,9 @@ These notices must be retained in any copies of any part of this
documentation and/or software.
}
// Define to use original MD5 code on i386 processors.
// Undefine to use original implementation.
{ the assembler implementation does not work on Darwin }
{$ifdef darwin}
{$DEFINE MD5PASCAL}
{$endif darwin}
// Normally, if an optimized version is available for OS/CPU, that will be used
// Define to use generic implementation
{ $DEFINE MD5PASCAL}
{$IFNDEF FPC_DOTTEDUNITS}
unit md5;