Skip to content

Commit 8c9c0c5

Browse files
committed
Merge branch 'po/fix-decimal-32bit' into 'master'
Fix Decimal definition on 32bit platforms. See merge request eng/toolchain/aws!48
2 parents 69a0c7b + 9520890 commit 8c9c0c5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/soap/soap-types.ads

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,18 @@ package SOAP.Types is
336336
-- Decimal --
337337
-------------
338338

339-
type Decimal is delta 10.0 ** (-8) digits 32;
339+
-- Ensure a supported value is selected depending on the platform
340+
-- being 32bit or 64bit.
341+
342+
Max_Digits : constant := (if Standard'Max_Integer_Size >= 128
343+
then 38
344+
else 18);
345+
346+
D_Delta : constant := (if Standard'Max_Integer_Size >= 128
347+
then 8
348+
else 4);
349+
350+
type Decimal is delta 10.0 ** (-D_Delta) digits Max_Digits;
340351

341352
XML_Decimal : aliased constant String := "xsd:decimal";
342353

0 commit comments

Comments
 (0)