diff options
author | ygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-28 09:43:20 +0000 |
---|---|---|
committer | ygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-28 09:43:20 +0000 |
commit | 5e1a5abaa5856a1f6cfe651b7f4a2abd3b32dff1 (patch) | |
tree | dedbff4ce1f502ec222e9433c1109ec7759babf3 /libiberty/functions.texi | |
parent | 8f3f44619be74061572cb2e1eb47648239b983e0 (diff) | |
download | gcc-5e1a5abaa5856a1f6cfe651b7f4a2abd3b32dff1.tar.gz |
Add strtoll and strtoull to libiberty.
2014-10-28 Yury Gribov <y.gribov@samsung.com>
include/
* libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes.
libiberty/
* strtoll.c: New file.
* strtoull.c: New file.
* configure.ac: Add long long checks. Add harness for strtoll and
strtoull. Check decls for strtol, strtoul, strtoll, strtoull.
* Makefile.in (CFILES, CONFIGURED_OFILES): Add strtoll and strtoull.
* config.in: Regenerate.
* configure: Regenerate.
* functions.texi: Regenerate.
* testsuite/Makefile.in (check-strtol): New rule.
(test-strtol): Likewise.
(mostlyclean): Clean up strtol test.
* testsuite/test-strtol.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/functions.texi')
-rw-r--r-- | libiberty/functions.texi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libiberty/functions.texi b/libiberty/functions.texi index 387aee0bb9c..3627285f905 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -1714,6 +1714,24 @@ that the converted value is unsigned. @end deftypefn +@c strtoll.c:33 +@deftypefn Supplemental {long long int} strtoll (const char *@var{string}, @ + char **@var{endptr}, int @var{base}) +@deftypefnx Supplemental {unsigned long long int} strtoul (@ + const char *@var{string}, char **@var{endptr}, int @var{base}) + +The @code{strtoll} function converts the string in @var{string} to a +long long integer value according to the given @var{base}, which must be +between 2 and 36 inclusive, or be the special value 0. If @var{base} +is 0, @code{strtoll} will look for the prefixes @code{0} and @code{0x} +to indicate bases 8 and 16, respectively, else default to base 10. +When the base is 16 (either explicitly or implicitly), a prefix of +@code{0x} is allowed. The handling of @var{endptr} is as that of +@code{strtod} above. The @code{strtoull} function is the same, except +that the converted value is unsigned. + +@end deftypefn + @c strsignal.c:502 @deftypefn Extension int strtosigno (const char *@var{name}) |