diff options
Diffstat (limited to 'include/xatonum.h')
-rw-r--r-- | include/xatonum.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/xatonum.h b/include/xatonum.h index cdb5e7393..46e49b0eb 100644 --- a/include/xatonum.h +++ b/include/xatonum.h | |||
@@ -92,3 +92,15 @@ DEFINE_EQUIV_STR_CONV(int, i, l, u, ul) | |||
92 | #else | 92 | #else |
93 | DECLARE_STR_CONV(int, i, u) | 93 | DECLARE_STR_CONV(int, i, u) |
94 | #endif | 94 | #endif |
95 | |||
96 | /* Specialized */ | ||
97 | |||
98 | int BUG_xatou32_unimplemented(void); | ||
99 | extern inline uint32_t xatou32(const char *numstr) | ||
100 | { | ||
101 | if (UINT_MAX == 0xffffffff) | ||
102 | return xatou(numstr); | ||
103 | if (ULONG_MAX == 0xffffffff) | ||
104 | return xatoul(numstr); | ||
105 | return BUG_xatou32_unimplemented(); | ||
106 | } | ||