diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-11-21 14:25:15 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-11-21 14:25:15 +0100 |
commit | 5f118ff8851adb8370e8f130bb2ec2e80b55246c (patch) | |
tree | 6d8d2841a2ce317f0195fe5954dbbc8f046546bf /include/libbb.h | |
parent | 2951add2bf240e47b1d2e7bc384f138428391366 (diff) | |
parent | fc186711fe75cfc4abda9a7ff29050bc7a56313b (diff) | |
download | busybox-5f118ff8851adb8370e8f130bb2ec2e80b55246c.tar.gz |
Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h index 09e8d28e7..3f6fe47ed 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -211,7 +211,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN # if ULONG_MAX > 0xffffffff /* "long" is long enough on this system */ typedef unsigned long uoff_t; -# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX) +# define XATOOFF(a) xatoul_range((a), 0, LONG_MAX) /* usage: sz = BB_STRTOOFF(s, NULL, 10); if (errno || sz < 0) die(); */ # define BB_STRTOOFF bb_strtoul # define STRTOOFF strtoul @@ -220,7 +220,7 @@ typedef unsigned long uoff_t; # else /* "long" is too short, need "long long" */ typedef unsigned long long uoff_t; -# define XATOOFF(a) xatoull_range(a, 0, LLONG_MAX) +# define XATOOFF(a) xatoull_range((a), 0, LLONG_MAX) # define BB_STRTOOFF bb_strtoull # define STRTOOFF strtoull # define OFF_FMT "ll" @@ -237,7 +237,7 @@ typedef unsigned long uoff_t; # define OFF_FMT "l" # else typedef unsigned long uoff_t; -# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX) +# define XATOOFF(a) xatoul_range((a), 0, LONG_MAX) # define BB_STRTOOFF bb_strtoul # define STRTOOFF strtol # define OFF_FMT "l" @@ -245,6 +245,12 @@ typedef unsigned long uoff_t; #endif /* scary. better ideas? (but do *test* them first!) */ #define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1))) +/* Users report bionic to use 32-bit off_t even if LARGEFILE support is requested. + * We misdetected that. Don't let it build: + */ +struct BUG_off_t_size_is_misdetected { + char BUG_off_t_size_is_misdetected[sizeof(off_t) == sizeof(uoff_t) ? 1 : -1]; +}; /* Some useful definitions */ #undef FALSE |