Commit 0b8539f2 authored by Christophe Massiot's avatar Christophe Massiot

* ALL: Add consistent multiple inclusion guards for all header files, patch

   courtesy of Diego Biurrun
parent 7f592f04
......@@ -20,8 +20,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef ALPHA_ASM_H
#define ALPHA_ASM_H
#ifndef LIBMPEG2_ALPHA_ASM_H
#define LIBMPEG2_ALPHA_ASM_H
#include <inttypes.h>
......@@ -178,4 +178,4 @@ struct unaligned_long { uint64_t l; } __attribute__((packed));
#error "Unknown compiler!"
#endif
#endif /* ALPHA_ASM_H */
#endif /* LIBMPEG2_ALPHA_ASM_H */
......@@ -21,6 +21,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_ATTRIBUTES_H
#define LIBMPEG2_ATTRIBUTES_H
/* use gcc attribs to align critical data structures */
#ifdef ATTRIBUTE_ALIGNED_MAX
#define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
......@@ -35,3 +38,5 @@
#define likely(x) (x)
#define unlikely(x) (x)
#endif
#endif /* LIBMPEG2_ATTRIBUTES_H */
......@@ -21,6 +21,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_MMX_H
#define LIBMPEG2_MMX_H
/*
* The type of an value that fits in an MMX register (note that long
* long constant values MUST be suffixed by LL and unsigned long long
......@@ -261,3 +264,5 @@ typedef union {
#define pshufw_r2r(regs,regd,imm) mmx_r2ri(pshufw, regs, regd, imm)
#define sfence() __asm__ __volatile__ ("sfence\n\t")
#endif /* LIBMPEG2_MMX_H */
......@@ -21,8 +21,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MPEG2_H
#define MPEG2_H
#ifndef LIBMPEG2_MPEG2_H
#define LIBMPEG2_MPEG2_H
#define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
#define MPEG2_RELEASE MPEG2_VERSION (0, 5, 0) /* 0.5.0 */
......@@ -199,4 +199,4 @@ void mpeg2_free (void * buf);
void mpeg2_malloc_hooks (void * malloc (unsigned, mpeg2_alloc_t),
int free (void *));
#endif /* MPEG2_H */
#endif /* LIBMPEG2_MPEG2_H */
......@@ -21,8 +21,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MPEG2CONVERT_H
#define MPEG2CONVERT_H
#ifndef LIBMPEG2_MPEG2CONVERT_H
#define LIBMPEG2_MPEG2CONVERT_H
mpeg2_convert_t mpeg2convert_rgb32;
mpeg2_convert_t mpeg2convert_rgb24;
......@@ -45,4 +45,4 @@ mpeg2_convert_t * mpeg2convert_rgb (mpeg2convert_rgb_order_t order,
mpeg2_convert_t mpeg2convert_uyvy;
#endif /* MPEG2CONVERT_H */
#endif /* LIBMPEG2_MPEG2CONVERT_H */
......@@ -20,6 +20,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_SSE_H
#define LIBMPEG2_SSE_H
typedef union {
float sf[4]; /* Single-precision (32-bit) value */
} ATTR_ALIGN(16) sse_t; /* On a 16 byte (128-bit) boundary */
......@@ -254,3 +257,4 @@ typedef union {
: /* nothing */ \
: "X" (mem))
#endif /* LIBMPEG2_SSE_H */
......@@ -21,6 +21,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_TENDRA_H
#define LIBMPEG2_TENDRA_H
#pragma TenDRA begin
#pragma TenDRA longlong type warning
......@@ -33,3 +36,5 @@
int TenDRA;
#endif /* TenDRA_check */
#endif /* LIBMPEG2_TENDRA_H */
......@@ -21,6 +21,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_VIDEO_OUT_H
#define LIBMPEG2_VIDEO_OUT_H
struct mpeg2_sequence_s;
struct mpeg2_convert_init_s;
typedef struct {
......@@ -56,3 +59,5 @@ void vo_accel (uint32_t accel);
/* return NULL terminated array of all drivers */
vo_driver_t const * vo_drivers (void);
#endif /* LIBMPEG2_VIDEO_OUT_H */
......@@ -41,6 +41,9 @@
* the assembler to keep the binary from becoming tainted.
*/
#ifndef LIBMPEG2_VIS_H
#define LIBMPEG2_VIS_H
#define vis_opc_base ((0x1 << 31) | (0x36 << 19))
#define vis_opf(X) ((X) << 5)
#define vis_sreg(X) (X)
......@@ -326,3 +329,5 @@ static inline void vis_alignaddrl_g0(void *_ptr)
/* Pixel component distance. */
#define vis_pdist(rs1,rs2,rd) vis_dd2d(0x3e, rs1, rs2, rd)
#endif /* LIBMPEG2_VIS_H */
......@@ -21,6 +21,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_MPEG2_INTERNAL_H
#define LIBMPEG2_MPEG2_INTERNAL_H
#define STATE_INTERNAL_NORETURN ((mpeg2_state_t)-1)
/* macroblock modes */
......@@ -304,3 +307,5 @@ extern mpeg2_mc_t mpeg2_mc_3dnow;
extern mpeg2_mc_t mpeg2_mc_altivec;
extern mpeg2_mc_t mpeg2_mc_alpha;
extern mpeg2_mc_t mpeg2_mc_vis;
#endif /* LIBMPEG2_MPEG2_INTERNAL_H */
......@@ -21,6 +21,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_VLC_H
#define LIBMPEG2_VLC_H
#define GETWORD(bit_buf,shift,bit_ptr) \
do { \
bit_buf |= ((bit_ptr[0] << 8) | bit_ptr[1]) << (shift); \
......@@ -427,3 +430,5 @@ static const MBAtab MBA_11 [] = {
{ 7, 7}, { 7, 7}, { 7, 7}, { 7, 7},
{ 7, 7}, { 7, 7}, { 7, 7}, { 7, 7}
};
#endif /* LIBMPEG2_VLC_H */
......@@ -21,8 +21,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __LINUX_HW_BES_H
#define __LINUX_HW_BES_H
#ifndef LIBMPEG2_HW_BES_H
#define LIBMPEG2_HW_BES_H
typedef struct {
uint32_t card_type;
......@@ -47,4 +47,4 @@ typedef struct {
#define MGA_G200 0x1234
#define MGA_G400 0x5678
#endif
#endif /* LIBMPEG2_HW_BES_H */
......@@ -21,6 +21,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_GETTIMEOFDAY_H
#define LIBMPEG2_GETTIMEOFDAY_H
#if defined(HAVE_STRUCT_TIMEVAL) && defined(HAVE_GETTIMEOFDAY)
#if defined(TIME_WITH_SYS_TIME)
#include <sys/time.h>
......@@ -45,3 +48,5 @@ void gettimeofday (struct timeval * tp, void * dummy);
#else
#undef HAVE_GETTIMEOFDAY
#endif
#endif /* LIBMPEG2_GETTIMEOFDAY_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment