From: Florian Krohm Date: Sat, 8 Dec 2012 19:26:03 +0000 (+0000) Subject: Make sys-openat test conditional upon the existence of AT_FDCWD. X-Git-Tag: svn/VALGRIND_3_9_0~501 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c76e43290caabb31fd6b9fc6437a599108c8ee0;p=thirdparty%2Fvalgrind.git Make sys-openat test conditional upon the existence of AT_FDCWD. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13171 --- diff --git a/configure.in b/configure.in index 31e08150e3..0adec58511 100644 --- a/configure.in +++ b/configure.in @@ -997,6 +997,27 @@ AM_CONDITIONAL(VGCONF_PLATVARIANT_IS_ANDROID, # Checking for various library functions and other definitions #---------------------------------------------------------------------------- +# Check for AT_FDCWD + +AC_MSG_CHECKING([for AT_FDCWD]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#define _GNU_SOURCE +#include +#include +]], [[ + int a = AT_FDCWD; +]])], [ +ac_have_at_fdcwd=yes +AC_MSG_RESULT([yes]) +], [ +ac_have_at_fdcwd=no +ac_gcc_have_dfp_type=no +AC_MSG_RESULT([no]) +]) + +AM_CONDITIONAL([HAVE_AT_FDCWD], [test x$ac_have_at_fdcwd = xyes]) + + # Check for CLOCK_MONOTONIC AC_MSG_CHECKING([for CLOCK_MONOTONIC]) diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index 4cccf56d83..4cc911358b 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -31,10 +31,12 @@ check_PROGRAMS = \ stack_switch \ syscalls-2007 \ syslog-syscall \ - sys-openat \ timerfd-syscall \ proc-auxv +if HAVE_AT_FDCWD +check_PROGRAMS += sys-openat +endif AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/memcheck/tests/linux/sys-openat.vgtest b/memcheck/tests/linux/sys-openat.vgtest index c33b9db4b7..03c8fda5cb 100644 --- a/memcheck/tests/linux/sys-openat.vgtest +++ b/memcheck/tests/linux/sys-openat.vgtest @@ -1 +1,2 @@ +prereq: test -e ./sys-openat prog: sys-openat