Debian Codegraph @

libs/pplib/pplib-src/src/ppconf.h

raw
1
2 #ifndef PP_CONF_H
3 #define PP_CONF_H
4
5 /*
6 Aux flags:
7 PPDLL -- indicates a part of a shared library
8 PPEXE -- indicates a host program using shared library functions
9 */
10
11 #if defined(_WIN32) || defined(_WIN64)
12 # ifdef PPDLL
13 # define PPAPI __declspec(dllexport)
14 # define PPDEF __declspec(dllexport)
15 # else
16 # ifdef PPEXE
17 # define PPAPI __declspec(dllimport)
18 # define PPDEF
19 # else
20 # define PPAPI
21 # define PPDEF
22 # endif
23 # endif
24 #else
25 # define PPAPI
26 # define PPDEF
27 #endif
28
29 /* platform vs integers */
30
31 #if defined(_WIN32) || defined(WIN32)
32 # ifdef _MSC_VER
33 # if defined(_M_64) || defined(_WIN64)
34 # define MSVC64
35 # else
36 # define MSVC32
37 # endif
38 # else
39 # if defined(__MINGW64__)
40 # define MINGW64
41 # else
42 # if defined(__MINGW32__)
43 # define MINGW32
44 # endif
45 # endif
46 # endif
47 #endif
48
49 #if defined(_WIN64) || defined(__MINGW32__)
50 # define PPINT64F "%I64d"
51 # define PPUINT64F "%I64u"
52 #else
53 # define PPINT64F "%lld"
54 # define PPUINT64F "%llu"
55 #endif
56
57 #if defined(MSVC64)
58 # define PPINT(N) N##I64
59 # define PPUINT(N) N##UI64
60 # define PPINTF PPINT64F
61 # define PPUINTF PPUINT64F
62 #elif defined(MINGW64)
63 # define PPINT(N) N##LL
64 # define PPUINT(N) N##ULL
65 # define PPINTF PPINT64F
66 # define PPUINTF PPUINT64F
67 #else // 32bit or sane 64bit (LP64, where long is long indeed)
68 # define PPINT(N) N##L
69 # define PPUINT(N) N##UL
70 # define PPINTF "%ld"
71 # define PPUINTF "%lu"
72 #endif
73
74 #define PPSIZEF PPUINTF
75
76 #endif