apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1541489 - in /apr/apr/branches/1.5.x: ./ CHANGES configure.in
Date Wed, 13 Nov 2013 12:15:57 GMT
Author: trawick
Date: Wed Nov 13 12:15:56 2013
New Revision: 1541489

URL: http://svn.apache.org/r1541489
Log:
Merge r1535027, 1535157, and 1541486 from trunk:

PR: 55690

r1535027:

configure.in: Fix Linux kernel version detection, which did not
anticipate "3.11.x"-style double digit versioning.

Submitted by: jorton

r1535157:

configure.in: Fix r1535027 for Linux kernel versions x.0.y.

Submitted by: jorton

r1541486:

Fix sed re escaping issue in recognition of Linux kernel version.

Submitted by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta gmail.com>
Reviewed by: trawick


Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/CHANGES
    apr/apr/branches/1.5.x/configure.in

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1535027,1535157,1541486

Modified: apr/apr/branches/1.5.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/CHANGES?rev=1541489&r1=1541488&r2=1541489&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.5.x/CHANGES [utf-8] Wed Nov 13 12:15:56 2013
@@ -1,6 +1,10 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.5.0
 
+  *) Fix Linux kernel version check to recognize more versions,
+     including versions 3.10 and later.  PR 55690.  [Joe Orton,
+     Arfrever Frehtes Taifersar Arahesis <arfrever.fta gmail.com>]
+
   *) Add apr_sockaddr_is_wildcard() to check if a socket address
      refers to the wildcard address for the protocol family (e.g.,
      0.0.0.0/INADDR_ANY for IPv4).  [Jeff Trawick]

Modified: apr/apr/branches/1.5.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/configure.in?rev=1541489&r1=1541488&r2=1541489&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/configure.in (original)
+++ apr/apr/branches/1.5.x/configure.in Wed Nov 13 12:15:56 2013
@@ -664,7 +664,15 @@ case $host in
         fi
         ;;
     *linux*)
-        os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
+        os_major=[`uname -r | sed -e 's/\([1-9][0-9]*\)\..*/\1/'`]
+        os_minor=[`uname -r | sed -e 's/[1-9][0-9]*\.\([0-9]\+\)\..*/\1/'`]
+        if test $os_major -lt 2 -o \( $os_major -eq 2 -a $os_minor -lt 4 \); then
+            AC_MSG_WARN([Configured for pre-2.4 Linux $os_major.$os_minor])
+            os_pre24linux=1
+        else
+            os_pre24linux=0
+            AC_MSG_NOTICE([Configured for Linux $os_major.$os_minor])
+        fi
         ;;
     *os390)
         os_version=`uname -r | sed -e 's/\.//g'`
@@ -1183,7 +1191,8 @@ case $host in
         # that it has it.
         # FIXME - find exact 2.3 version that MMANON was fixed in.  It is
         # confirmed fixed in 2.4 series.
-        if test $os_version -le "240"; then
+        if test $os_pre24linux -eq 1; then
+            AC_MSG_WARN([Disabling anon mmap() support for Linux pre-2.4])
             APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_ZERO USE_SHMEM_SHMGET_ANON)
         fi
         ;;
@@ -1249,11 +1258,9 @@ APR_IFALLYES(header:windows.h,
               APR_DECIDE(USE_SHMEM_WIN32, [Windows shared memory])])
 case $host in
     *linux* ) 
-        # Linux has problems with MM_SHMT_MMANON even though it reports
-        # that it has it.
-        # FIXME - find exact 2.3 version that MMANON was fixed in.  It is
-        # confirmed fixed in 2.4 series.
-        if test $os_version -le "240"; then
+        # Linux pre-2.4 had problems with MM_SHMT_MMANON even though
+        # it reports that it has it.
+        if test $os_pre24linux -eq 1; then
             APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_TMP USE_SHMEM_MMAP_SHM dnl
                                   USE_SHMEM_SHMGET)
         fi
@@ -1350,7 +1357,8 @@ AC_ARG_WITH(sendfile, [  --with-sendfile
             ;;
         s390-*-linux-gnu)
             # disable sendfile support for 2.2 on S/390
-            if test $os_version -lt 240; then
+            if test $os_pre24linux -eq 1; then
+                AC_MSG_WARN([Disabled sendfile support for Linux 2.2 on S/390])
                 sendfile="0"
             fi
             ;;



Mime
View raw message