X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxstrtol.c;h=0b4a714bf55bf060d1fd6b08af2d182dd2e627e9;hb=a675d1ef978068fda0d6b129ab764a27349131fd;hp=a7386343f6b2f596c2522e0101af615ce59a35a1;hpb=7237f669760f3a8e52fd4204535914ebc493c9a9;p=gnulib.git diff --git a/lib/xstrtol.c b/lib/xstrtol.c index a7386343f..0b4a714bf 100644 --- a/lib/xstrtol.c +++ b/lib/xstrtol.c @@ -4,8 +4,6 @@ #ifdef STDC_HEADERS #include -#else -long int __strtol (const char *, char **, int base); #endif #ifdef HAVE_STRING_H @@ -17,8 +15,8 @@ long int __strtol (const char *, char **, int base); # endif #endif +#define NDEBUG #include -/* FIXME: define NDEBUG before release. */ #include #ifndef errno @@ -26,15 +24,15 @@ extern int errno; #endif #if HAVE_LIMITS_H -#include +# include #endif #ifndef ULONG_MAX -#define ULONG_MAX ((unsigned long) ~(unsigned long) 0) +# define ULONG_MAX ((unsigned long) ~(unsigned long) 0) #endif #ifndef LONG_MAX -#define LONG_MAX ((long int) (ULONG_MAX >> 1)) +# define LONG_MAX ((long int) (ULONG_MAX >> 1)) #endif #include "xstrtol.h" @@ -98,6 +96,7 @@ __xstrtol (s, ptr, base, val, valid_suffixes) ++(*p); break; + case 'B': case 'k': BKM_SCALE (tmp, 1024, LONGINT_OVERFLOW); ++(*p);