You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by je...@apache.org on 2004/07/05 01:38:18 UTC

cvs commit: apr/build apr_hints.m4

jerenkrantz    2004/07/04 16:38:18

  Modified:    .        CHANGES
               build    apr_hints.m4
  Log:
  Support threading on FreeBSD 5.x where kern.osreldate >= 502102.
  
  5.3 will be the first release with this enabled by default (current -CURRENT
  will also be enabled); 5.2 and earlier still use the broken libc_r by default.
  Those people on 5.2 can pass --enable-threads and setup libmap.conf to use
  libkse instead.
  
  As for the 502102 magic number, from
  http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html:
  "5.2-CURRENT after change of default thread library from libc_r to libpthread.  502102"
  
  Submitted by:	Craig Rodrigues <rodrigc crodrigues.org>
  Reviewed by:	Justin Erenkrantz, Aaron Bannert (concept)
  
  Revision  Changes    Path
  1.479     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.478
  retrieving revision 1.479
  diff -u -u -r1.478 -r1.479
  --- CHANGES	1 Jul 2004 21:21:59 -0000	1.478
  +++ CHANGES	4 Jul 2004 23:38:18 -0000	1.479
  @@ -7,6 +7,9 @@
   
   Changes with APR 1.0
   
  +  *) Support threading on FreeBSD 5.x where kern.osreldate >= 502102.
  +     [Craig Rodrigues <rodrigc crodrigues.org>]
  +
     *) Add an RPM spec file derived from Fedora Core.
        [Graham Leggett, Joe Orton]
   
  
  
  
  1.64      +9 -7      apr/build/apr_hints.m4
  
  Index: apr_hints.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_hints.m4,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -u -r1.63 -r1.64
  --- apr_hints.m4	14 Jun 2004 21:16:40 -0000	1.63
  +++ apr_hints.m4	4 Jul 2004 23:38:18 -0000	1.64
  @@ -136,14 +136,16 @@
   	APR_ADDTO(CPPFLAGS, [-DNETBSD])
   	;;
       *-freebsd*)
  -	case $host in
  -	    *freebsd[[2345]]*)
  -		APR_ADDTO(CFLAGS, [-funsigned-char])
  -		;;
  -	esac
  -	APR_SETIFNULL(enable_threads, [no])
           APR_SETIFNULL(apr_lock_method, [USE_FLOCK_SERIALIZE])
  -	APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_THREAD_SAFE])
  +        os_version=`sysctl -n kern.osreldate`
  +        dnl 502102 is when libc_r switched to libpthread (aka libkse).
  +        if test $os_version -ge "502102"; then
  +          apr_cv_pthreads_cflags="none"
  +          apr_cv_pthreads_lib="-lpthread"
  +        else
  +          apr_cv_pthreads_cflags="-D_THREAD_SAFE -D_REENTRANT"
  +          APR_SETIFNULL(enable_threads, [no])
  +        fi
   	;;
       *-next-nextstep*)
   	APR_SETIFNULL(CFLAGS, [-O])