Thread overview
[Issue 5589] New: Incorrect definitions in core.stdc.locale (Windows)
Dec 18, 2012
John Chapman
Dec 19, 2012
Andrej Mitrovic
Oct 18, 2013
Frank De prins
February 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5589

           Summary: Incorrect definitions in core.stdc.locale (Windows)
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody@puremagic.com
        ReportedBy: johnch_atms@hotmail.com


--- Comment #0 from johnch_atms@hotmail.com 2011-02-15 02:20:46 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 10, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5589


Alex Rønne Petersen <alex@lycus.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alex@lycus.org


--- Comment #1 from Alex Rønne Petersen <alex@lycus.org> 2012-10-10 03:28:26 CEST ---
I'm not sure what header you're going by. The MSVC one or the Digital Mars one?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 18, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5589



--- Comment #2 from John Chapman <johnch_atms@hotmail.com> 2012-12-18 02:03:09 PST ---
(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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 19, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5589


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-18 16:02:49 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 18, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5589


Frank De prins <frank.deprins@skynet.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |frank.deprins@skynet.be


--- Comment #4 from Frank De prins <frank.deprins@skynet.be> 2013-10-18 09:02:37 PDT ---
(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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------