This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] simplify mmap check


Hello all,

here a (promised to Tom) simplified version to check for mmap.

It removes my previous one.

Tested on darwin-ppc and hp-ux.

Ok for trunk?

Andreas


2006-04-30 Andreas Tobler <a.tobler@schweiz.ch>


	* configure.ac: Simplify the mmap check a bit more.
	* configure: Rebuilt.
	* include/config.h.in: Likewise.


Index: configure.ac
===================================================================
--- configure.ac (revision 113396)
+++ configure.ac (working copy)
@@ -895,7 +895,7 @@
access stat mkdir rename rmdir unlink realpath utime chmod \
nl_langinfo setlocale \
inet_pton uname inet_ntoa \
- fork execvp pipe sigaction ftruncate])
+ fork execvp pipe sigaction ftruncate mmap])
AC_CHECK_FUNCS(inet_aton inet_addr, break)
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
# Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
@@ -1352,31 +1352,6 @@


AC_FUNC_ALLOCA

-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 <unistd.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <fcntl.h>
- >>,
- 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=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]