[vlc-devel] commit: Revert "win32: fix %zu fixups - dont use mingw's vsnprintf" ( Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Apr 9 22:34:58 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Apr  9 20:59:21 2009 +0200| [c9f729eadebe5f397ecf7068c5410b46aeb9451d] | committer: Jean-Baptiste Kempf 

Revert "win32: fix %zu fixups - dont use mingw's vsnprintf"

This reverts commit 151982aab503fa812cd4d6e830df34e78871c106.

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

 include/vlc_fixups.h |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 02cf88c..15172b2 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -124,11 +124,7 @@ static inline int vlc_vsprintf (char *str, const char *format, va_list ap)
 static inline int vlc_vsnprintf (char *str, size_t size, const char *format, va_list ap)
 {
     char *fmt = vlc_fix_format_string (format);
-    /* traditionally, MSVCRT has provided vsnprintf as _vsnprintf;
-     * to 'aid' portability/standards compliance, mingw provides a
-     * static version of vsnprintf that is buggy.  Be sure to use
-     * MSVCRT version, at least it behaves as expected */
-    int ret = _vsnprintf (str, size, fmt ? fmt : format, ap);
+    int ret = vsnprintf (str, size, fmt ? fmt : format, ap);
     free (fmt);
     return ret;
 }
@@ -139,7 +135,7 @@ static inline int vlc_printf (const char *format, ...)
     va_list ap;
     int ret;
     va_start (ap, format);
-    ret = vlc_vprintf (format, ap);
+    ret = vprintf (format, ap);
     va_end (ap);
     return ret;
 }
@@ -150,7 +146,7 @@ static inline int vlc_fprintf (FILE *stream, const char *format, ...)
     va_list ap;
     int ret;
     va_start (ap, format);
-    ret = vlc_vfprintf (stream, format, ap);
+    ret = vfprintf (stream, format, ap);
     va_end (ap);
     return ret;
 }
@@ -162,7 +158,7 @@ static inline int vlc_sprintf (char *str, const char *format, ...)
     va_list ap;
     int ret;
     va_start (ap, format);
-    ret = vlc_vsprintf (str, format, ap);
+    ret = vsprintf (str, format, ap);
     va_end (ap);
     return ret;
 }
@@ -174,12 +170,10 @@ static inline int vlc_snprintf (char *str, size_t size, const char *format, ...)
     va_list ap;
     int ret;
     va_start (ap, format);
-    ret = vlc_vsnprintf (str, size, format, ap);
+    ret = vsnprintf (str, size, format, ap);
     va_end (ap);
     return ret;
 }
-/* win32: snprintf must always be vlc_snprintf or _snprintf,
- * see comment in vlc_vsnprintf */
 # define snprintf vlc_snprintf
 
 /* Make sure we don't use flawed vasprintf or asprintf either */




More information about the vlc-devel mailing list