blob: 7e8685a5423fb5ada9e01d555adf5da6d231f389 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
#ifndef MP4V2_PLATFORM_WIN32_H
#define MP4V2_PLATFORM_WIN32_H
///////////////////////////////////////////////////////////////////////////////
// mingw needs this to enable some newer 64-bit functions
#ifdef __MINGW32__
# undef __MSVCRT_VERSION__
# define __MSVCRT_VERSION__ 0x800
#endif
// set minimum win32 API requirement to Windows 2000 or higher
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0500
#endif
#ifndef WINVER
# define WINVER 0x0500
#endif
///////////////////////////////////////////////////////////////////////////////
#include "libplatform/platform_base.h"
#include <mp4v2/mp4v2.h>
///////////////////////////////////////////////////////////////////////////////
namespace mp4v2 { namespace platform {
using namespace std;
using ::int8_t;
using ::int16_t;
using ::int32_t;
using ::int64_t;
using ::uint8_t;
using ::uint16_t;
using ::uint32_t;
using ::uint64_t;
}} // namespace mp4v2::platform
///////////////////////////////////////////////////////////////////////////////
// fprintf macros for unsigned types - mingw32 is a good source if more needed
#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
#define PRId64 "I64d"
#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
#define PRIu64 "I64u"
#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
#define PRIx64 "I64x"
///////////////////////////////////////////////////////////////////////////////
// some macros for constant expressions
#define INT8_C(x) x
#define INT16_C(x) x
#define INT32_C(x) x ## L
#define INT64_C(x) x ## LL
#define UINT8_C(x) x
#define UINT16_C(x) x
#define UINT32_C(x) x ## UL
#define UINT64_C(x) x ## ULL
///////////////////////////////////////////////////////////////////////////////
#ifdef min
# undef min
#endif
#ifdef max
# undef max
#endif
///////////////////////////////////////////////////////////////////////////////
#define snprintf(s,n,...) _snprintf(s,n,__VA_ARGS__)
#define strcasecmp(s1,s2) _stricmp(s1,s2)
#define strdup(s) _strdup(s)
///////////////////////////////////////////////////////////////////////////////
// macro clashes with symbol
#undef LC_NONE
#endif // MP4V2_PLATFORM_WIN32_H
|