diff options
author | Denis Vlasenko | 2006-12-16 23:48:13 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-12-16 23:48:13 +0000 |
commit | a597aaddfa76d589d3e1a37b1f1c3401c2decffd (patch) | |
tree | 1db4966ffc99ad3c495bd18d6f7040e1515e79d7 /include/xatonum.h | |
parent | 3469c185e50e7bb672ce33ab5e50da753f0f0e20 (diff) | |
download | busybox-a597aaddfa76d589d3e1a37b1f1c3401c2decffd.zip busybox-a597aaddfa76d589d3e1a37b1f1c3401c2decffd.tar.gz |
s/extern inline/static ATTRIBUTE_ALWAYS_INLINE/g
xstrtou: disallow leading '+'
Diffstat (limited to 'include/xatonum.h')
-rw-r--r-- | include/xatonum.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/include/xatonum.h b/include/xatonum.h index 585d846..cf088a4 100644 --- a/include/xatonum.h +++ b/include/xatonum.h @@ -29,50 +29,50 @@ type xato##T(const char *str); \ DECLARE_STR_CONV(long long, ll, ull) -/* Provides extern inline definitions of functions */ +/* Provides inline definitions of functions */ /* (useful for mapping them to the type of the same width) */ #define DEFINE_EQUIV_STR_CONV(narrow, N, W, UN, UW) \ \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xstrto##UN##_range_sfx(const char *str, int b, unsigned narrow l, unsigned narrow u, const struct suffix_mult *sfx) \ { return xstrto##UW##_range_sfx(str, b, l, u, sfx); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xstrto##UN##_range(const char *str, int b, unsigned narrow l, unsigned narrow u) \ { return xstrto##UW##_range(str, b, l, u); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xstrto##UN##_sfx(const char *str, int b, const struct suffix_mult *sfx) \ { return xstrto##UW##_sfx(str, b, sfx); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xstrto##UN(const char *str, int b) \ { return xstrto##UW(str, b); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xato##UN##_range_sfx(const char *str, unsigned narrow l, unsigned narrow u, const struct suffix_mult *sfx) \ { return xato##UW##_range_sfx(str, l, u, sfx); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xato##UN##_range(const char *str, unsigned narrow l, unsigned narrow u) \ { return xato##UW##_range(str, l, u); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xato##UN##_sfx(const char *str, const struct suffix_mult *sfx) \ { return xato##UW##_sfx(str, sfx); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ unsigned narrow xato##UN(const char *str) \ { return xato##UW(str); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ narrow xstrto##N##_range_sfx(const char *str, int b, narrow l, narrow u, const struct suffix_mult *sfx) \ { return xstrto##W##_range_sfx(str, b, l, u, sfx); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ narrow xstrto##N##_range(const char *str, int b, narrow l, narrow u) \ { return xstrto##W##_range(str, b, l, u); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ narrow xato##N##_range_sfx(const char *str, narrow l, narrow u, const struct suffix_mult *sfx) \ { return xato##W##_range_sfx(str, l, u, sfx); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ narrow xato##N##_range(const char *str, narrow l, narrow u) \ { return xato##W##_range(str, l, u); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ narrow xato##N##_sfx(const char *str, const struct suffix_mult *sfx) \ { return xato##W##_sfx(str, sfx); } \ -extern inline \ +static ATTRIBUTE_ALWAYS_INLINE \ narrow xato##N(const char *str) \ { return xato##W(str); } \ @@ -96,7 +96,7 @@ DECLARE_STR_CONV(int, i, u) /* Specialized */ int BUG_xatou32_unimplemented(void); -extern inline uint32_t xatou32(const char *numstr) +static ATTRIBUTE_ALWAYS_INLINE uint32_t xatou32(const char *numstr) { if (UINT_MAX == 0xffffffff) return xatou(numstr); @@ -111,11 +111,11 @@ unsigned long long bb_strtoull(const char *arg, char **endp, int base); long long bb_strtoll(const char *arg, char **endp, int base); #if ULONG_MAX == ULLONG_MAX -extern inline +static ATTRIBUTE_ALWAYS_INLINE unsigned long bb_strtoul(const char *arg, char **endp, int base) { return bb_strtoull(arg, endp, base); } -extern inline -unsigned long bb_strtol(const char *arg, char **endp, int base) +static ATTRIBUTE_ALWAYS_INLINE +long bb_strtol(const char *arg, char **endp, int base) { return bb_strtoll(arg, endp, base); } #else unsigned long bb_strtoul(const char *arg, char **endp, int base); @@ -123,26 +123,26 @@ long bb_strtol(const char *arg, char **endp, int base); #endif #if UINT_MAX == ULLONG_MAX -extern inline -unsigned long bb_strtou(const char *arg, char **endp, int base) +static ATTRIBUTE_ALWAYS_INLINE +unsigned bb_strtou(const char *arg, char **endp, int base) { return bb_strtoull(arg, endp, base); } -extern inline -unsigned long bb_strtoi(const char *arg, char **endp, int base) +static ATTRIBUTE_ALWAYS_INLINE +int bb_strtoi(const char *arg, char **endp, int base) { return bb_strtoll(arg, endp, base); } #elif UINT_MAX == ULONG_MAX -extern inline -unsigned long bb_strtou(const char *arg, char **endp, int base) +static ATTRIBUTE_ALWAYS_INLINE +unsigned bb_strtou(const char *arg, char **endp, int base) { return bb_strtoul(arg, endp, base); } -extern inline -unsigned long bb_strtoi(const char *arg, char **endp, int base) +static ATTRIBUTE_ALWAYS_INLINE +int bb_strtoi(const char *arg, char **endp, int base) { return bb_strtol(arg, endp, base); } #else -unsigned long bb_strtou(const char *arg, char **endp, int base); -long bb_strtoi(const char *arg, char **endp, int base); +unsigned bb_strtou(const char *arg, char **endp, int base); +int bb_strtoi(const char *arg, char **endp, int base); #endif int BUG_bb_strtou32_unimplemented(void); -extern inline +static ATTRIBUTE_ALWAYS_INLINE uint32_t bb_strtou32(const char *arg, char **endp, int base) { if (sizeof(uint32_t) == sizeof(unsigned)) |