libUPnP  1.8.0
UpnpGlobal.h
Go to the documentation of this file.
1 
2 
3 #ifndef UPNPGLOBAL_H
4 #define UPNPGLOBAL_H
5 
6 
14 #if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
15  #if defined __GNUC__
16  #warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
17  #else
18  #error libupnp requires largefile mode - use AC_SYS_LARGEFILE
19  #endif
20 #endif
21 
22 
23 #ifdef WIN32
24  /*
25  * EXPORT_SPEC
26  */
27  #ifdef UPNP_STATIC_LIB
28  #define EXPORT_SPEC
29  #else /* UPNP_STATIC_LIB */
30  #ifdef LIBUPNP_EXPORTS
31 
33  #define EXPORT_SPEC __declspec(dllexport)
34  #else /* LIBUPNP_EXPORTS */
35  #define EXPORT_SPEC __declspec(dllimport)
36  #endif /* LIBUPNP_EXPORTS */
37  #endif /* UPNP_STATIC_LIB */
38 
39 
40  /*
41  * UPNP_INLINE
42  * PRId64
43  * PRIzu
44  */
45  #ifdef UPNP_USE_MSVCPP
46  /* define some things the M$ VC++ doesn't know */
47  #define UPNP_INLINE
48  typedef __int64 int64_t;
49  #define PRId64 "I64d"
50  #define PRIzu "lu"
51  #endif /* UPNP_USE_MSVCPP */
52 
53 
54  #ifdef UPNP_USE_BCBPP
55  /* define some things Borland Builder doesn't know */
56  #define UPNP_INLINE inline
57  typedef __int64 int64_t;
58  #warning The Borland C compiler is probably broken on PRId64,
59  #warning please someone provide a proper fix here
60  #define PRId64 "I64d"
61  #define PRIzu "zu"
62  #endif /* UPNP_USE_BCBPP */
63 
64 
65  #ifdef __GNUC__
66  #define UPNP_INLINE inline
67 
68  /* Note with PRIzu that in the case of Mingw32, it's the MS C
69  * runtime printf which ends up getting called, not the glibc
70  * printf, so it genuinely doesn't have "zu"
71  */
72  #define PRIzu "lu"
73  #endif /* __GNUC__ */
74 #else
75 
82  #define EXPORT_SPEC
83 
91  #define UPNP_INLINE inline
92 
98  /* #define PRId64 PRId64 */
99 
107  #define PRIzu "zu"
108 #endif
109 
110 
111 /*
112  * Defining this macro here gives some interesting information about unused
113  * functions in the code. Of course, this should never go uncommented on a
114  * release.
115  */
116 /*#define inline*/
117 
118 
119 #endif /* UPNPGLOBAL_H */
120