On 12 May 2008, at 05:54, James McKenzie wrote:
> This is failing and causing fink update-all to fail in addition.
>
> System is on MacOSX 10.5.2 and has gcc.4.3.2 installed from Fink.
Your diagnostic about MIN looks right ...
First, why it did work on 10.4 : recompiling maccoreaudio.cxx with '-H'
added to the flags yields the following extract
(showing which header included which one):
.. /sw/.bld/pwlib1-1.10.10-1/pwlib-1.10.10/include/ptlib.h
... /sw/.bld/pwlib1-1.10.10-1/pwlib-1.10.10/include/ptlib/contain.h
.... /sw/.bld/pwlib1-1.10.10-1/pwlib-1.10.10/include/ptlib/object.h
..... /sw/.bld/pwlib1-1.10.10-1/pwlib-1.10.10/include/ptlib/unix/
ptlib/contain.h
...... /sw/.bld/pwlib1-1.10.10-1/pwlib-1.10.10/include/ptlib/unix/
ptlib/pmachdep.h
....... /usr/include/arpa/inet.h
........ /usr/include/sys/param.h
and the last one has (on line 212) :
#define MIN(a,b) (((a)<(b))?(a):(b))
(I don't know exactly what breaks down in this chain on 10.5, but
never mind)
But you see that along this sequence also include/ptlib/object.h is
included,
and that one has :
1829 /*$MACRO PMIN(v1, v2)
1830 This macro is used to calculate the minimum of two
values. As this is a
1831 macro the expression in #v1# or #v2# is executed
1832 twice so extreme care should be made in its use.
1833 */
1834 #define PMIN(v1, v2) ((v1) < (v2) ? (v1) : (v2))
and it is PMIN that is used to calculate minima elsewhere in the build..
So there seem to be 2 +/- equivalent types of solutions :
- either to include explicitly <sys/param.h> in maccoreaudio.h
- or to replace (via the PatchScript) the occurences of "MIN" by
"PMIN" in
src/ptlib/unix/{maccoreaudio/circular_buffer.inl,/maccoreaudio.cxx}
I guess the second would be preferred upstream, since it uniformizes
their
use of macros, and make the thing less dependent on system specifics,
_ if you're willing to send your patch there.
You said you would experiment with such solutions, and report back...
Was there other trouble ?
JF Mertens
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users