]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD regtest: feature test for aio_readv
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 6 Feb 2024 14:53:36 +0000 (15:53 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 6 Feb 2024 14:53:36 +0000 (15:53 +0100)
Doesn't exist on FreeBSD 12.4 and earlier.
Also clean up configure output - was missing a few yes/nos.

configure.ac
memcheck/tests/freebsd/Makefile.am
memcheck/tests/freebsd/aiov.vgtest

index 207648f34072022fb62ccc1c267936988ff856ca..2aa11f29fdd67275cb6afc119550c37bbe42647d 100755 (executable)
@@ -5394,8 +5394,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
   return __NR_openat2
 ]])], [
   ac_have_openat2=yes
+  AC_MSG_RESULT([yes])
 ], [
   ac_have_openat2=no
+  AC_MSG_RESULT([no])
 ])
 
 AM_CONDITIONAL([HAVE_OPENAT2],
@@ -5413,14 +5415,35 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
   CRYPTO_secure_malloc_init(1<<20, 8);
 ]])], [
   ac_have_openssl=yes
+  AC_MSG_RESULT([yes])
 ], [
   ac_have_openssl=no
+  AC_MSG_RESULT([no])
 ])
 LIBS=$safe_LIBS
 
 AM_CONDITIONAL([HAVE_OPENSSL],
                [test x$ac_have_openssl = xyes])
 
+AC_MSG_CHECKING([if platform has aio_readv])
+
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+  #include <aio.h>
+  #include <stdlib.h>
+]], [[
+  aio_readv(NULL);
+]])], [
+  ac_have_aio_readv=yes
+  AC_MSG_RESULT([yes])
+
+], [
+  ac_have_aio_readv=no
+  AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL([HAVE_AIO_READV],
+               [test x$ac_have_aio_readv = xyes])
+
 # does g++ have built-in functions for atomic memory access ?
 AC_MSG_CHECKING([if g++ supports __sync_add_and_fetch])
 
index 5476203a95431dc0be943f689dd73affcaa62b09..af8d0cacac52f1e7cd13fe038d9644416e33131f 100644 (file)
@@ -138,7 +138,7 @@ EXTRA_DIST = \
        utimes.stderr.exp
 
 check_PROGRAMS = \
-       access aio aiov aio_read aligned_alloc bug464476 bug470713 \
+       access aio aio_read aligned_alloc bug464476 bug470713 \
        capsicum chflags \
        chmod_chown delete_sized_mismatch errno_aligned_allocs \
        extattr \
@@ -165,6 +165,10 @@ check_PROGRAMS = \
 AM_CFLAGS   += $(AM_FLAG_M3264_PRI)
 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
 
+if HAVE_AIO_READV
+check_PROGRAMS += aiov
+endif
+
 inlinfo_SOURCES = inlinfo.c
 inlinfo_DEPENDENCIES = inlinfo_nested.so
 inlinfo_LDFLAGS = -Wl,-rpath,$(top_builddir)/memcheck/tests/freebsd
index 5f2dabdccae051e6a77323ef703b423935c1c457..80ef274fc2282ef2bdfee666446e5dce310486b2 100644 (file)
@@ -1,3 +1,4 @@
+prereq: test -e ./aiov
 prog: aiov
 vgopts: --leak-check=no
 stderr_filter: ../filter_allocs