]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 27 Jul 2012 01:41:20 +0000 (01:41 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 27 Jul 2012 01:41:20 +0000 (01:41 +0000)
MagickCore/magick-config.h
MagickCore/memory.c
MagickCore/version.h
Makefile.in
config/ImageMagick.rdf
config/config.h.in
config/configure.xml
configure
configure.ac
m4/ax_lang_compiler_ms.m4 [deleted file]

index cbfdc8806f46efe1d5df3edcc311e66a03dd082a..4545b8f2f55aab05205d307198295b8239817567 100644 (file)
 #define MAGICKCORE_HAVE_XLOCALE_H 1
 #endif
 
+/* Define to 1 if you have the `_aligned_malloc' function. */
+/* #undef HAVE__ALIGNED_MALLOC */
+
 /* Define to 1 if the system has the type `_Bool'. */
 #ifndef MAGICKCORE_HAVE__BOOL
 #define MAGICKCORE_HAVE__BOOL 1
index b29ea0f3565548befa813974dcaac977e94422d2..4b6f01ef1774e6990db73c820165d43dcbdbbc84 100644 (file)
@@ -189,24 +189,44 @@ static MagickBooleanType
 MagickExport void *AcquireAlignedMemory(const size_t count,const size_t quantum)
 {
   size_t
+    alignment,
+    extent,
     size;
 
+  void
+    *memory;
+
   size=count*quantum;
   if ((count == 0) || (quantum != (size/count)))
     {
       errno=ENOMEM;
       return((void *) NULL);
     }
+  memory=NULL;
+  alignment=CACHE_LINE_SIZE;
+  extent=(size+alignment-1)+sizeof(void *);
+  if ((size == 0) || (alignment < sizeof(void *)) || (extent <= size))
+    return((void *) NULL);
 #if defined(MAGICKCORE_HAVE_POSIX_MEMALIGN)
+  if (posix_memalign(&memory,alignment,size) != 0)
+    memory=NULL;
+#elif defined(MAGICKCORE_HAVE__ALIGNED_MALLOC)
+  memory=_aligned_malloc(size,alignment);
+#else
   {
     void
-      *memory;
-
-    if (posix_memalign(&memory,CACHE_LINE_SIZE,CacheAlign(size)) == 0)
-      return(memory);
+      *p;
+
+    p=malloc(extent);
+    if (p != NULL)
+      {
+        memory=(void *) (((size_t) p+sizeof(void *)+alignment-1) &
+          ~(alignment-1));
+        *((void **) memory-1)=p;
+      }
   }
 #endif
-  return(malloc(CacheAlign(size)));
+  return(memory);
 }
 \f
 #if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
@@ -711,8 +731,14 @@ MagickExport void *RelinquishAlignedMemory(void *memory)
 {
   if (memory == (void *) NULL)
     return((void *) NULL);
+#if defined(MAGICKCORE_HAVE_POSIX_MEMALIGN)
   free(memory);
-  return((void *) NULL);
+#elif defined(MAGICKCORE_HAVE__ALIGNED_MALLOC)
+  _aligned_free(memory);
+#else
+  free(*((void **) memory-1));
+#endif
+  return(NULL);
 }
 \f
 /*
index 32c7b2815b1c1b4a78459acff75cff8dc3715947..d07bb074bd1fb8947354b5ac6d0309d6b6b7429b 100644 (file)
@@ -27,14 +27,14 @@ extern "C" {
 */
 #define MagickPackageName "ImageMagick"
 #define MagickCopyright  "Copyright (C) 1999-2012 ImageMagick Studio LLC"
-#define MagickSVNRevision  "8720"
+#define MagickSVNRevision  "8726"
 #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-07-22"
+#define MagickReleaseDate  "2012-07-26"
 #define MagickChangeDate   "20110801"
 #define MagickAuthoritativeURL  "http://www.imagemagick.org"
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
index 0aa89c8f0ea322fd6403bf9c376dce0c7d156747..5125c28d55d88de7a50e55c3f12fbb58a7e8dbe3 100644 (file)
@@ -306,7 +306,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_func_fseeko.m4 \
        $(top_srcdir)/m4/ax_cxx_namespaces.m4 \
        $(top_srcdir)/m4/ax_gcc_archflag.m4 \
        $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
-       $(top_srcdir)/m4/ax_lang_compiler_ms.m4 \
        $(top_srcdir)/m4/ax_opencl.m4 \
        $(top_srcdir)/m4/ax_prefix_config_h.m4 \
        $(top_srcdir)/m4/ax_prog_perl_version.m4 \
index fd2adb7d8db5bac630604fc334b73586729c732e..a0822097a98127e77c89f9c3dc5bc0840241ebff 100644 (file)
@@ -5,7 +5,7 @@
     <name>ImageMagick</name>
     <shortdesc xml:lang="en">ImageMagick: convert, edit, and compose images.</shortdesc>
     <homepage rdf:resource="http://www.imagemagick.org/"/>
-    <created>2012-07-22</created>
+    <created>2012-07-26</created>
 
     <description xml:lang="en">
 ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
@@ -57,7 +57,7 @@ Examples of ImageMagick Usage shows how to use ImageMagick from the command-line
     <release>
       <Version>
           <name>stable</name>
-          <created>2012-07-22</created>
+          <created>2012-07-26</created>
           <revision>7.0.0</revision>
           <patch-level>-0</patch-level>
       </Version>
index 9ad92d0d6a606f03f00214789c0442bfeed8cd9a..314b78a3dcd04d426081c85648a995fa0217929f 100644 (file)
 /* Define to 1 if you have the <xlocale.h> header file. */
 #undef HAVE_XLOCALE_H
 
+/* Define to 1 if you have the `_aligned_malloc' function. */
+#undef HAVE__ALIGNED_MALLOC
+
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
 
index 19252744b9c2087171006eee4e056da93fe4176d..fa5516687924523cbfadcdb2855e685c792cb355 100644 (file)
@@ -10,8 +10,8 @@
   <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="8720" />
-  <configure name="RELEASE_DATE" value="2012-07-22"/>
+  <configure name="SVN_REVISION" value="8726" />
+  <configure name="RELEASE_DATE" value="2012-07-26"/>
   <configure name="CONFIGURE" value="./configure "/>
   <configure name="PREFIX" value="/usr/local"/>
   <configure name="EXEC-PREFIX" value="/usr/local"/>
index 217802dcde4a8240766d275964235e51f1892d06..c2823cff685f3a025aad18cc109368a53cff7a94 100755 (executable)
--- a/configure
+++ b/configure
@@ -3651,7 +3651,7 @@ MAGICK_LIBRARY_CURRENT_MIN=`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`
 
 MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
 
-MAGICK_SVN_REVISION=8720
+MAGICK_SVN_REVISION=8726
 
 
 
@@ -7968,6 +7968,62 @@ case ".$ac_cv_cflags_warn_all" in
  ;;
 esac
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
+$as_echo_n "checking for C compiler vendor... " >&6; }
+if ${ax_cv_c_compiler_vendor+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # note: don't check for gcc first since some other compilers define __GNUC__
+  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
+           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
+           pathscale: __PATHCC__,__PATHSCALE__
+           clang:     __clang__
+           gnu:       __GNUC__
+           sun:       __SUNPRO_C,__SUNPRO_CC
+           hp:        __HP_cc,__HP_aCC
+           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+           borland:   __BORLANDC__,__TURBOC__
+           comeau:    __COMO__
+           cray:      _CRAYC
+           kai:       __KCC
+           lcc:       __LCC__
+           sgi:       __sgi,sgi
+           microsoft: _MSC_VER
+           metrowerks: __MWERKS__
+           watcom:    __WATCOMC__
+           portland:  __PGI
+           unknown:   UNKNOWN"
+  for ventest in $vendors; do
+    case $ventest in
+      *:) vendor=$ventest; continue ;;
+      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
+    esac
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+      #if !($vencpp)
+        thisisanerror;
+      #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+  ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
+$as_echo "$ax_cv_c_compiler_vendor" >&6; }
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
@@ -8622,36 +8678,6 @@ fi
 #
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5
-$as_echo_n "checking whether we are using the Microsoft C compiler... " >&6; }
-if ${ax_cv_c_compiler_ms+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef _MSC_VER
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ax_compiler_ms=yes
-else
-  ax_compiler_ms=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ax_cv_c_compiler_ms=$ax_compiler_ms
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_ms" >&5
-$as_echo "$ax_cv_c_compiler_ms" >&6; }
 
 GDI32_LIBS=''
 native_win32_build='no'
@@ -9717,36 +9743,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5
-$as_echo_n "checking whether we are using the Microsoft C compiler... " >&6; }
-if ${ax_cv_c_compiler_ms+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef _MSC_VER
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ax_compiler_ms=yes
-else
-  ax_compiler_ms=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ax_cv_c_compiler_ms=$ax_compiler_ms
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_ms" >&5
-$as_echo "$ax_cv_c_compiler_ms" >&6; }
+  AX_LANG_COMPILER_MS
   if test X$ax_compiler_ms = Xno; then :
   CL_CFLAGS="${PTHREAD_CFLAGS}"; CL_LIBS="${PTHREAD_LIBS} -lm"
 fi
@@ -25571,7 +25568,7 @@ fi
 LIBS="$MATH_LIBS $LIBS"
 
 
-for ac_func in acosh asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat
+for ac_func in acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
index 4c7cf837d6e34e1bf4a543c84c8b4dc339418d09..ebb09d009b107e41b60787a5de6406f80b62c0d5 100755 (executable)
 #  limitations under the License.
 #
 #  Copyright (C) 2003 - 2008 GraphicsMagick Group
+#
+#  Copying and distribution of this file, with or without modification,
+#  are permitted in any medium without royalty provided the copyright
+#  notice and this notice are preserved.
 
 AC_PREREQ(2.67)
 
@@ -257,6 +261,7 @@ AC_SUBST(LD)
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
 AX_CFLAGS_WARN_ALL
+AX_COMPILER_VENDOR
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 AC_PROG_LN_S
@@ -284,7 +289,6 @@ fi
 #
 AC_EXEEXT
 AC_OBJEXT
-AX_LANG_COMPILER_MS
 
 GDI32_LIBS=''
 native_win32_build='no'
@@ -1091,7 +1095,7 @@ AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
 LIBS="$MATH_LIBS $LIBS"
 AC_SUBST(MATH_LIBS)
 
-AC_CHECK_FUNCS([acosh asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
 
 #
 # Check for clock_gettime().
diff --git a/m4/ax_lang_compiler_ms.m4 b/m4/ax_lang_compiler_ms.m4
deleted file mode 100644 (file)
index 658ca85..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# ===========================================================================
-#    http://www.gnu.org/software/autoconf-archive/ax_lang_compiler_ms.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_LANG_COMPILER_MS
-#
-# DESCRIPTION
-#
-#   Check whether the compiler for the current language is Microsoft.
-#
-#   This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU Autoconf
-#   implementation.
-#
-# LICENSE
-#
-#   Copyright (c) 2009 Braden McDaniel <braden@endoframe.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 8
-
-AC_DEFUN([AX_LANG_COMPILER_MS],
-[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler],
-                [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms],
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER
-       choke me
-#endif
-]])],
-                   [ax_compiler_ms=yes],
-                   [ax_compiler_ms=no])
-ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms
-])])