From e0bfb59803184c44cfc354b99ba3d8d7bbfc72b9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 12 Jan 2013 16:08:07 +0100 Subject: Fix bug 9548: Correctly detect O_DIRECT Reviewed by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Jan 14 21:16:23 CET 2013 on sn-devel-104 --- lib/replace/libreplace.m4 | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'lib/replace/libreplace.m4') diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index ac2af27f31..5a4184493e 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -357,6 +357,16 @@ if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then fi +dnl Check if the C compiler understands volatile (it should, being ANSI). +AC_CACHE_CHECK([that the C compiler understands volatile],libreplace_cv_volatile, [ + AC_TRY_COMPILE([#include ],[volatile int i = 0], + libreplace_cv_volatile=yes,libreplace_cv_volatile=no)]) +if test x"$libreplace_cv_volatile" = x"yes"; then + AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile]) +fi + +m4_include(system/config.m4) + AC_CACHE_CHECK([for O_DIRECT flag to open(2)],libreplace_cv_HAVE_OPEN_O_DIRECT,[ AC_TRY_COMPILE([ #include @@ -369,17 +379,6 @@ if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT]) fi - -dnl Check if the C compiler understands volatile (it should, being ANSI). -AC_CACHE_CHECK([that the C compiler understands volatile],libreplace_cv_volatile, [ - AC_TRY_COMPILE([#include ],[volatile int i = 0], - libreplace_cv_volatile=yes,libreplace_cv_volatile=no)]) -if test x"$libreplace_cv_volatile" = x"yes"; then - AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile]) -fi - -m4_include(system/config.m4) - m4_include(dlfcn.m4) m4_include(strptime.m4) m4_include(win32.m4) -- cgit