/*
- Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
+ Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization
dedicated to making software imaging solutions freely available.
You may not use this file except in compliance with the License.
#endif
#if defined(WIN32) || defined(WIN64)
-# define MAGICKCORE_WINDOWS_SUPPORT
+# define MAGICKWAND_WINDOWS_SUPPORT
#else
-# define MAGICKCORE_POSIX_SUPPORT
+# define MAGICKWAND_POSIX_SUPPORT
#endif
#define MAGICKWAND_IMPLEMENTATION 1
# define STDC
#endif
-#if defined(__BORLANDC__) && defined(_DLL)
-# pragma message("BCBMagick lib DLL export interface")
-# define _MAGICKDLL_
-# define _MAGICKLIB_
-#endif
-
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__)
-# define WandPrivate
-# if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB)
-# define _MAGICKDLL_
-# endif
-# if defined(_MAGICKDLL_)
-# if defined(_VISUALC_)
-# pragma warning( disable: 4273 ) /* Disable the dll linkage warnings */
-# endif
-# if !defined(_MAGICKLIB_)
-# if defined(__GNUC__)
-# define WandExport __attribute__ ((dllimport))
-# else
-# define WandExport __declspec(dllimport)
-# endif
-# if defined(_VISUALC_)
-# pragma message( "MagickWand lib DLL import interface" )
-# endif
-# else
-# if defined(__GNUC__)
-# define WandExport __attribute__ ((dllexport))
-# else
-# define WandExport __declspec(dllexport)
-# endif
-# if defined(_VISUALC_)
-# pragma message( "MagickWand lib DLL export interface" )
-# endif
-# endif
-# else
-# define WandExport
-# if defined(_VISUALC_)
-# pragma message( "MagickWand lib static interface" )
-# endif
-# endif
-
-# if defined(_DLL) && !defined(_LIB)
-# define ModuleExport __declspec(dllexport)
-# if defined(_VISUALC_)
-# pragma message( "MagickWand module DLL export interface" )
-# endif
-# else
-# define ModuleExport
-# if defined(_VISUALC_)
-# pragma message( "MagickWand module static interface" )
-# endif
-
-# endif
-# define WandGlobal __declspec(thread)
-# if defined(_VISUALC_)
-# pragma warning(disable : 4018)
-# pragma warning(disable : 4068)
-# pragma warning(disable : 4244)
-# pragma warning(disable : 4142)
-# pragma warning(disable : 4800)
-# pragma warning(disable : 4786)
-# pragma warning(disable : 4996)
-# endif
-#else
-# if __GNUC__ >= 4
-# define WandExport __attribute__ ((visibility ("default")))
-# define WandPrivate __attribute__ ((visibility ("hidden")))
-# else
-# define WandExport
-# define WandPrivate
-# endif
-# define WandGlobal
-#endif
-
#if defined(__cplusplus) || defined(c_plusplus)
# define storage_class c_class
#else
# define storage_class class
#endif
-#define WandSignature 0xabacadabUL
-#if !defined(MaxTextExtent)
-# define MaxTextExtent 4096
-#endif
-
#include <stdarg.h>
#include <stdio.h>
#if defined(MAGICKCORE_HAVE_SYS_STAT_H)
#if defined(MAGICKCORE_HAVE_UNISTD_H)
# include <unistd.h>
#endif
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG)
+#if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#endif
-#if defined(MAGICKCORE_WINDOWS_SUPPORT)
-# include <direct.h>
-# if !defined(MAGICKCORE_HAVE_STRERROR)
-# define HAVE_STRERROR
-# endif
-#endif
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG)
+#if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#endif
-#if defined(MAGICKCORE_WINDOWS_SUPPORT)
+#if defined(MAGICKWAND_WINDOWS_SUPPORT)
+# include <io.h>
# include <direct.h>
# if !defined(MAGICKCORE_HAVE_STRERROR)
# define HAVE_STRERROR
#endif
#if defined(MAGICKCORE_THREAD_SUPPORT)
# include <pthread.h>
-#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
+#elif defined(MAGICKWAND_WINDOWS_SUPPORT)
# define MAGICKCORE_HAVE_WINTHREADS 1
#include <windows.h>
#endif
# define MAGICKCORE_OPENCL_SUPPORT 1
#endif
-#if defined(_OPENMP) && (_OPENMP >= 200203)
+#if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
# include <omp.h>
# define MAGICKCORE_OPENMP_SUPPORT 1
#endif
extern int vsnprintf(char *,size_t,const char *,va_list);
#endif
-#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
-# define wand_aligned(x) __attribute__((aligned(x)))
-# define wand_attribute __attribute__
-# define wand_unused(x) wand_unused_ ## x __attribute__((unused))
-#else
-# define wand_aligned(x) /* nothing */
-# define wand_attribute(x) /* nothing */
-# define wand_unused(x) x
-#endif
+#include "MagickWand/method-attribute.h"
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT)
+#if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
# include <sys/types.h>
# include <sys/stat.h>
# if defined(MAGICKCORE_HAVE_FTIME)
# include <sys/timeb.h>
# endif
-# if defined(MAGICKCORE_POSIX_SUPPORT)
+# if defined(MAGICKWAND_POSIX_SUPPORT)
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
# endif
# include "MagickWand/MagickWand.h"
-# if !defined(MAGICKCORE_WINDOWS_SUPPORT)
+# if !defined(MAGICKWAND_WINDOWS_SUPPORT)
# include <sys/time.h>
# if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
# include <sys/times.h>
# if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
# include <sys/resource.h>
# endif
+# if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
+# include <sys/mman.h>
+# endif
#endif
#else
# include <types.h>
# endif
# include <unix.h>
# endif
-# include "MagickWand/MagickWand.h"
#endif
#if defined(S_IRUSR) && defined(S_IWUSR)
# define S_MODE (S_IRUSR | S_IWUSR)
-#elif defined (MAGICKCORE_WINDOWS_SUPPORT)
+#elif defined (MAGICKWAND_WINDOWS_SUPPORT)
# define S_MODE (_S_IREAD | _S_IWRITE)
#else
# define S_MODE 0600
#endif
-#if defined(MAGICKCORE_WINDOWS_SUPPORT)
+#if defined(MAGICKWAND_WINDOWS_SUPPORT)
# include "MagickCore/nt-base.h"
#endif
#if defined(macintosh)
/*
Review these platform specific definitions.
*/
-#if defined(MAGICKCORE_POSIX_SUPPORT) && !defined(__OS2__)
+#if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__)
# define DirectorySeparator "/"
# define DirectoryListSeparator ':'
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
# define IsBasenameSeparator(c) \
(((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse)
# define MAGICKCORE_LIBRARY_PATH "sys$login:"
-# define MAGICKCORE_CODER_PATH "sys$login:"
-# define MAGICKCORE_FILTER_PATH "sys$login:"
# define MAGICKCORE_SHARE_PATH "sys$login:"
# define X11_PREFERENCES_PATH "decw$user_defaults:"
# define ProcessPendingEvents(text)
# define EditorOptions ""
# define IsBasenameSeparator(c) ((c) == ':' ? MagickTrue : MagickFalse)
# define MAGICKCORE_LIBRARY_PATH ""
-# define MAGICKCORE_CODER_PATH ""
-# define MAGICKCORE_FILTER_PATH ""
# define MAGICKCORE_SHARE_PATH ""
# define X11_PREFERENCES_PATH "~/."
# if defined(DISABLE_SIOUX)
SetWarningHandler(MACWarningHandler)
# endif
# endif
-# if defined(MAGICKCORE_WINDOWS_SUPPORT)
+# if defined(MAGICKWAND_WINDOWS_SUPPORT)
# define DirectorySeparator "\\"
# define DirectoryListSeparator ';'
# define EditorOptions ""
#endif
/*
- Exception defines.
+ Magick defines.
*/
-#define ThrowWandFatalException(severity,tag,context) \
-{ \
- ExceptionInfo \
- *exception; \
- \
- exception=AcquireExceptionInfo(); \
- (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
- "`%s'",context); \
- CatchException(exception); \
- exception=DestroyExceptionInfo(exception); \
-}
+#if defined(_MSC_VER)
+# define DisableMSCWarning(nr) __pragma(warning(push)) \
+ __pragma(warning(disable:nr))
+# define RestoreMSCWarning __pragma(warning(pop))
+#else
+# define DisableMSCWarning(nr)
+# define RestoreMSCWarning
+#endif
#if defined(__cplusplus) || defined(c_plusplus)
}