summaryrefslogtreecommitdiff
path: root/lib/xstrtol.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-12-19 08:35:20 +0000
committerJim Meyering <jim@meyering.net>2000-12-19 08:35:20 +0000
commit166c00189adeff24fde9fbf273a40efa8926ce72 (patch)
tree0564ffb245934eff06ebeb7a6cc0f91dd1bbf8ad /lib/xstrtol.c
parentbca787f7c476396a0a067e0f418d840b2a582945 (diff)
downloadcoreutils-166c00189adeff24fde9fbf273a40efa8926ce72.tar.xz
(__xstrtol): Add undocumented suffixes 'g' and
't' for compatibility with Solaris 8 sort.
Diffstat (limited to 'lib/xstrtol.c')
-rw-r--r--lib/xstrtol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/xstrtol.c b/lib/xstrtol.c
index 07023d9ff..7bc733545 100644
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -199,6 +199,7 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
break;
case 'G': /* Giga */
+ case 'g': /* 'g' is undocumented; for compatibility only */
overflow = bkm_scale_by_power (&tmp, base, 3);
break;
@@ -207,7 +208,7 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
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;
@@ -216,6 +217,7 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
break;
case 'T': /* Tera */
+ case 't': /* 't' is undocumented; for compatibility only */
overflow = bkm_scale_by_power (&tmp, base, 4);
break;