diff mem.h @ 590:e9d89a89561a libavutil

Use AV_GCC_VERSION_AT_LEAST() to simplify gcc version checks.
author cehoyos
date Sat, 20 Dec 2008 17:33:35 +0000
parents 5e52a169969c
children 5fe37f8a1017
line wrap: on
line diff
--- a/mem.h	Wed Dec 17 20:04:39 2008 +0000
+++ b/mem.h	Sat Dec 20 17:33:35 2008 +0000
@@ -26,6 +26,8 @@
 #ifndef AVUTIL_MEM_H
 #define AVUTIL_MEM_H
 
+#include "common.h"
+
 #if defined(__ICC) || defined(__SUNPRO_C)
     #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
     #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
@@ -42,13 +44,13 @@
     #define DECLARE_ASM_CONST(n,t,v)    static const t v
 #endif
 
-#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
+#if AV_GCC_VERSION_AT_LEAST(3,1)
     #define av_malloc_attrib __attribute__((__malloc__))
 #else
     #define av_malloc_attrib
 #endif
 
-#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
+#if AV_GCC_VERSION_AT_LEAST(4,3)
     #define av_alloc_size(n) __attribute__((alloc_size(n)))
 #else
     #define av_alloc_size(n)