On 8/4/2013 2:23 PM, Martin Storsjö wrote:
Diogo, does this part actually fix an issue itself, or is it just to avoid needless workarounds? Does it harm anything if this is kept as is, to simplify the conditions? (That is, since cygwin does support the win32 api, the function is available and we'd hope that using it should work as intended on cygwin as well.)
Command line argument parsing is broken at least on cygwin64 without the patch. I'm not sure *why* it happens though; I thought it'd be a winapi misuse (e.g. using C types instead of winapi defines; win64 has 32bit long but cygwin64 has 64bit long) but it didn't seem to be the case (no gcc warnings at least), however simply commenting out the call to prepare_app_arguments in cmdutils.c magically made it work, so the cause must be the windows-specific command line argument parsing.
Invoking avprobe without the patch (behavior is the same with avconv -h / avconv -i test.mp3):
> $ ./avprobe.exe -h> avprobe version r2245_pure-1646-g6da5b57, Copyright (c) 2007-2013 the Libav developers
> built on Aug 4 2013 11:15:28 with gcc 4.8.1 (GCC) > Simple multimedia streams analyzer > usage: avprobe [OPTIONS] [INPUT_FILE] > > You have to specify one input file. > Use -h to get full help or, even better, run 'man avprobe'. > $ ./avprobe.exe test.mp3> avprobe version r2245_pure-1646-g6da5b57, Copyright (c) 2007-2013 the Libav developers
> built on Aug 4 2013 11:15:28 with gcc 4.8.1 (GCC) > Simple multimedia streams analyzer > usage: avprobe [OPTIONS] [INPUT_FILE] > > You have to specify one input file. > Use -h to get full help or, even better, run 'man avprobe'.As for the CommandLineToArgvW check, Luca suggested on IRC making the test only run if target_os != cygwin; I will try that later. Diego also suggested checking for POSIX mkdir to begin with instead of having a workaround hardcoded to windows. That still doesn't cover the other stuff in os_support.[ch] though.
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
