[vlc-devel] [vlc-commits] fixups.h: added an explicit hack so binaries created on OS X Lion can be executed correctly on Snow Leopard
Felix Paul Kühne
fkuehne.videolan at googlemail.com
Fri Jan 27 12:46:33 CET 2012
Hello,
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
> for
>> getline
>> + * was added lately to Darwin 11 (OS X Lion) only.
>> + * However, we want binaries created on this OS to be executable on
>> previous
>> + * 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,
Felix
More information about the vlc-devel
mailing list