summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2025-10-22 09:41:03 -0700
committerGitHub <noreply@github.com>2025-10-22 09:41:03 -0700
commit57a8228f40b6d8593a8744f6285444f124c636b8 (patch)
treeb7705a448f5989530c05533f0b9f3ea8fd6fbb63 /libc/include
parentd5e9a56ccb44eeb1f36a7af8be81081bbf00eb9c (diff)
[libc] Add macros definitions for <nl_types.h> (#164474)
This PR adds required macro definitions to `<nl_types.h>` header, so that they're available to the code including it. The header itself was added in 12abe8aed6dc724546cf93c94d7ff6abe864f28b, together with stub definitions of the three required functions.
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/CMakeLists.txt1
-rw-r--r--libc/include/llvm-libc-macros/CMakeLists.txt6
-rw-r--r--libc/include/llvm-libc-macros/nl-types-macros.h15
-rw-r--r--libc/include/nl_types.yaml6
4 files changed, 27 insertions, 1 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 09f169b9a985..a277690ae2e1 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -776,6 +776,7 @@ add_header_macro(
../libc/include/nl_types.yaml
nl_types.h
DEPENDS
+ .llvm-libc-macros.nl_types_macros
.llvm-libc-types.nl_catd
)
diff --git a/libc/include/llvm-libc-macros/CMakeLists.txt b/libc/include/llvm-libc-macros/CMakeLists.txt
index 76c03d913ee1..a33ff6cabbcf 100644
--- a/libc/include/llvm-libc-macros/CMakeLists.txt
+++ b/libc/include/llvm-libc-macros/CMakeLists.txt
@@ -346,6 +346,12 @@ add_macro_header(
)
add_macro_header(
+ nl_types_macros
+ HDR
+ nl-types-macros.h
+)
+
+add_macro_header(
pthread_macros
HDR
pthread-macros.h
diff --git a/libc/include/llvm-libc-macros/nl-types-macros.h b/libc/include/llvm-libc-macros/nl-types-macros.h
new file mode 100644
index 000000000000..b6d0d3519b51
--- /dev/null
+++ b/libc/include/llvm-libc-macros/nl-types-macros.h
@@ -0,0 +1,15 @@
+//===-- Definition of macros from nl_types.h ------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_MACROS_NL_TYPES_MACROS_H
+#define LLVM_LIBC_MACROS_NL_TYPES_MACROS_H
+
+#define NL_SETD 1
+#define NL_CAT_LOCALE 1
+
+#endif // LLVM_LIBC_MACROS_NL_TYPES_MACROS_H
diff --git a/libc/include/nl_types.yaml b/libc/include/nl_types.yaml
index aecbb44a0222..bdb59a82a333 100644
--- a/libc/include/nl_types.yaml
+++ b/libc/include/nl_types.yaml
@@ -1,7 +1,11 @@
header: nl_types.h
standards:
- posix
-macros: []
+macros:
+ - macro_name: NL_SETD
+ macro_header: nl-types-macros.h
+ - macro_name: NL_CAT_LOCALE
+ macro_header: nl-types-macros.h
types:
- type_name: nl_catd
enums: []