libUPnP  1.6.20
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
26 
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  #define UPNP_INLINE inline
54  typedef __int64 int64_t;
55  #warning The Borland C compiler is probably broken on PRId64,
56  #warning please someone provide a proper fix here
57  #define PRId64 "I64d"
58  #define PRIzd "zd"
59  #define PRIzu "zu"
60  #define PRIzx "zx"
61  #endif /* UPNP_USE_BCBPP */
62 
63  #ifdef __GNUC__
64  #define UPNP_INLINE inline
65  /* Note with PRIzu that in the case of Mingw32, it's the MS C
66  * runtime printf which ends up getting called, not the glibc
67  * printf, so it genuinely doesn't have "zu"
68  */
69  #define PRIzd "ld"
70  #define PRIzu "lu"
71  #define PRIzx "lx"
72  #endif /* __GNUC__ */
73 #else
74 
81  #define EXPORT_SPEC
82 
90  #ifdef __STRICT_ANSI__
91  #define UPNP_INLINE __inline__
92  #else
93  #define UPNP_INLINE inline
94  #endif
95 
101  /* #define PRId64 PRId64 */
102 
110  #define PRIzd "zd"
111  #define PRIzu "zu"
112  #define PRIzx "zx"
113 #endif
114 
115 /*
116  * Defining this macro here gives some interesting information about unused
117  * functions in the code. Of course, this should never go uncommented on a
118  * release.
119  */
120 /*#define inline*/
121 
122 #endif /* UPNPGLOBAL_H */