Subversion Repositories eduke32

Rev

Rev 4319 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4319 Rev 6006
Line 13... Line 13...
13
#define VPX_VPX_INTEGER_H_
13
#define VPX_VPX_INTEGER_H_
14
14
15
/* get ptrdiff_t, size_t, wchar_t, NULL */
15
/* get ptrdiff_t, size_t, wchar_t, NULL */
16
#include <stddef.h>
16
#include <stddef.h>
17
17
-
 
18
#if defined(_MSC_VER)
-
 
19
#define VPX_FORCE_INLINE __forceinline
-
 
20
#define VPX_INLINE __inline
-
 
21
#else
-
 
22
#define VPX_FORCE_INLINE __inline__ __attribute__(always_inline)
-
 
23
// TODO(jbb): Allow a way to force inline off for older compilers.
-
 
24
#define VPX_INLINE inline
-
 
25
#endif
-
 
26
18
#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
27
#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
19
typedef signed char  int8_t;
28
typedef signed char  int8_t;
20
typedef signed short int16_t;
29
typedef signed short int16_t;
21
typedef signed int   int32_t;
30
typedef signed int   int32_t;
22
31
Line 26... Line 35...
26
35
27
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
36
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
28
typedef signed __int64   int64_t;
37
typedef signed __int64   int64_t;
29
typedef unsigned __int64 uint64_t;
38
typedef unsigned __int64 uint64_t;
30
#define INT64_MAX _I64_MAX
39
#define INT64_MAX _I64_MAX
-
 
40
#define INT32_MAX _I32_MAX
-
 
41
#define INT32_MIN _I32_MIN
31
#define INT16_MAX _I16_MAX
42
#define INT16_MAX _I16_MAX
32
#define INT16_MIN _I16_MIN
43
#define INT16_MIN _I16_MIN
33
#endif
44
#endif
34
45
35
#ifndef _UINTPTR_T_DEFINED
46
#ifndef _UINTPTR_T_DEFINED
Line 38... Line 49...
38
49
39
#else
50
#else
40
51
41
/* Most platforms have the C99 standard integer types. */
52
/* Most platforms have the C99 standard integer types. */
42
53
-
 
54
#if defined(__cplusplus)
43
#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
55
# if !defined(__STDC_FORMAT_MACROS)
44
#define __STDC_FORMAT_MACROS
56
#  define __STDC_FORMAT_MACROS
45
#endif
57
# endif
-
 
58
# if !defined(__STDC_LIMIT_MACROS)
-
 
59
#  define __STDC_LIMIT_MACROS
-
 
60
# endif
-
 
61
#endif  // __cplusplus
-
 
62
46
#include <stdint.h>
63
#include <stdint.h>
47
64
48
#endif
65
#endif
49
66
50
/* VS2010 defines stdint.h, but not inttypes.h */
67
/* VS2010 defines stdint.h, but not inttypes.h */
51
#if defined(_MSC_VER)
68
#if defined(_MSC_VER) && _MSC_VER < 1800
52
#define PRId64 "I64d"
69
#define PRId64 "I64d"
53
#else
70
#else
54
#include <inttypes.h>
71
#include <inttypes.h>
55
#endif
72
#endif
56
73