annotate mpbswap.h @ 25957:0a3b2b2cc1c3

Implement test for system byteswap.h header file. The result of this check is required by libavutil library. If it is not defined the library would try to implement its own byte swapping routines in bswap.h . As the routines are with same names, if included, the system definition would replace the function names with the macros. The result can not be compiled and looks like this: # 42 "../libavutil/bswap.h" -static av_always_inline uint16_t bswap_16(uint16_t x) +static __attribute__((always_inline)) inline uint16_t (__extension__ ({ register unsigned short int __v, __x = (uint16_t x); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }))
author iive
date Tue, 12 Feb 2008 21:10:13 +0000
parents 2606b8c645de
children 4129c8cfa742
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21507
fa99b3d31d13 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents:
diff changeset
1 #ifndef MPBSWAP_H
fa99b3d31d13 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents:
diff changeset
2 #define MPBSWAP_H
fa99b3d31d13 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents:
diff changeset
3
fa99b3d31d13 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents:
diff changeset
4 #include "libavutil/bswap.h"
23639
2606b8c645de Hide our swab prototype when the system has swab since at least the
reimar
parents: 23638
diff changeset
5 #ifndef HAVE_SWAB
23638
a81e246e3b38 Make sure we always have a swab() prototype when we use it,
reimar
parents: 21557
diff changeset
6 void swab(const void *from, void *to, ssize_t n);
23639
2606b8c645de Hide our swab prototype when the system has swab since at least the
reimar
parents: 23638
diff changeset
7 #endif
21507
fa99b3d31d13 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents:
diff changeset
8
fa99b3d31d13 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents:
diff changeset
9 #endif /* MPBSWAP_H */