X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Fxstrtol.c;h=5d1b732708fd21ae1b85388f2e997ff72a385527;hb=daa269958ad8d50ef8154ccb65e58acaf7a6dd99;hp=00ed20cd7d5e8b2a51801e5bcf70604a66f9f377;hpb=1a44d77d50f4fb37c0410eed04b82303624ea2ec;p=debian%2Ftar diff --git a/gnu/xstrtol.c b/gnu/xstrtol.c index 00ed20cd..5d1b7327 100644 --- a/gnu/xstrtol.c +++ b/gnu/xstrtol.c @@ -2,7 +2,7 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A more useful interface to strtol. - Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2011 Free Software + Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -45,6 +45,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) { @@ -115,9 +128,9 @@ __xstrtol (const char *s, char **ptr, int strtol_base, err = LONGINT_OVERFLOW; } - /* Let valid_suffixes == NULL mean `allow any suffix'. */ + /* Let valid_suffixes == NULL mean "allow any suffix". */ /* FIXME: update all callers except the ones that allow suffixes - after the number, changing last parameter NULL to `""'. */ + after the number, changing last parameter NULL to "". */ if (!valid_suffixes) { *val = tmp; @@ -138,7 +151,7 @@ __xstrtol (const char *s, char **ptr, int strtol_base, if (strchr (valid_suffixes, '0')) { - /* The ``valid suffix'' '0' is a special flag meaning that + /* The "valid suffix" '0' is a special flag meaning that an optional second suffix is allowed, which can change the base. A suffix "B" (e.g. "100MB") stands for a power of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for