mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
fix bug where off_t was assumed to be long long, causing display errors on systems with no large file support
darcs-hash:20061109175804-ac50b-b05ec0aa9ae6f7dd23b7432c321eff44b446397d.gz
This commit is contained in:
parent
79de45eed5
commit
08787c7674
@ -305,7 +305,12 @@ static void get_desc( wchar_t *fn, string_buffer_t *sb, int is_cmd )
|
|||||||
const wchar_t *desc;
|
const wchar_t *desc;
|
||||||
|
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
off_t sz;
|
|
||||||
|
/*
|
||||||
|
This is a long long, not an off_t since we really need to know
|
||||||
|
exactly how large it is when using *printf() to output it.
|
||||||
|
*/
|
||||||
|
long long sz;
|
||||||
wchar_t *sz_name[]=
|
wchar_t *sz_name[]=
|
||||||
{
|
{
|
||||||
L"kB", L"MB", L"GB", L"TB", L"PB", L"EB", L"ZB", L"YB", 0
|
L"kB", L"MB", L"GB", L"TB", L"PB", L"EB", L"ZB", L"YB", 0
|
||||||
@ -326,7 +331,7 @@ static void get_desc( wchar_t *fn, string_buffer_t *sb, int is_cmd )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sz = buf.st_size;
|
sz = (long long)buf.st_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
desc = complete_get_desc( fn );
|
desc = complete_get_desc( fn );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user