]> git.ipfire.org Git - thirdparty/make.git/commitdiff
bootstrap: Remove strtoll()
authorPaul Smith <psmith@gnu.org>
Sun, 26 Jun 2022 20:33:30 +0000 (16:33 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 9 Jul 2022 14:46:47 +0000 (10:46 -0400)
This pulls in entirely too much stuff we don't need.  Instead grab
just the gnulib source file, then include it in src/misc.c.

* bootstrap.conf: Add just the lib/strtol.c source file.
* configure.ac: Check for strtoll.
* src/misc.c: Include strtol.c, with QUAD set, if needed.

bootstrap.conf
configure.ac
src/misc.c

index f55ad6a63761013722951af4d9d474ab86164c39..2543748b003cfacf271429b515b27fb97cb35971 100644 (file)
@@ -46,6 +46,11 @@ automake   1.16.1
 gnulib_name=libgnu
 gnulib_files=doc/make-stds.texi
 
+# Using the full strtoll module pulls in a lot of stuff.  But, it's pretty
+# simple to use just the base source file, so pull that.  We'll use it in
+# src/misc.c if strtoll() is not found.
+gnulib_files="$gnulib_files lib/strtol.c"
+
 gnulib_modules="\
 alloca
 fdl
@@ -53,5 +58,4 @@ findprog-in
 getloadavg
 host-cpu-c-abi
 strerror
-strtoll
 make-glob"
index da6d6a5f76f554d1fa7665f4f61ca4dab4484a82..bb2eb331e3c2d5876d9892e23790501d8b1e0ec4 100644 (file)
@@ -133,8 +133,8 @@ AS_IF([test "$ac_cv_func_gettimeofday" = yes],
             [Define to 1 if you have a standard gettimeofday function])
 ])
 
-AC_CHECK_FUNCS([strdup strndup memrchr mempcpy umask mkstemp mktemp fdopen \
-                dup dup2 getcwd realpath sigsetmask sigaction \
+AC_CHECK_FUNCS([strtoll strdup strndup memrchr mempcpy umask mkstemp mktemp \
+                fdopen dup dup2 getcwd realpath sigsetmask sigaction \
                 getgroups seteuid setegid setlinebuf setreuid setregid \
                 getrlimit setrlimit setvbuf pipe strsignal \
                 lstat readlink atexit isatty ttyname pselect posix_spawn \
index 624cd0582777eac0482ece2fc0bcf63daa7147c3..ae9fae68c759d2f9be0adf29e1bb0a483e27d142 100644 (file)
@@ -883,3 +883,11 @@ mempcpy (void *dest, const void *src, size_t n)
   return (char *) memcpy (dest, src, n) + n;
 }
 #endif
+
+#if !HAVE_STRTOLL
+# undef UNSIGNED
+# undef USE_NUMBER_GROUPING
+# undef USE_WIDE_CHAR
+# define QUAD 1
+# include <strtol.c>
+#endif