# endif
# if !defined(_MAGICKLIB_)
# if defined(__GNUC__)
-# define MagickExport __attribute__ ((dllimport))
+# define MagickExport __attribute__ ((__dllimport__))
# else
# define MagickExport __declspec(dllimport)
# endif
# endif
# else
# if defined(__GNUC__)
-# define MagickExport __attribute__ ((dllexport))
+# define MagickExport __attribute__ ((__dllexport__))
# else
# define MagickExport __declspec(dllexport)
# endif
# endif
#else
# if __GNUC__ >= 4
-# define MagickExport __attribute__ ((visibility ("default")))
-# define MagickPrivate __attribute__ ((visibility ("hidden")))
+# define MagickExport __attribute__ ((__visibility__ ("default")))
+# define MagickPrivate __attribute__ ((__visibility__ ("hidden")))
# else
# define MagickExport
# define MagickPrivate
const char *),
ThrowMagickException(ExceptionInfo *,const char *,const char *,const size_t,
const ExceptionType,const char *,const char *,...)
- magick_attribute((format (printf,7,8)));
+ magick_attribute((__format__ (__printf__,7,8)));
extern MagickExport void
CatchException(ExceptionInfo *),
extern MagickPrivate ssize_t
FormatLocaleFileList(FILE *,const char *restrict,va_list)
- magick_attribute((format (printf,2,0))),
+ magick_attribute((__format__ (__printf__,2,0))),
FormatLocaleStringList(char *restrict,const size_t,const char *restrict,
- va_list) magick_attribute((format (printf,3,0)));
+ va_list) magick_attribute((__format__ (__printf__,3,0)));
#if defined(__cplusplus) || defined(c_plusplus)
}
extern MagickExport ssize_t
FormatLocaleFile(FILE *,const char *restrict,...)
- magick_attribute((format (printf,2,3))),
+ magick_attribute((__format__ (__printf__,2,3))),
FormatLocaleString(char *restrict,const size_t,const char *restrict,...)
- magick_attribute((format (printf,3,4)));
+ magick_attribute((__format__ (__printf__,3,4)));
#if defined(__cplusplus) || defined(c_plusplus)
}
ListLogInfo(FILE *,ExceptionInfo *),
LogMagickEvent(const LogEventType,const char *,const char *,const size_t,
const char *,...)
- magick_attribute((format (printf,5,6))),
+ magick_attribute((__format__ (__printf__,5,6))),
LogMagickEventList(const LogEventType,const char *,const char *,const size_t,
- const char *,va_list) magick_attribute((format (printf,5,0)));
+ const char *,va_list) magick_attribute((__format__ (__printf__,5,0)));
extern MagickExport void
CloseMagickLog(void),
/* Define to 1 if you have the `_wstat' function. */
/* #undef HAVE__WSTAT */
+/* define if your compiler has __alloc_size__ */
+#ifndef MAGICKCORE_HAVE___ALLOC_SIZE__
+#define MAGICKCORE_HAVE___ALLOC_SIZE__ 1
+#endif
+
/* define if your compiler has __attribute__ */
#ifndef MAGICKCORE_HAVE___ATTRIBUTE__
#define MAGICKCORE_HAVE___ATTRIBUTE__ 1
#endif
typedef void
- *(*AcquireMemoryHandler)(size_t),
+ *(*AcquireMemoryHandler)(size_t) magick_alloc_size(1),
(*DestroyMemoryHandler)(void *),
- *(*ResizeMemoryHandler)(void *,size_t);
+ *(*ResizeMemoryHandler)(void *,size_t) magick_alloc_size(2);
extern MagickExport void
- *AcquireAlignedMemory(const size_t,const size_t) magick_attribute((malloc)),
- *AcquireMagickMemory(const size_t) magick_attribute((malloc)),
- *AcquireQuantumMemory(const size_t,const size_t) magick_attribute((malloc)),
+ *AcquireAlignedMemory(const size_t,const size_t)
+ magick_attribute((__malloc__)) magick_alloc_sizes(1,2),
+ *AcquireMagickMemory(const size_t) magick_attribute((__malloc__))
+ magick_alloc_size(1),
+ *AcquireQuantumMemory(const size_t,const size_t)
+ magick_attribute((__malloc__)) magick_alloc_sizes(1,2),
*CopyMagickMemory(void *,const void *,const size_t)
- magick_attribute((nonnull)),
+ magick_attribute((__nonnull__)),
DestroyMagickMemory(void),
GetMagickMemoryMethods(AcquireMemoryHandler *,ResizeMemoryHandler *,
DestroyMemoryHandler *),
*RelinquishAlignedMemory(void *),
*RelinquishMagickMemory(void *),
*ResetMagickMemory(void *,int,const size_t),
- *ResizeMagickMemory(void *,const size_t) magick_attribute((malloc)),
+ *ResizeMagickMemory(void *,const size_t)
+ magick_attribute((__malloc__)) magick_alloc_size(2),
*ResizeQuantumMemory(void *,const size_t,const size_t)
- magick_attribute((malloc)),
+ magick_attribute((__malloc__)) magick_alloc_sizes(2,3),
SetMagickMemoryMethods(AcquireMemoryHandler,ResizeMemoryHandler,
DestroyMemoryHandler);
static ssize_t
table_size = 0;
- register ssize_t
+ register unsigned int
i,l,h;
assert(value != (char *) NULL);
if ( cmp == 0 )
cmp = *value - *(option_info[i].mnemonic);
-fprintf(stderr, "%d --- %u < %u < %u --- \"%s\" < \"%s\" < \"%s\"\n",
- cmp, l,i,h,
- option_info[l].mnemonic, option_info[i].mnemonic, option_info[h].mnemonic);
+ (void) fprintf(stderr,"%d --- %u < %u < %u --- \"%s\" < \"%s\" < \"%s\"\n",
+ cmp,l,i,h,option_info[l].mnemonic,option_info[i].mnemonic,
+ option_info[h].mnemonic);
if (cmp == 0)
return(&option_info[i]);
DefineImageProperty(Image *,const char *,ExceptionInfo *),
DeleteImageProperty(Image *,const char *),
FormatImageProperty(Image *,const char *,const char *,...)
- magick_attribute((format (printf,3,4))),
+ magick_attribute((__format__ (__printf__,3,4))),
SetImageProperty(Image *,const char *,const char *,ExceptionInfo *);
extern MagickExport void
extern MagickExport size_t
ConcatenateMagickString(char *,const char *,const size_t)
- magick_attribute((nonnull)),
+ magick_attribute((__nonnull__)),
CopyMagickString(char *,const char *,const size_t)
- magick_attribute((nonnull)),
+ magick_attribute((__nonnull__)),
GetStringInfoLength(const StringInfo *);
extern MagickExport ssize_t
extern MagickExport void
ConcatenateStringInfo(StringInfo *,const StringInfo *)
- magick_attribute((nonnull)),
+ magick_attribute((__nonnull__)),
LocaleLower(char *),
LocaleUpper(char *),
PrintStringInfo(FILE *file,const char *,const StringInfo *),
# endif
# if !defined(_MAGICKLIB_)
# if defined(__GNUC__)
-# define MagickExport __attribute__ ((dllimport))
+# define MagickExport __attribute__ ((__dllimport__))
# else
# define MagickExport __declspec(dllimport)
# endif
# endif
# else
# if defined(__GNUC__)
-# define MagickExport __attribute__ ((dllexport))
+# define MagickExport __attribute__ ((__dllexport__))
# else
# define MagickExport __declspec(dllexport)
# endif
# if defined(_DLL) && !defined(_LIB)
# if defined(__GNUC__)
-# define ModuleExport __attribute__ ((dllexport))
+# define ModuleExport __attribute__ ((__dllexport__))
# else
# define ModuleExport __declspec(dllexport)
# endif
# endif
#else
# if __GNUC__ >= 4
-# define MagickExport __attribute__ ((visibility ("default")))
-# define MagickPrivate __attribute__ ((visibility ("hidden")))
+# define MagickExport __attribute__ ((__visibility__ ("default")))
+# define MagickPrivate __attribute__ ((__visibility__ ("hidden")))
# else
# define MagickExport
# define MagickPrivate
#endif
#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
-# define magick_aligned(x) __attribute__((aligned(x)))
+# define magick_aligned(x) __attribute__((__aligned__(x)))
# define magick_attribute __attribute__
-# define magick_unused(x) magick_unused_ ## x __attribute__((unused))
+# define magick_unused(x) magick_unused_ ## x __attribute__((__unused__))
#else
# define magick_aligned(x) /* nothing */
# define magick_attribute(x) /* nothing */
# define magick_unused(x) x
#endif
+#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
+# define magick_alloc_size(x) __attribute__((__alloc_size__(x)))
+# define magick_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y)))
+# define magick_cold __attribute__((__cold__))
+# define magick_hot __attribute__((__hot__))
+#else
+# define magick_alloc_size(x) /* nothing */
+# define magick_alloc_sizes(x) /* nothing */
+# define magick_cold
+# define magick_hot
+#endif
+
#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT)
# include <sys/types.h>
# include <sys/stat.h>
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2012 ImageMagick Studio LLC"
-#define MagickSVNRevision "6837"
+#define MagickSVNRevision "6876"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 7,0,0
#define MagickLibAddendum "-0"
#define MagickLibInterface 7
#define MagickLibMinInterface 7
-#define MagickReleaseDate "2012-02-12"
+#define MagickReleaseDate "2012-02-18"
#define MagickChangeDate "20110801"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)
# endif
# if !defined(_MAGICKLIB_)
# if defined(__GNUC__)
-# define WandExport __attribute__ ((dllimport))
+# define WandExport __attribute__ ((__dllimport__))
# else
# define WandExport __declspec(dllimport)
# endif
# endif
# else
# if defined(__GNUC__)
-# define WandExport __attribute__ ((dllexport))
+# define WandExport __attribute__ ((__dllexport__))
# else
# define WandExport __declspec(dllexport)
# endif
# endif
#else
# if __GNUC__ >= 4
-# define WandExport __attribute__ ((visibility ("default")))
-# define WandPrivate __attribute__ ((visibility ("hidden")))
+# define WandExport __attribute__ ((__visibility__ ("default")))
+# define WandPrivate __attribute__ ((__visibility__ ("hidden")))
# else
# define WandExport
# define WandPrivate
# endif
# if !defined(_MAGICKLIB_)
# if defined(__GNUC__)
-# define WandExport __attribute__ ((dllimport))
+# define WandExport __attribute__ ((__dllimport__))
# else
# define WandExport __declspec(dllimport)
# endif
# endif
# else
# if defined(__GNUC__)
-# define WandExport __attribute__ ((dllexport))
+# define WandExport __attribute__ ((__dllexport__))
# else
# define WandExport __declspec(dllexport)
# endif
# endif
#else
# if __GNUC__ >= 4
-# define WandExport __attribute__ ((visibility ("default")))
-# define WandPrivate __attribute__ ((visibility ("hidden")))
+# define WandExport __attribute__ ((__visibility__ ("default")))
+# define WandPrivate __attribute__ ((__visibility__ ("hidden")))
# else
# define WandExport
# define WandPrivate
#endif
#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
-# define wand_aligned(x) __attribute__((aligned(x)))
+# define wand_aligned(x) __attribute__((__aligned__(x)))
# define wand_attribute __attribute__
-# define wand_unused(x) wand_unused_ ## x __attribute__((unused))
+# 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
+#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
+# define wand_alloc_size(x) __attribute__((__alloc_size__(x)))
+# define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y)))
+# define wand_cold __attribute__((__cold__))
+# define wand_hot __attribute__((__hot__))
+#else
+# define wand_alloc_size(x) /* nothing */
+# define wand_alloc_sizes(x) /* nothing */
+# define wand_cold
+# define wand_hot
+#endif
+
#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT)
# include <sys/types.h>
# include <sys/stat.h>
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_func_fseeko.m4 \
$(top_srcdir)/m4/argz.m4 \
+ $(top_srcdir)/m4/ax_c___alloc_size__.m4 \
$(top_srcdir)/m4/ax_c___attribute__.m4 \
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/ax_compare_version.m4 \
/* Define to 1 if you have the `_wstat' function. */
#undef HAVE__WSTAT
+/* define if your compiler has __alloc_size__ */
+#undef HAVE___ALLOC_SIZE__
+
/* define if your compiler has __attribute__ */
#undef HAVE___ATTRIBUTE__
<configure name="VERSION" value="7.0.0"/>
<configure name="LIB_VERSION" value="0x700"/>
<configure name="LIB_VERSION_NUMBER" value="7,0,0,0"/>
- <configure name="SVN_REVISION" value="6837" />
- <configure name="RELEASE_DATE" value="2012-02-12"/>
+ <configure name="SVN_REVISION" value="6876" />
+ <configure name="RELEASE_DATE" value="2012-02-18"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
-MAGICK_SVN_REVISION=6837
+MAGICK_SVN_REVISION=6876
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- static void foo(void) __attribute__ ((unused));
+ static void foo(void) __attribute__ ((__unused__));
static void
foo(void) {
exit(1);
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __alloc_size__" >&5
+$as_echo_n "checking for __alloc_size__... " >&6; }
+if ${ax_cv___alloc_size__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ static void foo(const size_t) __attribute__((__alloc_size__(1)));
+ static void
+ foo(const size_t bar) {
+ exit(1);
+ }
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ax_cv___alloc_size__=yes
+else
+ ax_cv___alloc_size__=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv___alloc_size__" >&5
+$as_echo "$ax_cv___alloc_size__" >&6; }
+ if test "$ax_cv___alloc_size__" = "yes"; then
+
+$as_echo "#define HAVE___ALLOC_SIZE__ 1" >>confdefs.h
+
+ fi
+
+
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
AC_PROG_LN_S
AM_WITH_DMALLOC
AX_C___ATTRIBUTE__
+AX_C___ALLOC_SIZE__
PKG_PROG_PKG_CONFIG
#
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_c___alloc_size__.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_C___ALLOC_SIZE__
+#
+# DESCRIPTION
+#
+# Provides a test for the compiler support of __alloc_size__ extensions.
+# Defines HAVE___ALLOC_SIZE__ if it is found.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Stepan Kasal <skasal@redhat.com>
+# Copyright (c) 2008 Christian Haggstrom
+# Copyright (c) 2008 Ryan McCabe <ryan@numb.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 8
+
+AC_DEFUN([AX_C___ALLOC_SIZE__], [
+ AC_CACHE_CHECK([for __alloc_size__], [ax_cv___alloc_size__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ static void foo(const size_t) __attribute__((__alloc_size__(1)));
+ static void
+ foo(const size_t bar) {
+ exit(1);
+ }
+ ]], [])],
+ [ax_cv___alloc_size__=yes],
+ [ax_cv___alloc_size__=no]
+ )
+ ])
+ if test "$ax_cv___alloc_size__" = "yes"; then
+ AC_DEFINE([HAVE___ALLOC_SIZE__], 1, [define if your compiler has __alloc_size__])
+ fi
+])
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdlib.h>
- static void foo(void) __attribute__ ((unused));
+ static void foo(void) __attribute__ ((__unused__));
static void
foo(void) {
exit(1);