aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-11-16 21:30:19 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-11-16 21:30:19 +0100
commitf59a50ee3031c520fdb4183b98fd7b13b94be4f7 (patch)
tree3ac4538e793fa4079466a2fcdefb559f8bb38351
parenta092a89d8f052072e562861f2968573d89e10dd5 (diff)
downloadbusybox-w32-f59a50ee3031c520fdb4183b98fd7b13b94be4f7.tar.gz
busybox-w32-f59a50ee3031c520fdb4183b98fd7b13b94be4f7.tar.bz2
busybox-w32-f59a50ee3031c520fdb4183b98fd7b13b94be4f7.zip
libbb.h: tighten up macro code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/libbb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 09e8d28e7..796351865 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -211,7 +211,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
211# if ULONG_MAX > 0xffffffff 211# if ULONG_MAX > 0xffffffff
212/* "long" is long enough on this system */ 212/* "long" is long enough on this system */
213typedef unsigned long uoff_t; 213typedef unsigned long uoff_t;
214# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX) 214# define XATOOFF(a) xatoul_range((a), 0, LONG_MAX)
215/* usage: sz = BB_STRTOOFF(s, NULL, 10); if (errno || sz < 0) die(); */ 215/* usage: sz = BB_STRTOOFF(s, NULL, 10); if (errno || sz < 0) die(); */
216# define BB_STRTOOFF bb_strtoul 216# define BB_STRTOOFF bb_strtoul
217# define STRTOOFF strtoul 217# define STRTOOFF strtoul
@@ -220,7 +220,7 @@ typedef unsigned long uoff_t;
220# else 220# else
221/* "long" is too short, need "long long" */ 221/* "long" is too short, need "long long" */
222typedef unsigned long long uoff_t; 222typedef unsigned long long uoff_t;
223# define XATOOFF(a) xatoull_range(a, 0, LLONG_MAX) 223# define XATOOFF(a) xatoull_range((a), 0, LLONG_MAX)
224# define BB_STRTOOFF bb_strtoull 224# define BB_STRTOOFF bb_strtoull
225# define STRTOOFF strtoull 225# define STRTOOFF strtoull
226# define OFF_FMT "ll" 226# define OFF_FMT "ll"
@@ -237,7 +237,7 @@ typedef unsigned long uoff_t;
237# define OFF_FMT "l" 237# define OFF_FMT "l"
238# else 238# else
239typedef unsigned long uoff_t; 239typedef unsigned long uoff_t;
240# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX) 240# define XATOOFF(a) xatoul_range((a), 0, LONG_MAX)
241# define BB_STRTOOFF bb_strtoul 241# define BB_STRTOOFF bb_strtoul
242# define STRTOOFF strtol 242# define STRTOOFF strtol
243# define OFF_FMT "l" 243# define OFF_FMT "l"