eglcompiler.h revision 897cb8950ae14ffe7029b1daf16113ff62ce0dfe
1#ifndef EGLCOMPILER_INCLUDED
2#define EGLCOMPILER_INCLUDED
3
4
5/**
6 * Get standard integer types
7 */
8#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
9#  include <stdint.h>
10#elif defined(_MSC_VER)
11   typedef __int8             int8_t;
12   typedef unsigned __int8    uint8_t;
13   typedef __int16            int16_t;
14   typedef unsigned __int16   uint16_t;
15#  ifndef __eglplatform_h_
16     typedef __int32            int32_t;
17#  endif
18   typedef unsigned __int32   uint32_t;
19   typedef __int64            int64_t;
20   typedef unsigned __int64   uint64_t;
21
22#  if defined(_WIN64)
23     typedef __int64            intptr_t;
24     typedef unsigned __int64   uintptr_t;
25#  else
26     typedef __int32            intptr_t;
27     typedef unsigned __int32   uintptr_t;
28#  endif
29
30#  define INT64_C(__val) __val##i64
31#  define UINT64_C(__val) __val##ui64
32#else
33/* hope the best instead of adding a bunch of ifdef's */
34#  include <stdint.h>
35#endif
36
37
38/**
39 * Function inlining
40 */
41#if defined(__GNUC__)
42#  define INLINE __inline__
43#elif defined(__MSC__)
44#  define INLINE __inline
45#elif defined(_MSC_VER)
46#  define INLINE __inline
47#elif defined(__ICL)
48#  define INLINE __inline
49#elif defined(__INTEL_COMPILER)
50#  define INLINE inline
51#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
52#  define INLINE __inline
53#elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
54#  define INLINE inline
55#  define __inline inline
56#  define __inline__ inline
57#elif (__STDC_VERSION__ >= 199901L) /* C99 */
58#  define INLINE inline
59#else
60#  define INLINE
61#endif
62
63
64/**
65 * Function visibility
66 */
67#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
68#  define PUBLIC __attribute__((visibility("default")))
69#else
70#  define PUBLIC
71#endif
72
73
74#endif /* EGLCOMPILER_INCLUDED */
75