[MPlayer-dev-eng] [PATCH] fix linker issues with Apple GCC 4
ivan at cacad.com
Sat Jan 29 13:41:01 CET 2005
On Sat, 22 Jan 2005 00:22:58 -0500
Alexander Strange <astrange at ithinksw.com> wrote:
> As it stands, mplayer compiles but doesn't link using the latest Apple
> gcc 4 and cctools; there are two problems:
> • several sets of headers declare global variables in them, which
> causes multiple definition errors (how did this ever work?)
I also wonder how it worked.
> • gtf.c defines a round() after including math.h, but math.h already
> has a round in it. glibc also has a round() call, so I simply removed
> the static one in gtf.
I had delayed that.
In short I am not sure that this is the right solution.
e.g. floor is defined in POSIX while round in C99.
Probably an #ifndef would be better.
But i have small doubtfor the above fix, in case this code is workaround for buggy round,
or simply algorithm in gtf need rounding to upper value (not nearest integer away from zero).
These are less probable (e.g. no one of the round usage seems to work with negative values)
but I would be happy to hear others oppinion.
Wish You Best
More information about the MPlayer-dev-eng