libUPnP 1.8.4
UpnpGlobal.h
Go to the documentation of this file.
1#ifndef UPNPGLOBAL_H
2#define UPNPGLOBAL_H
3
10#if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
11 #if defined __GNUC__
12 #warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
13 #else
14 #error libupnp requires largefile mode - use AC_SYS_LARGEFILE
15 #endif
16#endif
17
18#ifdef _WIN32
19 /*
20 * EXPORT_SPEC
21 */
22 #ifdef UPNP_STATIC_LIB
23 #define EXPORT_SPEC
24 #else /* UPNP_STATIC_LIB */
25 #ifdef LIBUPNP_EXPORTS
28 #define EXPORT_SPEC __declspec(dllexport)
29 #else /* LIBUPNP_EXPORTS */
30 #define EXPORT_SPEC __declspec(dllimport)
31 #endif /* LIBUPNP_EXPORTS */
32 #endif /* UPNP_STATIC_LIB */
33
34 /*
35 * UPNP_INLINE
36 * PRId64
37 * PRIzd
38 * PRIzu
39 * PRIzx
40 */
41 #ifdef UPNP_USE_MSVCPP
42 /* define some things the M$ VC++ doesn't know */
43 #define UPNP_INLINE _inline
44 typedef __int64 int64_t;
45 #define PRId64 "I64d"
46 #define PRIzd "ld"
47 #define PRIzu "lu"
48 #define PRIzx "lx"
49 #endif /* UPNP_USE_MSVCPP */
50
51 #ifdef UPNP_USE_BCBPP
52 /* define some things Borland Builder doesn't know */
53/* inconsistency between the httpparser.h and the .c file definition.
54 Header is missing UPNP_INLINE prefix, so compiler is confused ...
55 better remove it
56 #define UPNP_INLINE inline
57 */
58 #define UPNP_INLINE
59 typedef __int64 int64_t;
60 #warning The Borland C compiler is probably broken on PRId64,
61 #warning please someone provide a proper fix here
62 #define PRId64 "Ld"
63 #define PRIzd "ld"
64 #define PRIzu "lu"
65 #define PRIzx "lx"
66 #define SCNd64 "Ld"
67 #endif /* UPNP_USE_BCBPP */
68
69 #ifdef __GNUC__
70 #define UPNP_INLINE inline
71 /* Note with PRIzu that in the case of Mingw32, it's the MS C
72 * runtime printf which ends up getting called, not the glibc
73 * printf, so it genuinely doesn't have "zu"
74 */
75 #define PRIzd "ld"
76 #define PRIzu "lu"
77 #define PRIzx "lx"
78 #endif /* __GNUC__ */
79#else
87 #define EXPORT_SPEC
88
96 #ifdef __STRICT_ANSI__
97 #define UPNP_INLINE __inline__
98 #else
99 #define UPNP_INLINE inline
100 #endif
101
107 /* #define PRId64 PRId64 */
108
116 #define PRIzd "zd"
117 #define PRIzu "zu"
118 #define PRIzx "zx"
119#endif
120
121/*
122 * Defining this macro here gives some interesting information about unused
123 * functions in the code. Of course, this should never go uncommented on a
124 * release.
125 */
126/*#define inline*/
127
128#endif /* UPNPGLOBAL_H */