v4l2: Add types compatiblity for other OS
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / ext / types-compat.h
1 /*
2  * Copyright (C) 2014 Collabora Ltd.
3  *     Author: Nicolas Dufresne <nicolas@ndufresne.ca>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  */
21
22 #include <glib.h>
23
24 #ifndef __TYPES_COMPAT_H__
25 #define __TYPES_COMPAT_H__
26
27 /* From linux/types.h */
28 #ifdef __CHECKER__
29 #define __bitwise__ __attribute__((bitwise))
30 #else
31 #define __bitwise__
32 #endif
33 #ifdef __CHECK_ENDIAN__
34 #define __bitwise __bitwise__
35 #else
36 #define __bitwise
37 #endif
38
39 #define __u64 guint64
40 #define __u32 guint32
41 #define __u16 guint16
42 #define __u8 guint8
43 #define __s64 gint64
44 #define __s32 gint32
45 #define __le32 guint32 __bitwise
46
47 #endif /* __TYPES_COMPAT_H__ */