summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael McTernan2011-12-16 17:05:52 +0100
committerDenys Vlasenko2011-12-16 17:05:52 +0100
commit7b57ff4436f3e672076e6f5440954a958ba04ab3 (patch)
tree4365b7e4f18c1dfc4b12e9533da51549e84d37c1 /include
parentbe2a557918af86cc55b3426f97664503fe7e265f (diff)
downloadbusybox-7b57ff4436f3e672076e6f5440954a958ba04ab3.zip
busybox-7b57ff4436f3e672076e6f5440954a958ba04ab3.tar.gz
udhcp: finish support of classless static routes
function old new delta udhcp_str2optset 415 532 +117 Signed-off-by: Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/xatonum.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/xatonum.h b/include/xatonum.h
index 6f76a3c..45ebbfc 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 */