[FFmpeg-cvslog] cmdutils: Use a configure check for enabling	CommandLineToArgvW
    Martin Storsjö 
    git at videolan.org
       
    Fri Nov 30 15:06:27 CET 2012
    
    
  
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Nov 29 17:02:24 2012 +0200| [15caccb9be2a50ffe0dabd3202bcc272d1d7ff1d] | committer: Martin Storsjö
cmdutils: Use a configure check for enabling CommandLineToArgvW
This simplifies the condition to avoid hardcoding the systems
where the function exists. This also simplifies support for
newer Windows API subsets where this function doesn't exist,
such as Windows Phone 8 and the "metro" API subset of Windows 8.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15caccb9be2a50ffe0dabd3202bcc272d1d7ff1d
---
 cmdutils.c |    4 ++--
 configure  |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmdutils.c b/cmdutils.c
index 2329120..6746be1 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -166,7 +166,7 @@ static const OptionDef *find_option(const OptionDef *po, const char *name)
     return po;
 }
 
-#if defined(_WIN32) && !defined(__MINGW32CE__)
+#if HAVE_COMMANDLINETOARGVW
 #include <windows.h>
 #include <shellapi.h>
 /* Will be leaked on exit */
@@ -226,7 +226,7 @@ static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr)
 {
     /* nothing to do */
 }
-#endif /* WIN32 && !__MINGW32CE__ */
+#endif /* HAVE_COMMANDLINETOARGVW */
 
 int parse_option(void *optctx, const char *opt, const char *arg,
                  const OptionDef *options)
diff --git a/configure b/configure
index ca11a85..5e1be33 100755
--- a/configure
+++ b/configure
@@ -1181,6 +1181,7 @@ HAVE_LIST="
     attribute_packed
     closesocket
     cmov
+    CommandLineToArgvW
     cpunop
     CryptGenRandom
     dcbzl
    
    
More information about the ffmpeg-cvslog
mailing list