[vlc-devel] commit: Temporarily work around crashing on Windows due to %zu ( Pierre Ynard )

git version control git at videolan.org
Mon Nov 17 16:53:03 CET 2008


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Nov 17 12:08:28 2008 +0100| [6f1a7b41f0f2175ceb1dd399b1ded5e30ffe704b] | committer: Jean-Baptiste Kempf 

Temporarily work around crashing on Windows due to %zu

The printf functions on Windows don't support the z length modifier,
which can shift field arguments, and causes an unconditional crash in
modules.c on start-up. For now, strip it on Windows and have vlc work
again, until a better solution is found and applied.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f1a7b41f0f2175ceb1dd399b1ded5e30ffe704b
---

 src/modules/modules.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index 75656b9..0b00d07 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -544,8 +544,14 @@ found_shortcut:
 
     /* Sort candidates by descending score */
     qsort (p_list, count, sizeof (p_list[0]), modulecmp);
+#ifdef WIN32
+    /* FIXME: Remove this hack after finding a general solution for %z's */
+    msg_Dbg( p_this, "looking for %s module: %u candidate%s", psz_capability,
+             count, count == 1 ? "" : "s" );
+#else
     msg_Dbg( p_this, "looking for %s module: %zu candidate%s", psz_capability,
              count, count == 1 ? "" : "s" );
+#endif
 
     /* Parse the linked list and use the first successful module */
     p_module = NULL;




More information about the vlc-devel mailing list