aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/mem.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-11-14 00:35:21 +0000
committerMåns Rullgård <mans@mansr.com>2006-11-14 00:35:21 +0000
commit9ddbcae66737c936239a9dd3e51da0247bdbfb3e (patch)
tree441b613ab3b44330d7ddf7dbb7c3b9150a76cd7d /libavutil/mem.c
parent441611189316544b81c14eea2a5336e48a674fb9 (diff)
downloadffmpeg-9ddbcae66737c936239a9dd3e51da0247bdbfb3e.tar.gz
rename MEMALIGN_HACK to CONFIG_MEMALIGN_HACK, use common code in configure
Originally committed as revision 7025 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/mem.c')
-rw-r--r--libavutil/mem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c
index 418e85f6bf..f43fb54207 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -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 @@ void *av_malloc(unsigned int size)
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_malloc(unsigned int size)
*/
void *av_realloc(void *ptr, unsigned int size)
{
-#ifdef MEMALIGN_HACK
+#ifdef CONFIG_MEMALIGN_HACK
int diff;
#endif
@@ -111,7 +111,7 @@ void *av_realloc(void *ptr, unsigned int size)
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 @@ void av_free(void *ptr)
{
/* 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);