apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr configure.in
Date Thu, 16 Aug 2001 06:49:47 GMT
jerenkrantz    01/08/15 23:49:46

  Modified:    .        configure.in
  Log:
  Reorder the shared memory preferences to match what MM originally had.
  
  This effectively backs out rbb's earlier commit which was valid then
  because we weren't treating Linux as special.  Now, since older versions
  of Linux are safe, we should go back to the original order.
  
  We now safeguard MAP_ANON usage to only be used with >=2.4.0 Linux kernels.
  On Linux versions less than that, we will not use MAP_ANON because Linux
  lies and says it has it when it doesn't.  I am sure that we could fine tune
  the >=2.4.0 to match the specific 2.3 version that this was fixed in.
  (This may very well be a glibc issue as well...)
  
  On Linux 2.2 (Mandrake 7.2 distro), we choose shmget.
  On Linux 2.4 (Mandrake 8.0 distro), we choose mmap with MAP_ANON.
  
  Please try out.  It works here.  If this needs a glibc check instead,
  let me know and we can work something out.
  
  Revision  Changes    Path
  1.360     +27 -12    apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.359
  retrieving revision 1.360
  diff -u -r1.359 -r1.360
  --- configure.in	2001/08/15 16:01:23	1.359
  +++ configure.in	2001/08/16 06:49:46	1.360
  @@ -252,6 +252,9 @@
           # 3.4-RELEASE: 340   4.1.1-RELEASE: 411
           os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/' | sed -e 's/\(.\)\.\(.\)\-.*/\1\20/'`
           ;;
  +    *linux*)
  +        os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
  +        ;;
        *)
           os_version=OS_VERSION_IS_NOT_SET
           ;;
  @@ -405,26 +408,38 @@
   
   dnl Now we determine which one is our preference.
   APR_BEGIN_DECISION([shared memory allocation method])
  -APR_IFALLYES(header:sys/mman.h func:mmap func:munmap define:MAP_ANON,
  -             APR_DECIDE(USE_SHMEM_MMAP_ANON, 
  -             [4.4BSD-style mmap() via MAP_ANON]))
  -APR_IFALLYES(header:sys/ipc.h header:sys/shm.h header:sys/file.h dnl
  -             func:shmget func:shmat func:shmdt func:shmctl,
  -             APR_DECIDE(USE_SHMEM_SHMGET, [SysV IPC shmget()]))
  -APR_IFALLYES(header:sys/mman.h func:mmap func:munmap file:/dev/zero,
  -             APR_DECIDE(USE_SHMEM_MMAP_ZERO, 
  -             [SVR4-style mmap() on /dev/zero]))
  +APR_IFALLYES(header:sys/mman.h func:mmap func:munmap,
  +             APR_DECIDE(USE_SHMEM_MMAP_TMP, 
  +             [Classical mmap() on temporary file]))
   APR_IFALLYES(header:sys/mman.h func:mmap func:munmap func:shm_open dnl
                func:shm_unlink,
                APR_DECIDE(USE_SHMEM_MMAP_SHM, 
                [mmap() via POSIX.1 shm_open() on temporary file]))
  -APR_IFALLYES(header:sys/mman.h func:mmap func:munmap,
  -             APR_DECIDE(USE_SHMEM_MMAP_TMP, 
  -             [Classical mmap() on temporary file]))
  +APR_IFALLYES(header:sys/mman.h func:mmap func:munmap file:/dev/zero,
  +             APR_DECIDE(USE_SHMEM_MMAP_ZERO, 
  +             [SVR4-style mmap() on /dev/zero]))
  +APR_IFALLYES(header:sys/ipc.h header:sys/shm.h header:sys/file.h dnl
  +             func:shmget func:shmat func:shmdt func:shmctl,
  +             APR_DECIDE(USE_SHMEM_SHMGET, [SysV IPC shmget()]))
  +APR_IFALLYES(header:sys/mman.h func:mmap func:munmap define:MAP_ANON,
  +             APR_DECIDE(USE_SHMEM_MMAP_ANON, 
  +             [4.4BSD-style mmap() via MAP_ANON]))
   APR_IFALLYES(header:kernel/OS.h func:create_area,
                APR_DECIDE(USE_SHMEM_BEOS, [BeOS areas]))
   APR_IFALLYES(header:os2.h,
                APR_DECIDE(USE_SHMEM_OS2, [OS/2 DosAllocSharedMem()]))
  +case $host in
  +    *linux* ) 
  +        dnl Linux has problems with MM_SHMT_MMANON even though it reports
  +        dnl that it has it.
  +        dnl FIXME - find exact 2.3 version that MMANON was fixed in.  It is
  +        dnl confirmed fixed in 2.4 series.
  +        if test $os_version -le "240"; then
  +            APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_TMP USE_SHMEM_MMAP_SHM dnl
  +                                  USE_SHMEM_MMAP_ZERO USE_SHMEM_SHMGET)
  +        fi
  +        ;;
  +esac
   APR_END_DECISION
   AC_DEFINE_UNQUOTED($ac_decision)
   
  
  
  

Mime
View raw message