From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10033 invoked by alias); 17 Apr 2006 21:10:10 -0000 Received: (qmail 9874 invoked by uid 22791); 17 Apr 2006 21:10:07 -0000 X-Spam-Check-By: sourceware.org Received: from exsmtp01.agrinet.ch (HELO exsmtp01.agrinet.ch) (81.221.250.200) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Apr 2006 21:10:01 +0000 Received: from smtp.messaging.ch ([10.50.250.214]) by exsmtp01.agrinet.ch with Microsoft SMTPSVC(6.0.3790.211); Mon, 17 Apr 2006 23:09:58 +0200 Received: from [192.168.225.5] ([80.219.227.180]) by smtp.messaging.ch with id NMAV1U0013uA8oG0000000 for java-patches@gcc.gnu.org; Mon, 17 Apr 2006 23:10:29 +0200 X-IMP: RBL SBL+XBL: 0.00,RBL SPAMCOP: 0.00,RBL SORBS: 0.10,RBL MAPS_ORDB: 0.00,URL RHS: 0.00,URL SURBL: 0.00 Message-ID: <44440426.6060807@pop.agri.ch> Date: Mon, 17 Apr 2006 21:10:00 -0000 From: Andreas Tobler User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: Java Patches Subject: [patch] weaken the MMAP check Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2006-q2/txt/msg00065.txt.bz2 Hello, this patch weakens the MMAP check. We only need MMAP with mmap chosen address ranges, no FIXED one. On HP-UX PA MAP_FIXED does not work. To run gcj_dbtool we fail here on HP-UX PA with an mmap not implemented exception. This patch makes it work. Ok for trunk ? Andreas 2006-04-17 Andreas Tobler * configure.ac: Weaken the check for MMAP. * configure: Rebuilt. Index: configure.ac =================================================================== --- configure.ac (revision 113010) +++ configure.ac (working copy) @@ -1346,8 +1346,32 @@ [AC_MSG_RESULT(no)])])]) AC_FUNC_ALLOCA -AC_FUNC_MMAP +dnl Check for mmap() +# AC_FUNC_MMAP goes to far and checks for mmap fixed, we do only need mmap +# at a mmap selected address. See +# gnu/java/nio/channels/natFileChannelPosix.cc + +AC_MSG_CHECKING([for mmap]) +AC_CACHE_VAL(ac_cv_func_mmap_ok, + [AC_TRY_LINK( + changequote(<<, >>)dnl + << +#include +#include +#include +#include + >>, + changequote([, ])dnl + [mmap((void *)0, 0, PROT_READ, 0, 0, 0);], + ac_cv_func_mmap_ok=yes, + ac_cv_func_mmap_ok=no)] ) +AC_MSG_RESULT($ac_cv_func_mmap_ok) +if test $ac_cv_func_mmap_ok = yes +then + AC_DEFINE(HAVE_MMAP, 1, [ Define to 1 if you have a working `mmap' system call w/o fixed address ability.]) +fi + AC_CHECK_PROGS(PERL, perl, false) SYSDEP_SOURCES=