summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-07-05 21:13:46 +0000
committerKarl Berry <karl@freefriends.org>2020-07-05 21:13:46 +0000
commitc3d1943bae0cd1c12babe012d58305dfb8428a46 (patch)
treeb49370a8445c960d9a5db69402d660b4a07fa9f3
parent52b71425066d8e4015ed93679940bedbf7d69e3a (diff)
more #include for snprintf test programs
git-svn-id: svn://tug.org/texlive/trunk@55760 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/kpathsea/ChangeLog5
-rwxr-xr-xBuild/source/texk/kpathsea/configure8
-rw-r--r--Build/source/texk/kpathsea/configure.ac8
3 files changed, 17 insertions, 4 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index e1914c68bf4..e9db1fae051 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+2020-07-05 Karl Berry <karl@freefriends.org>
+
+ * configure.ac (snprintf): two more test programs
+ also need <stdarg.h> and <stdio.h>.
+
2020-07-04 Karl Berry <karl@freefriends.org>
* configure.ac (snprintf): #include <stdio.h> to placate
diff --git a/Build/source/texk/kpathsea/configure b/Build/source/texk/kpathsea/configure
index 243fdad6aa7..7bfe3b4787c 100755
--- a/Build/source/texk/kpathsea/configure
+++ b/Build/source/texk/kpathsea/configure
@@ -14075,7 +14075,9 @@ if test "$cross_compiling" = yes; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-char buf[4] = "abc";
+#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";
int
main ()
{
@@ -14104,7 +14106,9 @@ else
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-char buf[4] = "abc";
+#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";
int
main ()
{
diff --git a/Build/source/texk/kpathsea/configure.ac b/Build/source/texk/kpathsea/configure.ac
index a543c3c776e..14c204cf6f1 100644
--- a/Build/source/texk/kpathsea/configure.ac
+++ b/Build/source/texk/kpathsea/configure.ac
@@ -90,7 +90,9 @@ AC_CACHE_CHECK([for $snfunc and $vsnfunc],
if test "x$kpse_cv_have_snfuncs" != xyes; then
AC_MSG_ERROR([Sorry, you need $snfunc and $vsnfunc.])
fi
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[char buf[4] = "abc";]],
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";]],
[[if ($snfunc (buf, 1, "%s", "x") == 0 || buf[1] != 'b')
return 1;]])],
[],
@@ -98,7 +100,9 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[char buf[4] = "abc";]],
[:])
AC_CACHE_CHECK([if we need (v)snprintf wrapper functions],
[kpse_cv_wrap_snprintf],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[char buf[4] = "abc";]],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";]],
[[$snfunc (buf, 3, "xyz");
if (buf[2] != 0) return 1;
$snfunc (buf, 2, "xyz");