method-attribute.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004 
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007 
00008     https://imagemagick.org/script/license.php
00009 
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickWand method attributes.
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 )  /* Disable the dll linkage warnings */
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 MagickWandSignature  0xabacadabUL
00077 #if !defined(MagickPathExtent)
00078 #  define MagickPathExtent  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)  /* nothing */
00086 #elif defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
00087 #  define wand_aligned(x)  __declspec(align(x))
00088 #  define wand_attribute(x)  /* nothing */
00089 #  define wand_unused(x) x
00090 #  define wand_unreferenced(x) (x)
00091 #else
00092 #  define wand_aligned(x)  /* nothing */
00093 #  define wand_attribute(x)  /* nothing */
00094 #  define wand_unused(x) x
00095 #  define wand_unreferenced(x)  /* nothing */
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)  /* nothing */
00103 #  define wand_alloc_sizes(x,y)  /* nothing */
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

Generated on 28 Jan 2020 for MagickWand by  doxygen 1.6.1