roken/parse_bytes: fix test for >= terabyte units on 32 bit systems

On 32 bit systems, sizeof(ssize_t) and sizeof(unsigned long aka UL) is
32 bits which is not able to hold the value of a terabyte.
This commit is contained in:
Robert Manner
2022-11-08 14:47:40 +01:00
committed by Nico Williams
parent 997916e3f6
commit 65e5b0ab79
4 changed files with 17 additions and 17 deletions

View File

@@ -38,13 +38,13 @@
#include <roken.h>
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
ROKEN_LIB_FUNCTION int64_t ROKEN_LIB_CALL
parse_bytes(const char *s, const char *def_unit);
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
unparse_bytes(ssize_t t, char *s, size_t len);
unparse_bytes(int64_t t, char *s, size_t len);
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
unparse_bytes_short(ssize_t t, char *s, size_t len);
unparse_bytes_short(int64_t t, char *s, size_t len);
#endif /* __PARSE_BYTES_H__ */