[vlc-commits] Use _aligned_* when compiling with MSVC

Jean-Baptiste Kempf git at videolan.org
Sun Dec 8 00:12:33 CET 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Dec  8 00:10:42 2013 +0100| [b6687f9b8566fea243a272f9a4fa13a4f0359b8f] | committer: Jean-Baptiste Kempf

Use _aligned_* when compiling with MSVC

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

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

 include/vlc_common.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index f0df305..62b1260 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -806,6 +806,9 @@ VLC_API bool vlc_ureduce( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t )
 #ifdef __MINGW32__
 # define vlc_memalign(align, size) (__mingw_aligned_malloc(size, align))
 # define vlc_free(base)            (__mingw_aligned_free(base))
+#elif defined(_MSC_VER)
+# define vlc_memalign(align, size) (_aligned_malloc(size, align))
+# define vlc_free(base)            (_aligned_free(base))
 #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
 static inline void *vlc_memalign(size_t align, size_t size)
 {



More information about the vlc-commits mailing list