X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fxstrtol.c;h=b1fdd4938d55f16b2bfcda28d8eab177d4373b49;hb=f16415c07025fdec551dfc1dc7275c2a88819d44;hp=43f5ada7192a812e3ab58917279fc9c72f54ba15;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/lib/xstrtol.c b/lib/xstrtol.c index 43f5ada71..b1fdd4938 100644 --- a/lib/xstrtol.c +++ b/lib/xstrtol.c @@ -1,6 +1,6 @@ /* A more useful interface to strtol. - Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2010 Free Software + Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -43,6 +43,19 @@ #include "intprops.h" +/* xstrtoll.c and xstrtoull.c, which include this file, require that + ULLONG_MAX, LLONG_MAX, LLONG_MIN are defined, but does not + define them on all platforms. */ +#ifndef ULLONG_MAX +# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long) +#endif +#ifndef LLONG_MAX +# define LLONG_MAX TYPE_MAXIMUM (long long int) +#endif +#ifndef LLONG_MIN +# define LLONG_MIN TYPE_MINIMUM (long long int) +#endif + static strtol_error bkm_scale (__strtol_t *x, int scale_factor) {