View Issue Details

IDProjectCategoryView StatusLast Update
0036527FPCRTLpublic2020-01-06 23:55
ReporterCyrax Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
PlatformLinux x86_64OSArch 
Product Version3.3.1 
Summary0036527: DoubleCommander project can't be built for Windows target, if certain enumeration values of TCompareOption type is commented out
DescriptionSee summary and attached patch file for more info.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Cyrax

2020-01-06 17:11

reporter  

enable_tcompareoption_set.diff (1,712 bytes)   
diff --git a/rtl/inc/ustringh.inc b/rtl/inc/ustringh.inc
index cb5e86ca97..141979745b 100644
--- a/rtl/inc/ustringh.inc
+++ b/rtl/inc/ustringh.inc
@@ -57,9 +57,9 @@ Type
   { please only enable options below after creating a test program for them that
     passes on Windows and committing it, so it can be used to verify the
     functionality on other platforms }
-  TCompareOption = ({coLingIgnoreCase, coLingIgnoreDiacritic, }coIgnoreCase{,
+  TCompareOption = (coLingIgnoreCase, coLingIgnoreDiacritic, coIgnoreCase,
                     coIgnoreKanaType, coIgnoreNonSpace, coIgnoreSymbols, coIgnoreWidth,
-                    coLingCasing, coDigitAsNumbers, coStringSort});
+                    coLingCasing, coDigitAsNumbers, coStringSort);
   TCompareOptions = set of TCompareOption;
   TStandardCodePageEnum = (
     scpAnsi,                 // system Ansi code page (GetACP on windows)
diff --git a/rtl/win/sysutils.pp b/rtl/win/sysutils.pp
index f562b3e687..f93621349c 100644
--- a/rtl/win/sysutils.pp
+++ b/rtl/win/sysutils.pp
@@ -1474,9 +1474,9 @@ function DoCompareStringW(P1, P2: PWideChar; L1, L2: PtrUInt; Flags: DWORD): Ptr
 
 const
   WinAPICompareFlags : array [TCompareOption] of LongWord
-    = ({LINGUISTIC_IGNORECASE,  LINGUISTIC_IGNOREDIACRITIC, }NORM_IGNORECASE{,
+    = (LINGUISTIC_IGNORECASE,  LINGUISTIC_IGNOREDIACRITIC, NORM_IGNORECASE,
        NORM_IGNOREKANATYPE, NORM_IGNORENONSPACE, NORM_IGNORESYMBOLS, NORM_IGNOREWIDTH,
-       NORM_LINGUISTIC_CASING, SORT_DIGITSASNUMBERS, SORT_STRINGSORT});
+       NORM_LINGUISTIC_CASING, SORT_DIGITSASNUMBERS, SORT_STRINGSORT);
 
 function Win32CompareWideString(const s1, s2 : WideString; Options : TCompareOptions) : PtrInt;
 
-- 
2.24.1

enable_tcompareoption_set.diff (1,712 bytes)   

Michael Van Canneyt

2020-01-06 20:41

administrator   ~0120241

Where is the test program ?

See the prominent comment before the enumerated :

   { please only enable options below after creating a test program for them that
     passes on Windows and committing it, so it can be used to verify the
     functionality on other platforms }

There is a reason why these are commented out.

Issue History

Date Modified Username Field Change
2020-01-06 17:11 Cyrax New Issue
2020-01-06 17:11 Cyrax File Added: enable_tcompareoption_set.diff
2020-01-06 20:41 Michael Van Canneyt Note Added: 0120241
2020-01-06 23:55 Marco van de Voort Assigned To => Michael Van Canneyt
2020-01-06 23:55 Marco van de Voort Status new => feedback
2020-01-06 23:55 Marco van de Voort FPCTarget => -