00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MAGICKWAND_METHOD_ATTRIBUTE_H
00019 #define MAGICKWAND_METHOD_ATTRIBUTE_H
00020
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024
00025 #if defined(__BORLANDC__) && defined(_DLL)
00026 # define _MAGICKDLL_
00027 # define _MAGICKLIB_
00028 # define MAGICKCORE_MODULES_SUPPORT
00029 # undef MAGICKCORE_BUILD_MODULES
00030 #endif
00031
00032 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
00033 # define WandPrivate
00034 # if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB)
00035 # define _MAGICKDLL_
00036 # endif
00037 # if defined(_MAGICKDLL_)
00038 # if defined(_VISUALC_)
00039 # pragma warning( disable: 4273 )
00040 # endif
00041 # if !defined(_MAGICKLIB_)
00042 # if defined(__clang__) || defined(__GNUC__)
00043 # define WandExport __attribute__ ((dllimport))
00044 # else
00045 # define WandExport __declspec(dllimport)
00046 # endif
00047 # else
00048 # if defined(__clang__) || defined(__GNUC__)
00049 # define WandExport __attribute__ ((dllexport))
00050 # else
00051 # define WandExport __declspec(dllexport)
00052 # endif
00053 # endif
00054 # else
00055 # define WandExport
00056 # endif
00057 # if defined(_VISUALC_)
00058 # pragma warning(disable : 4018)
00059 # pragma warning(disable : 4068)
00060 # pragma warning(disable : 4244)
00061 # pragma warning(disable : 4142)
00062 # pragma warning(disable : 4800)
00063 # pragma warning(disable : 4786)
00064 # pragma warning(disable : 4996)
00065 # endif
00066 #else
00067 # if defined(__clang__) || (__GNUC__ >= 4)
00068 # define WandExport __attribute__ ((visibility ("default")))
00069 # define WandPrivate __attribute__ ((visibility ("hidden")))
00070 # else
00071 # define WandExport
00072 # define WandPrivate
00073 # endif
00074 #endif
00075
00076 #define WandSignature 0xabacadabUL
00077 #if !defined(MaxTextExtent)
00078 # define MaxTextExtent 4096
00079 #endif
00080
00081 #if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
00082 # define wand_aligned(x) __attribute__((aligned(x)))
00083 # define wand_attribute __attribute__
00084 # define wand_unused(x) wand_unused_ ## x __attribute__((unused))
00085 # define wand_unreferenced(x)
00086 #elif defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
00087 # define wand_aligned(x) __declspec(align(x))
00088 # define wand_attribute(x)
00089 # define wand_unused(x) x
00090 # define wand_unreferenced(x) (x)
00091 #else
00092 # define wand_aligned(x)
00093 # define wand_attribute(x)
00094 # define wand_unused(x) x
00095 # define wand_unreferenced(x)
00096 #endif
00097
00098 #if !defined(__clang__) && (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
00099 # define wand_alloc_size(x) __attribute__((__alloc_size__(x)))
00100 # define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y)))
00101 #else
00102 # define wand_alloc_size(x)
00103 # define wand_alloc_sizes(x,y)
00104 #endif
00105
00106 #if defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
00107 # define wand_cold_spot __attribute__((__cold__))
00108 # define wand_hot_spot __attribute__((__hot__))
00109 #else
00110 # define wand_cold_spot
00111 # define wand_hot_spot
00112 #endif
00113
00114 #if defined(__cplusplus) || defined(c_plusplus)
00115 }
00116 #endif
00117
00118 #endif