| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
#ifndef _GADGET_CONFIG_H_ |
|---|
| 28 |
#define _GADGET_CONFIG_H_ |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
#include <gadget/gadgetDefines.h> |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
#undef PACKAGE_BUGREPORT |
|---|
| 45 |
#undef PACKAGE_NAME |
|---|
| 46 |
#undef PACKAGE_STRING |
|---|
| 47 |
#undef PACKAGE_TARNAME |
|---|
| 48 |
#undef PACKAGE_VERSION |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
#if ! defined(GADGET_DEBUG) && (defined(JUGGLER_DEBUG) || defined(_DEBUG)) |
|---|
| 55 |
# define GADGET_DEBUG |
|---|
| 56 |
|
|---|
| 57 |
#elif defined(JUGGLER_OPT) && ! defined(GADGET_OPT) |
|---|
| 58 |
# define GADGET_OPT |
|---|
| 59 |
#endif |
|---|
| 60 |
|
|---|
| 61 |
#if defined(WIN32) || defined(WIN64) |
|---|
| 62 |
|
|---|
| 63 |
#define WIN32_LEAN_AND_MEAN |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
#pragma warning(disable:4786) |
|---|
| 67 |
|
|---|
| 68 |
#include <windows.h> |
|---|
| 69 |
|
|---|
| 70 |
#endif |
|---|
| 71 |
|
|---|
| 72 |
#if !defined(WIN32) && !defined(WIN64) \ |
|---|
| 73 |
&& defined(__GNUC__) && __GNUC__ >= 4 \ |
|---|
| 74 |
&& !defined(GADGET_HAVE_GCC_VISIBILITY) |
|---|
| 75 |
# define GADGET_HAVE_GCC_VISIBILITY |
|---|
| 76 |
#endif |
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
#if defined(WIN32) || defined(WIN64) |
|---|
| 86 |
|
|---|
| 87 |
# if defined(__GNUC__) |
|---|
| 88 |
# undef _declspec |
|---|
| 89 |
# define _declspec(x) __declspec(x) |
|---|
| 90 |
# endif |
|---|
| 91 |
|
|---|
| 92 |
# define GADGET_EXPORT(__type) _declspec(dllexport) __type |
|---|
| 93 |
# define GADGET_EXPORT_CLASS _declspec(dllexport) |
|---|
| 94 |
# define GADGET_EXPORT_DATA(__type) _declspec(dllexport) __type |
|---|
| 95 |
# define GADGET_IMPORT(__type) _declspec(dllimport) __type |
|---|
| 96 |
# define GADGET_IMPORT_DATA(__type) _declspec(dllimport) __type |
|---|
| 97 |
# define GADGET_IMPORT_CLASS _declspec(dllimport) |
|---|
| 98 |
|
|---|
| 99 |
# define GADGET_EXTERN(__type) extern _declspec(dllexport) __type |
|---|
| 100 |
# define GADGET_IMPLEMENT(__type) _declspec(dllexport) __type |
|---|
| 101 |
# define GADGET_EXTERN_DATA(__type) extern _declspec(dllexport) __type |
|---|
| 102 |
# define GADGET_IMPLEMENT_DATA(__type) _declspec(dllexport) __type |
|---|
| 103 |
|
|---|
| 104 |
# define GADGET_CALLBACK |
|---|
| 105 |
# define GADGET_CALLBACK_DECL |
|---|
| 106 |
# define GADGET_STATIC_CALLBACK(__x) static __x |
|---|
| 107 |
|
|---|
| 108 |
#elif defined(GADGET_HAVE_GCC_VISIBILITY) |
|---|
| 109 |
|
|---|
| 110 |
# define GADGET_EXPORT(__type) __attribute__ ((visibility("default"))) __type |
|---|
| 111 |
# define GADGET_EXPORT_CLASS __attribute__ ((visibility("default"))) |
|---|
| 112 |
# define GADGET_EXPORT_DATA(__type) __attribute__ ((visibility("default"))) __type |
|---|
| 113 |
# define GADGET_IMPORT(__type) __type |
|---|
| 114 |
# define GADGET_IMPORT_DATA(__type) __type |
|---|
| 115 |
# define GADGET_IMPORT_CLASS |
|---|
| 116 |
|
|---|
| 117 |
# define GADGET_EXTERN(__type) extern __attribute__ ((visibility("default"))) __type |
|---|
| 118 |
# define GADGET_IMPLEMENT(__type) __attribute__ ((visibility("default"))) __type |
|---|
| 119 |
# define GADGET_EXTERN_DATA(__type) extern __attribute__ ((visibility("default"))) __type |
|---|
| 120 |
# define GADGET_IMPLEMENT_DATA(__type) __attribute__ ((visibility("default"))) __type |
|---|
| 121 |
|
|---|
| 122 |
# define GADGET_CALLBACK |
|---|
| 123 |
# define GADGET_CALLBACK_DECL |
|---|
| 124 |
# define GADGET_STATIC_CALLBACK(__x) static __x |
|---|
| 125 |
|
|---|
| 126 |
#else |
|---|
| 127 |
|
|---|
| 128 |
# define GADGET_EXPORT(__type) __type |
|---|
| 129 |
# define GADGET_EXPORT_CLASS |
|---|
| 130 |
# define GADGET_EXPORT_DATA(__type) __type |
|---|
| 131 |
# define GADGET_IMPORT(__type) __type |
|---|
| 132 |
# define GADGET_IMPORT_CLASS |
|---|
| 133 |
# define GADGET_IMPORT_DATA(__type) __type |
|---|
| 134 |
|
|---|
| 135 |
# define GADGET_EXTERN(__type) extern __type |
|---|
| 136 |
# define GADGET_IMPLEMENT(__type) __type |
|---|
| 137 |
# define GADGET_EXTERN_DATA(__type) extern __type |
|---|
| 138 |
# define GADGET_IMPLEMENT_DATA(__type) __type |
|---|
| 139 |
|
|---|
| 140 |
# define GADGET_CALLBACK |
|---|
| 141 |
# define GADGET_CALLBACK_DECL |
|---|
| 142 |
# define GADGET_STATIC_CALLBACK(__x) static __x |
|---|
| 143 |
|
|---|
| 144 |
#endif |
|---|
| 145 |
|
|---|
| 146 |
#ifdef _GADGET_BUILD_ |
|---|
| 147 |
# define GADGET_API(__type) GADGET_EXPORT(__type) |
|---|
| 148 |
# define GADGET_CLASS_API GADGET_EXPORT_CLASS |
|---|
| 149 |
# define GADGET_DATA_API(__type) GADGET_EXPORT_DATA(__type) |
|---|
| 150 |
#else |
|---|
| 151 |
# define GADGET_API(__type) GADGET_IMPORT(__type) |
|---|
| 152 |
# define GADGET_CLASS_API GADGET_IMPORT_CLASS |
|---|
| 153 |
# define GADGET_DATA_API(__type) GADGET_IMPORT_DATA(__type) |
|---|
| 154 |
|
|---|
| 155 |
# include <gadget/AutoLink.h> |
|---|
| 156 |
#endif |
|---|
| 157 |
|
|---|
| 158 |
|
|---|
| 159 |
|
|---|
| 160 |
#endif |
|---|