You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2006/08/31 09:01:01 UTC

Re: svn commit: r438796 - /apr/apr/trunk/atomic/unix/apr_atomic.c

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 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