www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11275] New: Constants for setlocale are incorrect

http://d.puremagic.com/issues/show_bug.cgi?id=11275

           Summary: Constants for setlocale are incorrect
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: frank.deprins skynet.be


--- Comment #0 from Frank De prins <frank.deprins skynet.be> 2013-10-15
13:23:40 PDT ---
The LC_xxx constants, defined in core.stdc.locale are not correct, at least not
for Windows.
In the headers of Microsoft Visual C++, as well as in other windows based
compilers, these are defined as:

#define LC_ALL          0
#define LC_COLLATE      1
#define LC_CTYPE        2
#define LC_MONETARY     3
#define LC_NUMERIC      4
#define LC_TIME         5

whereas, in core.stdc.locale, they are defined as:

enum LC_CTYPE          = 0;
enum LC_NUMERIC        = 1;
enum LC_TIME           = 2;
enum LC_COLLATE        = 3;
enum LC_MONETARY       = 4;
enum LC_ALL            = 6;

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