From 116767901f9fc22f837f2830dbd42ad57d70fcb1 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 28 Nov 2021 09:50:10 -0500 Subject: Convert word, wordlist, and intcmp functions to use long long Modify make functions that parse integer values to use long long values instead of long: on Windows long is the same as int (4 bytes) and we don't want behavior to differ between different platforms. * bootstrap.conf: Change strtol module to strtoll module. * src/function.c (parse_numeric): Use strtoll() and return long long. (func_word): Use long long. (func_wordlist): Use long long. Verify second argument is >= 0. (func_intcmp): Use long long. * src/config.ami.template: Don't define HAVE_STRTOLL. * src/config-vms.template: Define HAVE_STRTOLL. * src/config.W32.template: Define HAVE_STRTOLL. * tests/run_make_tests.pl: Set $ERR_out_of_range to the proper string. * tests/scripts/functions/word: Rework to use the new style and avoid TAB characters. Verify trailing whitespace is ignored. Add a test for a negative second argument to wordlist. Add tests for max signed integer values. Use $ERR_out_of_range for the error string. * tests/scripts/functions/intcmp: Add tests for min and max signed integer values. Use $ERR_out_of_range for the error string. --- bootstrap.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap.conf') diff --git a/bootstrap.conf b/bootstrap.conf index 69058aa0..13ded359 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -51,5 +51,5 @@ getloadavg host-cpu-c-abi mempcpy strerror -strtol +strtoll make-glob" -- cgit v1.2.1