diff options
author | Yury Gribov <y.gribov@samsung.com> | 2014-10-28 09:43:20 +0000 |
---|---|---|
committer | Yury Gribov <ygribov@gcc.gnu.org> | 2014-10-28 09:43:20 +0000 |
commit | ea41822adfb3ea39ba43e033acd1f745abd79083 (patch) | |
tree | dedbff4ce1f502ec222e9433c1109ec7759babf3 /include/libiberty.h | |
parent | 5b595d80ce5f3f74415e91532542a58c1be6a9c4 (diff) | |
download | gcc-ea41822adfb3ea39ba43e033acd1f745abd79083.zip gcc-ea41822adfb3ea39ba43e033acd1f745abd79083.tar.gz gcc-ea41822adfb3ea39ba43e033acd1f745abd79083.tar.bz2 |
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.
From-SVN: r216772
Diffstat (limited to 'include/libiberty.h')
-rw-r--r-- | include/libiberty.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h index d09c9a5..571e85f 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -655,6 +655,33 @@ extern size_t strnlen (const char *, size_t); extern int strverscmp (const char *, const char *); #endif +#if defined(HAVE_DECL_STRTOL) && !HAVE_DECL_STRTOL +extern long int strtol (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_DECL_STRTOUL) && !HAVE_DECL_STRTOUL +extern unsigned long int strtoul (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOLL) && !HAVE_DECL_STRTOLL +__extension__ +extern long long int strtoll (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOULL) && !HAVE_DECL_STRTOULL +__extension__ +extern unsigned long long int strtoull (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP +/* Compare version strings. */ +extern int strverscmp (const char *, const char *); +#endif + /* Set the title of a process */ extern void setproctitle (const char *name, ...); |