string.h: don't pollute the namespace with locale.h

Previously, we included all of `<locale.h>` in order to get `locale_t`.
This commit separates it into a `<bits/locale-t.h>` header (generated by
cbindgen) to better deal with this.
This commit is contained in:
Connor-GH
2026-01-20 14:29:08 -06:00
parent 3362ca356a
commit cedd1686ba
7 changed files with 26 additions and 3 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
sys_includes = ["stddef.h", "stdint.h", "strings.h", "locale.h"]
sys_includes = ["stddef.h", "stdint.h", "strings.h"]
include_guard = "_RELIBC_STRING_H"
after_includes = """
#include <bits/locale-t.h> // for locale_t
"""
language = "C"
style = "Tag"
no_includes = true
+1 -1
View File
@@ -20,7 +20,7 @@ use crate::{
raw_cell::RawCell,
};
use super::locale::{THREAD_LOCALE, locale_t};
use super::{bits_locale_t::locale_t, locale::THREAD_LOCALE};
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/memccpy.html>.
///