From 0745c11a0b06a4240f4c0f45a327c5f92a738529 Mon Sep 17 00:00:00 2001 From: Emil Rosenquist <37864286+EmilRosenquist@users.noreply.github.com> Date: Thu, 1 Sep 2022 09:26:03 +0200 Subject: [PATCH] Add HAVE_VASPRINTF (GH PR #25) --- .../libbuild2/autoconf/checks/HAVE_VASPRINTF.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_VASPRINTF.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_VASPRINTF.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_VASPRINTF.h new file mode 100644 index 0000000..1a7b681 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_VASPRINTF.h @@ -0,0 +1,17 @@ +// HAVE_VASPRINTF : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_VASPRINTF + +/* Since glibc 2.1, FreeBSD 2.2, OpenBSD 2.9, NetBSD 1.4 and MacOS + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(2, 2) || \ + BUILD2_AUTOCONF_OPENBSD_PREREQ(200106) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(1, 4) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_VASPRINTF 1 +#endif