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 2006/08/31 07:10:22 UTC
svn commit: r438796 - /apr/apr/trunk/atomic/unix/apr_atomic.c
Author: jerenkrantz
Date: Wed Aug 30 22:10:22 2006
New Revision: 438796
URL: http://svn.apache.org/viewvc?rev=438796&view=rev
Log:
Fix up integer type on Solaris 10 (gcc) compiles.
* atomic/unix/apr_atomic.c
(apr_atomic_dec32): Match declaration in apr_atomic.h for Solaris 10
implementation.
Modified:
apr/apr/trunk/atomic/unix/apr_atomic.c
Modified: apr/apr/trunk/atomic/unix/apr_atomic.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/atomic/unix/apr_atomic.c?rev=438796&r1=438795&r2=438796&view=diff
==============================================================================
--- apr/apr/trunk/atomic/unix/apr_atomic.c (original)
+++ apr/apr/trunk/atomic/unix/apr_atomic.c Wed Aug 30 22:10:22 2006
@@ -179,7 +179,7 @@
#endif /* APR_OVERRIDE_ATOMIC_CAS32 */
#if !defined(APR_OVERRIDE_ATOMIC_DEC32)
-APR_DECLARE(apr_uint32_t) apr_atomic_dec32(volatile apr_uint32_t *mem)
+APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
{
apr_uint32_t prev = *mem;
atomic_dec_32(mem);
Re: svn commit: r438796 - /apr/apr/trunk/atomic/unix/apr_atomic.c
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 8/31/06, William A. Rowe, Jr. <wr...@rowe-clan.net> wrote:
> jerenkrantz@apache.org wrote:
> > --- apr/apr/trunk/atomic/unix/apr_atomic.c (original)
> > +++ apr/apr/trunk/atomic/unix/apr_atomic.c Wed Aug 30 22:10:22 2006
> > @@ -179,7 +179,7 @@
> > #endif /* APR_OVERRIDE_ATOMIC_CAS32 */
> >
> > #if !defined(APR_OVERRIDE_ATOMIC_DEC32)
> > -APR_DECLARE(apr_uint32_t) apr_atomic_dec32(volatile apr_uint32_t *mem)
> > +APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
> > {
>
> This appears to be a binary break.
>
> You realize we can play macro magic to enforce the correct type?
>
> In any case, unless I'm imagining things, please revert
No. apr_atomic.h says:
APR_DECLARE(int) apr_atomic_dec32(...)
with this Solaris 10 specific Atomics impl saying:
APR_DECLARE(apr_uint32_t) apr_atomic_dec32(...)
All other implementations of dec32() in apr_atomic.c match the int
return - not the uint32_t return. Therefore, on a 64-bit platform, it
never could compile with the signature mismatch. My commit allows APR
to compile on 64-bit Solaris. -- justin
Re: svn commit: r438796 - /apr/apr/trunk/atomic/unix/apr_atomic.c
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 8/31/06, William A. Rowe, Jr. <wr...@rowe-clan.net> wrote:
> jerenkrantz@apache.org wrote:
> > --- apr/apr/trunk/atomic/unix/apr_atomic.c (original)
> > +++ apr/apr/trunk/atomic/unix/apr_atomic.c Wed Aug 30 22:10:22 2006
> > @@ -179,7 +179,7 @@
> > #endif /* APR_OVERRIDE_ATOMIC_CAS32 */
> >
> > #if !defined(APR_OVERRIDE_ATOMIC_DEC32)
> > -APR_DECLARE(apr_uint32_t) apr_atomic_dec32(volatile apr_uint32_t *mem)
> > +APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
> > {
>
> This appears to be a binary break.
>
> You realize we can play macro magic to enforce the correct type?
>
> In any case, unless I'm imagining things, please revert
No. apr_atomic.h says:
APR_DECLARE(int) apr_atomic_dec32(...)
with this Solaris 10 specific Atomics impl saying:
APR_DECLARE(apr_uint32_t) apr_atomic_dec32(...)
All other implementations of dec32() in apr_atomic.c match the int
return - not the uint32_t return. Therefore, on a 64-bit platform, it
never could compile with the signature mismatch. My commit allows APR
to compile on 64-bit Solaris. -- justin
Re: svn commit: r438796 - /apr/apr/trunk/atomic/unix/apr_atomic.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
jerenkrantz@apache.org wrote:
> --- apr/apr/trunk/atomic/unix/apr_atomic.c (original)
> +++ apr/apr/trunk/atomic/unix/apr_atomic.c Wed Aug 30 22:10:22 2006
> @@ -179,7 +179,7 @@
> #endif /* APR_OVERRIDE_ATOMIC_CAS32 */
>
> #if !defined(APR_OVERRIDE_ATOMIC_DEC32)
> -APR_DECLARE(apr_uint32_t) apr_atomic_dec32(volatile apr_uint32_t *mem)
> +APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
> {
This appears to be a binary break.
You realize we can play macro magic to enforce the correct type?
In any case, unless I'm imagining things, please revert
Re: svn commit: r438796 - /apr/apr/trunk/atomic/unix/apr_atomic.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
jerenkrantz@apache.org wrote:
> --- apr/apr/trunk/atomic/unix/apr_atomic.c (original)
> +++ apr/apr/trunk/atomic/unix/apr_atomic.c Wed Aug 30 22:10:22 2006
> @@ -179,7 +179,7 @@
> #endif /* APR_OVERRIDE_ATOMIC_CAS32 */
>
> #if !defined(APR_OVERRIDE_ATOMIC_DEC32)
> -APR_DECLARE(apr_uint32_t) apr_atomic_dec32(volatile apr_uint32_t *mem)
> +APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
> {
This appears to be a binary break.
You realize we can play macro magic to enforce the correct type?
In any case, unless I'm imagining things, please revert