Inline the localconv_l test

It's just one line.
This commit is contained in:
Mahmoud Al-Qudsi 2024-01-13 14:58:58 -06:00
parent 8554eb5f80
commit 4f8265db47

View file

@ -96,7 +96,8 @@ fn detect_features(target: Target) {
),
("bsd", &detect_bsd),
("gettext", &have_gettext),
("localeconv_l", &have_localeconv_l),
// See if the system headers provide the thread-safe localeconv_l(3) alternative to localeconv(3).
("localeconv_l", &|target| Ok(target.has_symbol_in::<String>("localeconv_l", &[]))),
] {
match handler(&target) {
Err(e) => rsconf::warn!("{}: {}", feature, e),
@ -185,8 +186,3 @@ fn have_gettext(target: &Target) -> Result<bool, Box<dyn Error>> {
}
}
}
/// See if the system headers provide the thread-safe localeconv_l(3) alternative to localeconv(3).
fn have_localeconv_l(target: &Target) -> Result<bool, Box<dyn Error>> {
Ok(target.has_symbol_in::<String>("localeconv_l", &[]))
}