~ubuntu-branches/ubuntu/utopic/ffmpeg-debian/utopic

« back to all changes in this revision

Viewing changes to libavutil/mem.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 09:20:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120092053-izz63p40hc98qfgp
Tags: 3:0.svn20090119-1ubuntu1
* merge from debian. LP: #318501
* new version fixes CVE-2008-3230, LP: #253767

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#ifndef AVUTIL_MEM_H
27
27
#define AVUTIL_MEM_H
28
28
 
 
29
#include "common.h"
 
30
 
29
31
#if defined(__ICC) || defined(__SUNPRO_C)
30
32
    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
31
33
    #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
35
37
#elif defined(_MSC_VER)
36
38
    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
37
39
    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v
38
 
#elif defined(HAVE_INLINE_ASM)
 
40
#elif HAVE_INLINE_ASM
39
41
    #error The asm code needs alignment, but we do not know how to do it for this compiler.
40
42
#else
41
43
    #define DECLARE_ALIGNED(n,t,v)      t v
42
44
    #define DECLARE_ASM_CONST(n,t,v)    static const t v
43
45
#endif
44
46
 
45
 
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
 
47
#if AV_GCC_VERSION_AT_LEAST(3,1)
46
48
    #define av_malloc_attrib __attribute__((__malloc__))
47
49
#else
48
50
    #define av_malloc_attrib
49
51
#endif
50
52
 
51
 
#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
 
53
#if (!defined(__ICC) || __ICC > 1100) && AV_GCC_VERSION_AT_LEAST(4,3)
52
54
    #define av_alloc_size(n) __attribute__((alloc_size(n)))
53
55
#else
54
56
    #define av_alloc_size(n)