[MacPorts] #17748: apr-1.3.3: 4-way universal build: duplicate case value and bad 64-32 bit switch logic
MacPorts
noreply at macports.org
Tue Dec 23 07:11:27 PST 2008
#17748: apr-1.3.3: 4-way universal build: duplicate case value and bad 64-32 bit
switch logic
-------------------------------+--------------------------------------------
Reporter: eborisch@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone: Port Bugs
Component: ports | Version: 1.7.0
Keywords: apr universal | Port: apr
-------------------------------+--------------------------------------------
Ticket #15523 is still true; please fix.
How to fix: as noted on http://sarth.thallos.org/2008/10/apr-and-32-bit64
-bit-universal-binary.html - patch include/apr.h from
{{{
typedef long apr_int64_t;
typedef unsigned long apr_uint64_t;
}}}
to
{{{
typedef long long apr_int64_t;
typedef unsigned long long apr_uint64_t;
}}}
Also, atomic/unix/ia32.c needs to have the two if clauses at the end
changed to something like this:
{{{
#if !(defined(__LP64__) )
asm volatile ("lock; cmpxchgl %2, %1"
: "=a" (prev), "=m" (*mem)
: "r" (with), "m" (*mem), "0" (cmp));
#else
asm volatile ("lock; cmpxchgq %q2, %1"
: "=a" (prev), "=m" (*mem)
: "r" ((unsigned long)with), "m" (*mem),
"0" ((unsigned long)cmp));
#endif
return prev;
}
APR_DECLARE(void*) apr_atomic_xchgptr(volatile void **mem, void *with)
{
void *prev;
#if !(defined(__LP64__) )
asm volatile ("xchgl %2, %1"
: "=a" (prev), "+m" (*mem)
: "0" (with));
#else
asm volatile ("xchgq %q2, %1"
: "=a" (prev), "+m" (*mem)
: "r" ((unsigned long)with));
#endif
return prev;
}
}}}
These are both issues with doing the 32-bit and 64-bit builds
concurrently.
--
Ticket URL: <http://trac.macports.org/ticket/17748>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list