Revision 86816692

View differences:

libavutil/intreadwrite.h
20 20
#define AVUTIL_INTREADWRITE_H
21 21

  
22 22
#include <stdint.h>
23
#include "config.h"
23
#include "libavutil/avconfig.h"
24 24
#include "attributes.h"
25 25
#include "bswap.h"
26 26

  
......
52 52
 * as inline functions.
53 53
 */
54 54

  
55
#ifdef HAVE_AV_CONFIG_H
56

  
57
#include "config.h"
58

  
55 59
#if   ARCH_ARM
56 60
#   include "arm/intreadwrite.h"
57 61
#elif ARCH_AVR32
......
66 70
#   include "x86/intreadwrite.h"
67 71
#endif
68 72

  
73
#endif /* HAVE_AV_CONFIG_H */
74

  
69 75
/*
70 76
 * Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers.
71 77
 */
72 78

  
73
#if HAVE_BIGENDIAN
79
#if AV_HAVE_BIGENDIAN
74 80

  
75 81
#   if    defined(AV_RN16) && !defined(AV_RB16)
76 82
#       define AV_RB16(p) AV_RN16(p)
......
120 126
#       define AV_WN64(p, v) AV_WB64(p, v)
121 127
#   endif
122 128

  
123
#else /* HAVE_BIGENDIAN */
129
#else /* AV_HAVE_BIGENDIAN */
124 130

  
125 131
#   if    defined(AV_RN16) && !defined(AV_RL16)
126 132
#       define AV_RL16(p) AV_RN16(p)
......
170 176
#       define AV_WN64(p, v) AV_WL64(p, v)
171 177
#   endif
172 178

  
173
#endif /* !HAVE_BIGENDIAN */
179
#endif /* !AV_HAVE_BIGENDIAN */
174 180

  
175 181
/*
176 182
 * Define AV_[RW]N helper macros to simplify definitions not provided
177 183
 * by per-arch headers.
178 184
 */
179 185

  
180
#if   HAVE_ATTRIBUTE_PACKED
186
#if defined(__GNUC__) && !defined(__TI_COMPILER_VERSION__)
181 187

  
182 188
union unaligned_64 { uint64_t l; } __attribute__((packed)) av_alias;
183 189
union unaligned_32 { uint32_t l; } __attribute__((packed)) av_alias;
......
191 197
#   define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
192 198
#   define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v))
193 199

  
194
#elif HAVE_FAST_UNALIGNED
200
#elif AV_HAVE_FAST_UNALIGNED
195 201

  
196 202
#   define AV_RN(s, p) (((const av_alias##s*)(p))->u##s)
197 203
#   define AV_WN(s, p, v) (((av_alias##s*)(p))->u##s = (v))
......
302 308
    } while(0)
303 309
#endif
304 310

  
305
#if HAVE_BIGENDIAN
311
#if AV_HAVE_BIGENDIAN
306 312
#   define AV_RN(s, p)    AV_RB##s(p)
307 313
#   define AV_WN(s, p, v) AV_WB##s(p, v)
308 314
#else
......
336 342
#   define AV_WN64(p, v) AV_WN(64, p, v)
337 343
#endif
338 344

  
339
#if HAVE_BIGENDIAN
345
#if AV_HAVE_BIGENDIAN
340 346
#   define AV_RB(s, p)    AV_RN##s(p)
341 347
#   define AV_WB(s, p, v) AV_WN##s(p, v)
342 348
#   define AV_RL(s, p)    av_bswap##s(AV_RN##s(p))

Also available in: Unified diff