aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libbb.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 02cc008f0..b72576f28 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -305,9 +305,13 @@ typedef unsigned long long uoff_t;
305# endif 305# endif
306#else 306#else
307/* CONFIG_LFS is off */ 307/* CONFIG_LFS is off */
308# if UINT_MAX == 0xffffffff 308/* sizeof(off_t) == sizeof(long).
309/* While sizeof(off_t) == sizeof(int), off_t is typedef'ed to long anyway. 309 * May or may not be == sizeof(int). If it is, use xatoi_positive()
310 * gcc will throw warnings on printf("%d", off_t). Crap... */ 310 * and bb_strtou() instead of xatoul_range() and bb_strtoul().
311 * Even if sizeof(off_t) == sizeof(int), off_t is typedef'ed to long anyway.
312 * gcc will throw warnings on printf("%d", off_t)... Have to use %ld etc.
313 */
314# if UINT_MAX == ULONG_MAX
311typedef unsigned long uoff_t; 315typedef unsigned long uoff_t;
312# define XATOOFF(a) xatoi_positive(a) 316# define XATOOFF(a) xatoi_positive(a)
313# define BB_STRTOOFF bb_strtou 317# define BB_STRTOOFF bb_strtou