MP4v2

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