Bug 5589 – Incorrect definitions in core.stdc.locale (Windows)
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-02-15T02:20:00Z
Last change time
2015-05-19T00:20:17Z
Assigned to
nobody
Creator
johnch_atms
Comments
Comment #0 by johnch_atms — 2011-02-15T02:20:46Z
Looks like the Windows version of the locale.h header differs from that on other platforms, so some changes need to be made to core.stdc.locale.
1) The lconv structure should end immediately after the n_sign_posn member.
2) The category constants should be as follows:
enum {
LC_ALL = 0,
LC_COLLATE = 1,
LC_CTYPE = 2,
LC_MONETARY = 3,
LC_NUMERIC = 4,
LC_TIME = 5
}
Also, LC_PAPER through to LC_IDENTIFICATION don't get defined in the Windows header.
Comment #1 by alex — 2012-10-09T18:28:26Z
I'm not sure what header you're going by. The MSVC one or the Digital Mars one?
Comment #2 by johnch_atms — 2012-12-18T02:03:09Z
(In reply to comment #1)
> I'm not sure what header you're going by. The MSVC one or the Digital Mars one?
The Windows SDK. But the definitions of the LC_* constants are the same in both.
Comment #3 by andrej.mitrovich — 2012-12-18T16:02:49Z
The current one is fine since it uses the DMC runtime so the headers match, however I think it might have to be updated for x64 since MSVC is used there.
Comment #4 by frank.deprins — 2013-10-18T09:02:37Z
(In reply to comment #3)
> The current one is fine since it uses the DMC runtime so the headers match,
> however I think it might have to be updated for x64 since MSVC is used there.
That is not true; it simply does not work. I tried the LC_ALL and it did not adjust the decimal separator to my locale when printing a floating point number. However, using 0 instead of LC_ALL does work.
Comment #5 by verylonglogin.reg — 2013-11-07T01:12:47Z
Fixed Issue 11293 is a dup of 2) of this issue.
Comment #6 by dlang-bugzilla — 2015-05-19T00:20:17Z
*** This issue has been marked as a duplicate of issue 11293 ***