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:
@@ -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
|
||||
|
||||
@@ -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>.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user