projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
[gnulib.git]
/
lib
/
xstrtol.c
diff --git
a/lib/xstrtol.c
b/lib/xstrtol.c
index
760b2a5
..
7bc7335
100644
(file)
--- a/
lib/xstrtol.c
+++ b/
lib/xstrtol.c
@@
-1,5
+1,5
@@
/* A more useful interface to strtol.
/* A more useful interface to strtol.
- Copyright
1995, 1996, 1998, 1999
Free Software Foundation, Inc.
+ Copyright
(C) 1995, 1996, 1998-2000
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-86,6
+86,10
@@
long int strtol ();
unsigned long int strtoul ();
#endif
unsigned long int strtoul ();
#endif
+#ifndef strtoumax
+uintmax_t strtoumax ();
+#endif
+
static int
bkm_scale (__strtol_t *x, int scale_factor)
{
static int
bkm_scale (__strtol_t *x, int scale_factor)
{
@@
-195,6
+199,7
@@
__xstrtol (const char *s, char **ptr, int strtol_base,
break;
case 'G': /* Giga */
break;
case 'G': /* Giga */
+ case 'g': /* 'g' is undocumented; for compatibility only */
overflow = bkm_scale_by_power (&tmp, base, 3);
break;
overflow = bkm_scale_by_power (&tmp, base, 3);
break;
@@
-203,7
+208,7
@@
__xstrtol (const char *s, char **ptr, int strtol_base,
break;
case 'M': /* Mega */
break;
case 'M': /* Mega */
- case 'm': /* 'm' is undocumented; for
backward
compatibility only */
+ case 'm': /* 'm' is undocumented; for compatibility only */
overflow = bkm_scale_by_power (&tmp, base, 2);
break;
overflow = bkm_scale_by_power (&tmp, base, 2);
break;
@@
-212,6
+217,7
@@
__xstrtol (const char *s, char **ptr, int strtol_base,
break;
case 'T': /* Tera */
break;
case 'T': /* Tera */
+ case 't': /* 't' is undocumented; for compatibility only */
overflow = bkm_scale_by_power (&tmp, base, 4);
break;
overflow = bkm_scale_by_power (&tmp, base, 4);
break;