2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
11 * The build should have generated this file. It just contains a define for
12 * CIN_DLL on a DLL build, or nothing for a static build. If you are importing
13 * Cinnamon into another project, you can simply remove this include.
15 #include "cin_conf.inc"
17 #if ( defined _WIN32 ) && !( defined __GNUC__ )
19 /* For a DLL build, use dllimport and dllexport. */
24 /* TODO: Apparently __export is the right thing here with Watcom? */
25 #define CIN_DLL_EXPORT(X) __declspec(dllexport) X
27 #else /* CIN_INTERNAL */
29 #define CIN_DLL_EXPORT(X) __declspec(dllimport) X
31 #endif /* CIN_INTERNAL */
35 #define CIN_DLL_EXPORT(X) X
39 /* Use the C calling convention for all exported symbols. */
40 #define CIN_EXPORT(X) CIN_DLL_EXPORT(X) __cdecl
42 /* We want to use fastcall for non-Watcom on internal functions. */
45 #define CIN_PRIVATE(X) X
49 #define CIN_PRIVATE(X) X __fastcall
53 #elif defined __GNUC__ /* GCC or not WIN32 */
56 /* Use the C calling convention for all exported symbols, with protected visibility. */
57 #define CIN_EXPORT(X) X __attribute__((visibility ("default"), cdecl, used))
58 /* Internal functions have hidden visibility. */
59 #define CIN_PRIVATE(X) X __attribute__((visibility("hidden"), fastcall))
61 #define CIN_EXPORT(X) X __attribute__((visibility ("default")))
62 #define CIN_PRIVATE(X) X __attribute__((visibility("hidden")))
65 #else /* not WIN32 and not GCC */
67 #define CIN_EXPORT(X) X
68 #define CIN_PRIVATE(X) X
74 #define CIN_PRIVATE_PURE(X) CIN_PRIVATE(X) __attribute__((const))
76 #elif defined _MSC_VER
78 #define CIN_PRIVATE_PURE(X) __declspec(noalias) CIN_PRIVATE(X)
82 #define CIN_PRIVATE_PURE(X) CIN_PRIVATE(X)
86 #endif /* CIN_EXPORT_H */