diff options
author | Volker Lendecke <vl@samba.org> | 2013-01-12 16:08:07 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-01-17 09:09:16 +0100 |
commit | 2b8c53d70129a7d364de00d220a547ec7bc900b2 (patch) | |
tree | be28d27f71c1f1472a295fbe7c84428a65a16f03 /lib | |
parent | 5be19aca9d07397bc49f3539aa8d358f561430b0 (diff) | |
download | samba-2b8c53d70129a7d364de00d220a547ec7bc900b2.tar.gz |
Fix bug 9548: Correctly detect O_DIRECT
(cherry picked from commit c89f3ddd5db2de099e5b871d41553637d35e4097)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/libreplace.m4 | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index e23e15bc349..67f8e3fbef6 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -267,6 +267,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 <sys/types.h>],[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 <unistd.h> @@ -279,17 +289,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 <sys/types.h>],[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(getpass.m4) m4_include(strptime.m4) |