File apr-1.4.5-linux3.patch of Package libapr1

Index: configure.in
===================================================================
--- configure.in.orig
+++ configure.in
@@ -181,7 +181,7 @@ dnl Do the various CC checks *before* pr
 dnl may need to use compiler characteristics to make decisions. This macro
 dnl can only be used once within a configure script, so this prevents a
 dnl preload section from invoking the macro to get compiler info.
-AC_PROG_CC
+AC_PROG_CC_STDC
 
 dnl AC_PROG_SED is only avaliable in recent autoconf versions.
 dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
@@ -649,7 +649,7 @@ case $host in
         fi
         ;;
     *linux*)
-        os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
+        os_version=260
         ;;
     *os390)
         os_version=`uname -r | sed -e 's/\.//g'`
@@ -1174,20 +1174,7 @@ APR_IFALLYES(header:windows.h func:Creat
              [havewin32shm="1"
               APR_DECIDE(USE_SHMEM_WIN32_ANON,
                          [Windows CreateFileMapping()])])
-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
-            APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_ZERO USE_SHMEM_SHMGET_ANON)
-        fi
-        ;;
-    *hpux11* ) 
-        APR_DECISION_OVERRIDE(USE_SHMEM_SHMGET_ANON)
-        ;;
-esac
+
 APR_END_DECISION
 AC_DEFINE_UNQUOTED($ac_decision)
 
@@ -1244,18 +1231,7 @@ APR_IFALLYES(header:os2.h,
 APR_IFALLYES(header:windows.h,
              [havewin32shm="1"
               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
-            APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_TMP USE_SHMEM_MMAP_SHM dnl
-                                  USE_SHMEM_SHMGET)
-        fi
-        ;;
-esac
+
 APR_END_DECISION
 AC_DEFINE_UNQUOTED($ac_decision)
 
@@ -2049,6 +2025,8 @@ fi
 
 AC_SUBST(have_proc_invoked)
 
+AC_C_VARARRAYS
+
 AC_MSG_CHECKING(for Variable Length Arrays)
 APR_TRY_COMPILE_NO_WARNING([],
 [
@@ -2215,6 +2193,9 @@ APR_IFALLYES(header:OS.h func:create_sem
 if test "x$apr_lock_method" != "x"; then
     APR_DECISION_FORCE($apr_lock_method)
 fi
+
+APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [cross-process pthread mutexes])
+
 APR_END_DECISION
 AC_DEFINE_UNQUOTED($ac_decision)
 
Index: poll/unix/poll.c
===================================================================
--- poll/unix/poll.c.orig
+++ poll/unix/poll.c
@@ -73,7 +73,7 @@ APR_DECLARE(apr_status_t) apr_poll(apr_p
                                    apr_interval_time_t timeout)
 {
     int i, num_to_poll;
-#ifdef HAVE_VLA
+#ifdef HAVE_C_VARARRAYS
     /* XXX: I trust that this is a segv when insufficient stack exists? */
     struct pollfd pollset[num];
 #elif defined(HAVE_ALLOCA)
@@ -129,7 +129,7 @@ APR_DECLARE(apr_status_t) apr_poll(apr_p
         }
     }
     
-#if !defined(HAVE_VLA) && !defined(HAVE_ALLOCA)
+#if !defined(HAVE_C_VARARRAYS) && !defined(HAVE_ALLOCA)
     if (num > SMALL_POLLSET_LIMIT) {
         free(pollset);
     }
openSUSE Build Service is sponsored by