From 7b57ff4436f3e672076e6f5440954a958ba04ab3 Mon Sep 17 00:00:00 2001 From: Michael McTernan Date: Fri, 16 Dec 2011 17:05:52 +0100 Subject: udhcp: finish support of classless static routes function old new delta udhcp_str2optset 415 532 +117 Signed-off-by: Michael McTernan Signed-off-by: Denys Vlasenko --- include/xatonum.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/xatonum.h') diff --git a/include/xatonum.h b/include/xatonum.h index 6f76a3c96..45ebbfc00 100644 --- a/include/xatonum.h +++ b/include/xatonum.h @@ -168,6 +168,15 @@ uint32_t bb_strtou32(const char *arg, char **endp, int base) return bb_strtoul(arg, endp, base); return BUG_bb_strtou32_unimplemented(); } +static ALWAYS_INLINE +int32_t bb_strtoi32(const char *arg, char **endp, int base) +{ + if (sizeof(int32_t) == sizeof(int)) + return bb_strtoi(arg, endp, base); + if (sizeof(int32_t) == sizeof(long)) + return bb_strtol(arg, endp, base); + return BUG_bb_strtou32_unimplemented(); +} /* Floating point */ -- cgit v1.2.3