You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/06/13 09:22:00 UTC

svn commit: r1349661 - /subversion/trunk/subversion/libsvn_subr/cache-memcache.c

Author: gstein
Date: Wed Jun 13 07:22:00 2012
New Revision: 1349661

URL: http://svn.apache.org/viewvc?rev=1349661&view=rev
Log:
Followup to r1349277: old APRs do not have APR_INT16_MAX

* subversion/libsvn_subr/cache-memcache.c:
  (...): define APR_INT16_MAX if it is undefined

Modified:
    subversion/trunk/subversion/libsvn_subr/cache-memcache.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-memcache.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-memcache.c?rev=1349661&r1=1349660&r2=1349661&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-memcache.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-memcache.c Wed Jun 13 07:22:00 2012
@@ -36,6 +36,11 @@
 
 #include <apr_memcache.h>
 
+/* Older APRs do not have this.  */
+#ifndef APR_INT16_MAX
+#define APR_INT16_MAX   (0x7fff)
+#endif
+
 /* A note on thread safety:
 
    The apr_memcache_t object does its own mutex handling, and nothing



Re: svn commit: r1349661 - /subversion/trunk/subversion/libsvn_subr/cache-memcache.c

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Wed, Jun 13, 2012 at 9:22 AM,  <gs...@apache.org> wrote:
> Author: gstein
> Date: Wed Jun 13 07:22:00 2012
> New Revision: 1349661
>
> URL: http://svn.apache.org/viewvc?rev=1349661&view=rev
> Log:
> Followup to r1349277: old APRs do not have APR_INT16_MAX
>
> * subversion/libsvn_subr/cache-memcache.c:
>  (...): define APR_INT16_MAX if it is undefined
>
> Modified:
>    subversion/trunk/subversion/libsvn_subr/cache-memcache.c
>
> Modified: subversion/trunk/subversion/libsvn_subr/cache-memcache.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-memcache.c?rev=1349661&r1=1349660&r2=1349661&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/cache-memcache.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/cache-memcache.c Wed Jun 13 07:22:00 2012
> @@ -36,6 +36,11 @@
>
>  #include <apr_memcache.h>
>
> +/* Older APRs do not have this.  */
> +#ifndef APR_INT16_MAX
> +#define APR_INT16_MAX   (0x7fff)
> +#endif
> +

Instead defining this macro here, just include
private/svn_dep_compat.h, which conditionally defines this macro if
the APR version isn't high enough.

-Hyrum

>  /* A note on thread safety:
>
>    The apr_memcache_t object does its own mutex handling, and nothing
>
>



-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: svn commit: r1349661 - /subversion/trunk/subversion/libsvn_subr/cache-memcache.c

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Wed, Jun 13, 2012 at 9:22 AM,  <gs...@apache.org> wrote:
> Author: gstein
> Date: Wed Jun 13 07:22:00 2012
> New Revision: 1349661
>
> URL: http://svn.apache.org/viewvc?rev=1349661&view=rev
> Log:
> Followup to r1349277: old APRs do not have APR_INT16_MAX
>
> * subversion/libsvn_subr/cache-memcache.c:
>  (...): define APR_INT16_MAX if it is undefined
>
> Modified:
>    subversion/trunk/subversion/libsvn_subr/cache-memcache.c
>
> Modified: subversion/trunk/subversion/libsvn_subr/cache-memcache.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-memcache.c?rev=1349661&r1=1349660&r2=1349661&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/cache-memcache.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/cache-memcache.c Wed Jun 13 07:22:00 2012
> @@ -36,6 +36,11 @@
>
>  #include <apr_memcache.h>
>
> +/* Older APRs do not have this.  */
> +#ifndef APR_INT16_MAX
> +#define APR_INT16_MAX   (0x7fff)
> +#endif
> +

Instead defining this macro here, just include
private/svn_dep_compat.h, which conditionally defines this macro if
the APR version isn't high enough.

-Hyrum

>  /* A note on thread safety:
>
>    The apr_memcache_t object does its own mutex handling, and nothing
>
>



-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/