mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-27 00:21:15 -03:00
Fix builtin_printf compilation on FreeBSD 8.x
https://github.com/fish-shell/fish-shell/issues/626
This commit is contained in:
@@ -234,19 +234,19 @@ void builtin_printf_state_t::verify_numeric(const wchar_t *s, const wchar_t *end
|
||||
template<typename T>
|
||||
static T raw_string_to_scalar_type(const wchar_t *s, wchar_t ** end);
|
||||
|
||||
// we use wcstoll instead of wcstoimax because FreeBSD 8 has busted wcstoumax and wcstoimax - see #626
|
||||
template<>
|
||||
intmax_t raw_string_to_scalar_type(const wchar_t *s, wchar_t ** end)
|
||||
{
|
||||
return wcstoimax(s, end, 0);
|
||||
return wcstoll(s, end, 0);
|
||||
}
|
||||
|
||||
template<>
|
||||
uintmax_t raw_string_to_scalar_type(const wchar_t *s, wchar_t ** end)
|
||||
{
|
||||
return wcstoumax(s, end, 0);
|
||||
return wcstoull(s, end, 0);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
long double raw_string_to_scalar_type(const wchar_t *s, wchar_t ** end)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user