summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-10-22 20:31:47 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-10-23 23:31:43 -0700
commitba975f4ba45c57403c22ea1f653a98ab2e7721fd (patch)
tree9214775b228c5c66ed11906ace16277b7b1dc21a /Userland
parentfa753ff863e3776cb1778890cca395ec030a17bd (diff)
downloadserenity-ba975f4ba45c57403c22ea1f653a98ab2e7721fd.zip
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.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibC/locale.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/locale.h b/Userland/Libraries/LibC/locale.h
index 3f200f9fb4..2c9cfb2d4a 100644
--- a/Userland/Libraries/LibC/locale.h
+++ b/Userland/Libraries/LibC/locale.h
@@ -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 {