Skip to content
Snippets Groups Projects
Commit 3619a53a authored by Guillem Jover's avatar Guillem Jover
Browse files

build: Switch DPKG_FUNC_C99_SNPRINTF from AC_LANG_SOURCE to AC_LANG_PROGRAM

This reduces boirlerplate code.
parent 7a77148d
No related branches found
No related tags found
1 merge request!4Update crimson to version from bookworm
......@@ -31,7 +31,7 @@ va_copy(v1, v2);
AC_DEFUN([DPKG_FUNC_C99_SNPRINTF], [
AC_CACHE_CHECK([for C99 snprintf functions], [dpkg_cv_c99_snprintf], [
AC_RUN_IFELSE([
AC_LANG_SOURCE([[
AC_LANG_PROGRAM([[
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
......@@ -46,8 +46,7 @@ int test_vsnprintf(const char *fmt, ...)
return n;
}
int main()
{
]], [[
int n;
n = snprintf(NULL, 0, "format %s %d", "string", 10);
......@@ -57,9 +56,6 @@ int main()
n = test_vsnprintf("format %s %d", "string", 10);
if (n != strlen("format string 10"))
return 1;
return 0;
}
]])
], [
dpkg_cv_c99_snprintf=yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment