X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxstrtol.c;h=591493e50c78cc4b6bd07b48754df86f88e5012f;hb=9b8ea95435bc2ccb0882039535ccd5fac84dc935;hp=a7386343f6b2f596c2522e0101af615ce59a35a1;hpb=7237f669760f3a8e52fd4204535914ebc493c9a9;p=gnulib.git diff --git a/lib/xstrtol.c b/lib/xstrtol.c index a7386343f..591493e50 100644 --- a/lib/xstrtol.c +++ b/lib/xstrtol.c @@ -2,10 +2,12 @@ #include #endif +#include "xstrtol.h" /* Get definition for __P before use. */ + #ifdef STDC_HEADERS #include #else -long int __strtol (const char *, char **, int base); +__unsigned long int __strtol __P ((const char *, char **, int base)); #endif #ifdef HAVE_STRING_H @@ -17,8 +19,8 @@ long int __strtol (const char *, char **, int base); # endif #endif +#define NDEBUG #include -/* FIXME: define NDEBUG before release. */ #include #ifndef errno @@ -37,8 +39,6 @@ extern int errno; #define LONG_MAX ((long int) (ULONG_MAX >> 1)) #endif -#include "xstrtol.h" - #define BKM_SCALE(x, scale_factor, error_return) \ do \ { \ @@ -98,6 +98,7 @@ __xstrtol (s, ptr, base, val, valid_suffixes) ++(*p); break; + case 'B': case 'k': BKM_SCALE (tmp, 1024, LONGINT_OVERFLOW); ++(*p);