Browse Source

Make DECLARE_ALIGNED macros work with external array specifiers

The macro implementation might need the name of the variable being
declared for compiler-specific syntax.  Moving array specifiers outside
the macro invocation allows this to work.

Originally committed as revision 21363 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Måns Rullgård 15 years ago
parent
commit
8a24e98d50
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavutil/mem.h

+ 3
- 3
libavutil/mem.h View File

@@ -29,11 +29,11 @@
#include "common.h" #include "common.h"


#if defined(__ICC) || defined(__SUNPRO_C) #if defined(__ICC) || defined(__SUNPRO_C)
#define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v
#elif defined(__GNUC__) #elif defined(__GNUC__)
#define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
#define DECLARE_ASM_CONST(n,t,v) static const t v attribute_used __attribute__ ((aligned (n)))
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_CONST(n,t,v) static const t attribute_used __attribute__ ((aligned (n))) v
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v


Loading…
Cancel
Save