On Mon, 5 Aug 2013, Diogo Franco (Kovensky) wrote:

On 8/5/2013 6:48 AM, Diego Biurrun wrote:
Before we start littering our code with workarounds for such issues we should indeed rule out that it's a bug. If it is a bug, the bug should be reported and hopefully get fixed, obviating the need for workarounds.

After talking with some developers, it seems that most of the patch is unneeded -- cygwin does not define _WIN32, so checking defined(_WIN32) && !defined(__CYGWIN__) is a tautology. Confirmed by doing an #ifdef + #error test. This only leaves the commandline parsing, which is always done regardless of whether it's actually needed or not; it's conditioned on whether the function exists and is accessible.

There is no windows platform released in the past 13 years that *doesn't* have that function

Not quite. Windows CE/Mobile doesn't have it, neither does "Windows store apps" for Windows 8, nor does Windows Phone. So using only "#ifdef _WIN32" is a no go.

(all in the past 20 years if you link with unicows), so the test always passes (even in cygwin), leading to the bad behavior. The special commandline parsing should be conditioned on _WIN32 (instead of !defined(__CYGWIN__), or even HAVE_COMMANDLINETOARGVW, unless you intend to support win9x). Should I write the patch for that?

If you mean this:
#if HAVE_COMMANDLINETOARGVW && defined(_WIN32)

Then that's certainly better than the previous version where cygwin was excluded. I'd be ok with that (it'd be good with a comment explaining this briefly, and having the full story summary in the commit message).

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to