summaryrefslogtreecommitdiff
path: root/libiberty/configure.ac
diff options
context:
space:
mode:
authorYury Gribov <y.gribov@samsung.com>2014-10-28 09:43:20 +0000
committerYury Gribov <ygribov@gcc.gnu.org>2014-10-28 09:43:20 +0000
commitea41822adfb3ea39ba43e033acd1f745abd79083 (patch)
treededbff4ce1f502ec222e9433c1109ec7759babf3 /libiberty/configure.ac
parent5b595d80ce5f3f74415e91532542a58c1be6a9c4 (diff)
downloadgcc-ea41822adfb3ea39ba43e033acd1f745abd79083.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. From-SVN: r216772
Diffstat (limited to 'libiberty/configure.ac')
-rw-r--r--libiberty/configure.ac14
1 files changed, 11 insertions, 3 deletions
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 3380819ab3a..90adaea1ad2 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -272,8 +272,14 @@ AC_HEADER_TIME
libiberty_AC_DECLARE_ERRNO
-# Determine the size of an int for struct fibnode.
+# Determine sizes of some types.
AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
+
+# Check for presense of long long
+AC_CHECK_TYPE([long long],
+ [AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have the `long long' type.]) AC_CHECK_SIZEOF([long long])],
+ [])
# Look for a 64-bit type.
AC_MSG_CHECKING([for a 64-bit type])
@@ -365,6 +371,8 @@ funcs="$funcs strstr"
funcs="$funcs strtod"
funcs="$funcs strtol"
funcs="$funcs strtoul"
+funcs="$funcs strtoll"
+funcs="$funcs strtoull"
funcs="$funcs strverscmp"
funcs="$funcs tmpnam"
funcs="$funcs vasprintf"
@@ -401,11 +409,11 @@ if test "x" = "y"; then
sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
stpcpy stpncpy strcasecmp strchr strdup \
strerror strncasecmp strndup strnlen strrchr strsignal strstr strtod \
- strtol strtoul strverscmp sysconf sysctl sysmp \
+ strtol strtoul strtoll strtoull strverscmp sysconf sysctl sysmp \
table times tmpnam \
vasprintf vfprintf vprintf vsprintf \
wait3 wait4 waitpid)
- AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf])
+ AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf, strtol, strtoul, strtoll, strtoull])
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])