From: Daniel Stenberg Date: Sun, 16 Feb 2025 13:52:43 +0000 (+0100) Subject: build: remove checks for strtoll() X-Git-Tag: curl-8_13_0~459 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5326bfb4477f54df64e2a7d0c2627f236a7130d;p=thirdparty%2Fcurl.git build: remove checks for strtoll() Follow-up to b4538ec5229d716baa5e09b It is not being used anymore. Closes #16350 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e5a97a776..45c95f93e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1728,7 +1728,6 @@ check_symbol_exists("gethostbyname_r" "netdb.h" HAVE_GETHOSTBYNAME_R) check_symbol_exists("gethostname" "${CURL_INCLUDES}" HAVE_GETHOSTNAME) # winsock2.h unistd.h proto/bsdsocket.h check_symbol_exists("signal" "signal.h" HAVE_SIGNAL) -check_symbol_exists("strtoll" "stdlib.h" HAVE_STRTOLL) check_symbol_exists("strerror_r" "stdlib.h;string.h" HAVE_STRERROR_R) check_symbol_exists("sigaction" "signal.h" HAVE_SIGACTION) check_symbol_exists("siginterrupt" "signal.h" HAVE_SIGINTERRUPT) diff --git a/lib/config-os400.h b/lib/config-os400.h index 85dd2e31b0..48bd3cad5c 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -155,9 +155,6 @@ /* Define if you have the `strtok_r' function. */ #define HAVE_STRTOK_R -/* Define if you have the `strtoll' function. */ -#undef HAVE_STRTOLL /* Allows ASCII compile on V5R1. */ - /* Define if you have the header file. */ #define HAVE_SYS_PARAM_H diff --git a/lib/config-riscos.h b/lib/config-riscos.h index 65ca53e222..156c5abe2f 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -141,9 +141,6 @@ /* Define if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R -/* Define if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H diff --git a/lib/config-win32.h b/lib/config-win32.h index f584bed5b8..7564e677a3 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -165,11 +165,6 @@ /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 -/* Define if you have the strtoll function. */ -#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__) -#define HAVE_STRTOLL 1 -#endif - /* Define if you have the utime function. */ #define HAVE_UTIME 1 diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index cbc5ff87ee..88d8aa1207 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -550,9 +550,6 @@ /* Define to 1 if you have the strtok_r function. */ #cmakedefine HAVE_STRTOK_R 1 -/* Define to 1 if you have the strtoll function. */ -#cmakedefine HAVE_STRTOLL 1 - /* Define to 1 if you have the memrchr function. */ #cmakedefine HAVE_MEMRCHR 1 diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index f29bede422..4daac748f4 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -4314,91 +4314,6 @@ AC_DEFUN([CURL_CHECK_FUNC_STRTOK_R], [ fi ]) - -dnl CURL_CHECK_FUNC_STRTOLL -dnl ------------------------------------------------- -dnl Verify if strtoll is available, prototyped, and -dnl can be compiled. If all of these are true, and -dnl usage has not been previously disallowed with -dnl shell variable curl_disallow_strtoll, then -dnl HAVE_STRTOLL will be defined. - -AC_DEFUN([CURL_CHECK_FUNC_STRTOLL], [ - AC_REQUIRE([CURL_INCLUDES_STDLIB])dnl - # - tst_links_strtoll="unknown" - tst_proto_strtoll="unknown" - tst_compi_strtoll="unknown" - tst_allow_strtoll="unknown" - # - AC_MSG_CHECKING([if strtoll can be linked]) - AC_LINK_IFELSE([ - AC_LANG_FUNC_LINK_TRY([strtoll]) - ],[ - AC_MSG_RESULT([yes]) - tst_links_strtoll="yes" - ],[ - AC_MSG_RESULT([no]) - tst_links_strtoll="no" - ]) - # - if test "$tst_links_strtoll" = "yes"; then - AC_MSG_CHECKING([if strtoll is prototyped]) - AC_EGREP_CPP([strtoll],[ - $curl_includes_stdlib - ],[ - AC_MSG_RESULT([yes]) - tst_proto_strtoll="yes" - ],[ - AC_MSG_RESULT([no]) - tst_proto_strtoll="no" - ]) - fi - # - if test "$tst_proto_strtoll" = "yes"; then - AC_MSG_CHECKING([if strtoll is compilable]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - $curl_includes_stdlib - ]],[[ - if(0 != strtoll("", 0, 0)) - return 1; - ]]) - ],[ - AC_MSG_RESULT([yes]) - tst_compi_strtoll="yes" - ],[ - AC_MSG_RESULT([no]) - tst_compi_strtoll="no" - ]) - fi - # - if test "$tst_compi_strtoll" = "yes"; then - AC_MSG_CHECKING([if strtoll usage allowed]) - if test "x$curl_disallow_strtoll" != "xyes"; then - AC_MSG_RESULT([yes]) - tst_allow_strtoll="yes" - else - AC_MSG_RESULT([no]) - tst_allow_strtoll="no" - fi - fi - # - AC_MSG_CHECKING([if strtoll might be used]) - if test "$tst_links_strtoll" = "yes" && - test "$tst_proto_strtoll" = "yes" && - test "$tst_compi_strtoll" = "yes" && - test "$tst_allow_strtoll" = "yes"; then - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_STRTOLL, 1, - [Define to 1 if you have the strtoll function.]) - curl_cv_func_strtoll="yes" - else - AC_MSG_RESULT([no]) - curl_cv_func_strtoll="no" - fi -]) - dnl CURL_RUN_IFELSE dnl ------------------------------------------------- dnl Wrapper macro to use instead of AC_RUN_IFELSE. It