Commit 206a9749 authored by Felix Paul Kühne's avatar Felix Paul Kühne

vlc_common.h: remove legacy code for Darwin < 10 releases

parent c589758c
......@@ -825,26 +825,6 @@ VLC_API bool vlc_ureduce( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t )
#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)
{
long diff;
void *ptr;
ptr = malloc(size+align);
if(!ptr)
return ptr;
diff = ((-(long)ptr - 1)&(align-1)) + 1;
ptr = (char*)ptr + diff;
((char*)ptr)[-1]= diff;
return ptr;
}
static void vlc_free(void *ptr)
{
if (ptr)
free((char*)ptr - ((char*)ptr)[-1]);
}
#else
static inline void *vlc_memalign(size_t align, size_t size)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment