Mercurial > libavutil.hg
changeset 135:ebc5bc38c1b5 libavutil
rename MEMALIGN_HACK to CONFIG_MEMALIGN_HACK, use common code in configure
author | mru |
---|---|
date | Tue, 14 Nov 2006 00:35:21 +0000 |
parents | c47a9bfc9437 |
children | 4ae092965c27 |
files | mem.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mem.c Sun Nov 12 18:49:36 2006 +0000 +++ b/mem.c Tue Nov 14 00:35:21 2006 +0000 @@ -47,7 +47,7 @@ void *av_malloc(unsigned int size) { void *ptr; -#ifdef MEMALIGN_HACK +#ifdef CONFIG_MEMALIGN_HACK long diff; #endif @@ -55,7 +55,7 @@ if(size > (INT_MAX-16) ) return NULL; -#ifdef MEMALIGN_HACK +#ifdef CONFIG_MEMALIGN_HACK ptr = malloc(size+16); if(!ptr) return ptr; @@ -103,7 +103,7 @@ */ void *av_realloc(void *ptr, unsigned int size) { -#ifdef MEMALIGN_HACK +#ifdef CONFIG_MEMALIGN_HACK int diff; #endif @@ -111,7 +111,7 @@ if(size > (INT_MAX-16) ) return NULL; -#ifdef MEMALIGN_HACK +#ifdef CONFIG_MEMALIGN_HACK //FIXME this isn't aligned correctly, though it probably isn't needed if(!ptr) return av_malloc(size); diff= ((char*)ptr)[-1]; @@ -130,7 +130,7 @@ { /* XXX: this test should not be needed on most libcs */ if (ptr) -#ifdef MEMALIGN_HACK +#ifdef CONFIG_MEMALIGN_HACK free(ptr - ((char*)ptr)[-1]); #else free(ptr);