mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
LibC: Define locale categories (LC_*) as macros
The C standard states that these symbols should be declared as macros, not as emum variants as we were doing previously. This is used in some ports (e.g. bash) to conditionally compile locale-dependent functionality. We now use the same trick here as with the errno constants. We keep the enum, but also create macros that defer to the enum variants.
This commit is contained in:
parent
fa753ff863
commit
ba975f4ba4
1 changed files with 7 additions and 0 deletions
|
@ -12,12 +12,19 @@ __BEGIN_DECLS
|
|||
|
||||
enum {
|
||||
LC_ALL,
|
||||
#define LC_ALL LC_ALL
|
||||
LC_NUMERIC,
|
||||
#define LC_NUMERIC LC_NUMERIC
|
||||
LC_CTYPE,
|
||||
#define LC_CTYPE LC_CTYPE
|
||||
LC_COLLATE,
|
||||
#define LC_COLLATE LC_COLLATE
|
||||
LC_TIME,
|
||||
#define LC_TIME LC_TIME
|
||||
LC_MONETARY,
|
||||
#define LC_MONETARY LC_MONETARY
|
||||
LC_MESSAGES,
|
||||
#define LC_MESSAGES LC_MESSAGES
|
||||
};
|
||||
|
||||
struct lconv {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue