[vlc-devel] [vlc-commits] fixups.h: added an explicit hack so binaries created on OS X Lion can be executed correctly on Snow Leopard
funman at videolan.org
Fri Jan 27 12:49:17 CET 2012
Le 2012-01-27 06:46, Felix Paul Kühne a écrit :
> On 27.01.2012, at 12:19, Rémi Denis-Courmont wrote:
>> On Fri, 27 Jan 2012 01:17:45 +0100 (CET), git at videolan.org (Felix Paul
>> Kühne) wrote:
>>> -#ifndef HAVE_GETDELIM
>>> +/* we always need our implementation on Darwin, since native support
>>> + * was added lately to Darwin 11 (OS X Lion) only.
>>> + * However, we want binaries created on this OS to be executable on
>>> + * releases. */
>>> +#if !defined HAVE_GETDELIM || defined(__APPLE__)
>> Adding a declaration can only do of one:
>> a) If the declaration already existed identically: no effects.
>> b) If the declaration already existed differently: compilation break.
>> c) If the declaration did not exist: compilation fix *but* link failure.
>> So overall this makes no sense.
> Thanks for the feedback. This commit relies on [084beb155c04a4e56b98c366bc6a1bd3d156ff17] to be actually functional.
> The problem is that _getline is defined on OS X 10.7, but isn't present in earlier releases of OS X. Since we want to compile the 64bit binary on 10.7 including 10.6 support, we need this hack, which is admittedly really ugly, to achieve runtime compatibility with 10.6 by using libcompat's implementation of _getline.
> I'm absolutely open to better solutions to solve this problem.
> Best regards,
I think the changes to declarations are not needed.
You just want the AC_LIBOBJ to make sure the function is defined in your
binary: the declaration will always be here: either from system either
More information about the vlc-devel