From d82ed849cc3d0e9b3f97653664068faa9433c1df Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 10 Sep 2006 12:45:37 +0000 Subject: r18337: more -Ae tests in check_cc.m4 honor the MMAP_BLACKLIST (This used to be commit c2f2dbb5d1c082ee1391908073336a9dfc10f712) --- source4/build/m4/check_cc.m4 | 4 ---- source4/build/tests/shared_mmap.c | 2 ++ source4/lib/replace/replace.h | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'source4') diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4 index 4f714402cf..311caa342e 100644 --- a/source4/build/m4/check_cc.m4 +++ b/source4/build/m4/check_cc.m4 @@ -168,12 +168,8 @@ fi case "$host_os" in # Try to work out if this is the native HPUX compiler that uses the -Ae flag. *hpux*) - AC_PROG_CC_FLAG(Ae) # mmap on HPUX is completely broken... AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) - if test $ac_cv_prog_cc_Ae = yes; then - CPPFLAGS="$CPPFLAGS -Ae" - fi ;; *aix*) diff --git a/source4/build/tests/shared_mmap.c b/source4/build/tests/shared_mmap.c index 50dad8d696..40d462302e 100644 --- a/source4/build/tests/shared_mmap.c +++ b/source4/build/tests/shared_mmap.c @@ -39,6 +39,8 @@ main() MAP_FILE | MAP_SHARED, fd, 0); + if (buf == (int *)-1) exit(1); + while (count-- && buf[9124] != 55732) sleep(1); if (count <= 0) exit(1); diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h index 88fec3f4d7..ee86a81b5d 100644 --- a/source4/lib/replace/replace.h +++ b/source4/lib/replace/replace.h @@ -352,4 +352,8 @@ typedef int bool; #define __STRING(x) #x #endif +#if MMAP_BLACKLIST +#undef HAVE_MMAP +#endif + #endif -- cgit