OSDN Git Service

2006-05-01 Andreas Tobler <a.tobler@schweiz.ch>
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 May 2006 20:02:27 +0000 (20:02 +0000)
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 May 2006 20:02:27 +0000 (20:02 +0000)
* configure.ac: Simplify the mmap check a bit more.
* configure: Rebuilt.
* include/config.h.in: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113426 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/configure
libjava/configure.ac
libjava/include/config.h.in

index 61d096a..c002c28 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-01  Andreas Tobler  <a.tobler@schweiz.ch>
+
+       * configure.ac: Simplify the mmap check a bit more.
+       * configure: Rebuilt.
+       * include/config.h.in: Likewise.
+
 2006-05-01  Roger Sayle  <roger@eyesopen.com>
            Andrew Haley  <aph@redhat.com>
 
 2006-05-01  Roger Sayle  <roger@eyesopen.com>
            Andrew Haley  <aph@redhat.com>
 
index 6361ecf..070b010 100755 (executable)
@@ -9427,12 +9427,13 @@ else
 
 
 
 
 
 
+
 for ac_func in strerror ioctl select fstat open fsync sleep opendir \
                    gmtime_r localtime_r readdir_r getpwuid_r getcwd \
                   access stat mkdir rename rmdir unlink realpath utime chmod \
                   nl_langinfo setlocale \
                   inet_pton uname inet_ntoa \
 for ac_func in strerror ioctl select fstat open fsync sleep opendir \
                    gmtime_r localtime_r readdir_r getpwuid_r getcwd \
                   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
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -16410,84 +16411,6 @@ _ACEOF
 fi
 
 
 fi
 
 
-# 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
-
-echo "$as_me:$LINENO: checking for mmap" >&5
-echo $ECHO_N "checking for mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_ok+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-int
-main ()
-{
-    mmap((void *)0, 0, PROT_READ, 0, 0, 0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_mmap_ok=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_mmap_ok=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_ok" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_ok" >&6
-if test $ac_cv_func_mmap_ok = yes
-then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
-
-fi
-
 for ac_prog in perl
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 for ac_prog in perl
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
index 5732fb2..69f4317 100644 (file)
@@ -895,7 +895,7 @@ else
                   access stat mkdir rename rmdir unlink realpath utime chmod \
                   nl_langinfo setlocale \
                   inet_pton uname inet_ntoa \
                   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
    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_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tim; tim.t
 
 AC_FUNC_ALLOCA
 
 
 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=
 AC_CHECK_PROGS(PERL, perl, false)
 
 SYSDEP_SOURCES=
index 8dcd658..a57dd83 100644 (file)
 /* Define is you have 'mktime' in <time.h> */
 #undef HAVE_MKTIME
 
 /* Define is you have 'mktime' in <time.h> */
 #undef HAVE_MKTIME
 
-/* Define to 1 if you have a working `mmap' system call w/o fixed address
-   ability. */
+/* Define to 1 if you have the `mmap' function. */
 #undef HAVE_MMAP
 
 /* Define to 1 if you have the <netdb.h> header file. */
 #undef HAVE_MMAP
 
 /* Define to 1 if you have the <netdb.h> header file. */