From: cristy Date: Sun, 6 Jan 2013 15:24:33 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4488 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a5d7f45b2ba420c8ea1e51bec48d3172814def3;p=imagemagick --- diff --git a/MagickCore/animate.c b/MagickCore/animate.c index 0874e4097..65d9d97b8 100644 --- a/MagickCore/animate.c +++ b/MagickCore/animate.c @@ -1420,6 +1420,8 @@ MagickExport Image *XAnimateImages(Display *display, int status; + if (*working_directory == '\0') + (void) CopyMagickString(working_directory,".",MaxTextExtent); status=chdir(working_directory); if (status == -1) (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError, @@ -2847,6 +2849,8 @@ MagickExport Image *XAnimateImages(Display *display, */ directory=getcwd(working_directory,MaxTextExtent); (void) directory; + if (*resource_info->home_directory == '\0') + (void) CopyMagickString(resource_info->home_directory,".",MaxTextExtent); status=chdir(resource_info->home_directory); if (status == -1) (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError, @@ -2918,6 +2922,8 @@ static MagickBooleanType XSaveImage(Display *display, GetPathComponent(image->filename,HeadPath,path); GetPathComponent(image->filename,TailPath,filename); + if (*path == '\0') + (void) CopyMagickString(path,".",MaxTextExtent); status=chdir(path); if (status == -1) (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError, diff --git a/MagickCore/display.c b/MagickCore/display.c index b84510fc9..2d10c28e8 100644 --- a/MagickCore/display.c +++ b/MagickCore/display.c @@ -7201,6 +7201,9 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info, /* Select image. */ + if (*resource_info->home_directory == '\0') + (void) CopyMagickString(resource_info->home_directory,".", + MaxTextExtent); status=chdir(resource_info->home_directory); if (status == -1) (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError, @@ -12560,6 +12563,8 @@ static MagickBooleanType XSaveImage(Display *display, GetPathComponent(image->filename,TailPath,filename); if (*path != '\0') { + if (*path == '\0') + (void) CopyMagickString(path,".",MaxTextExtent); status=chdir(path); if (status == -1) (void) ThrowMagickException(exception,GetMagickModule(), @@ -14532,6 +14537,8 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info, int status; + if (*working_directory == '\0') + (void) CopyMagickString(working_directory,".",MaxTextExtent); status=chdir(working_directory); if (status == -1) (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError, @@ -16145,6 +16152,8 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info, int status; + if (*resource_info->home_directory == '\0') + (void) CopyMagickString(resource_info->home_directory,".",MaxTextExtent); status=chdir(resource_info->home_directory); if (status == -1) (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError, diff --git a/MagickCore/utility.c b/MagickCore/utility.c index 527d3a369..e58580c10 100644 --- a/MagickCore/utility.c +++ b/MagickCore/utility.c @@ -699,9 +699,7 @@ MagickPrivate void ExpandFilename(char *path) % Expansion is ignored for coders "label:" "caption:" "pango:" and "vid:". % Which provide their own '@' meta-character handling. % -% You can see the results of the expansion using "Configure" log -% events. -% +% You can see the results of the expansion using "Configure" log events. % % The returned list should be freed using DestroyStringList(). % @@ -709,7 +707,6 @@ MagickPrivate void ExpandFilename(char *path) % freed (TO BE CHECKED). So a copy of the original pointer (and count) % should be kept separate if they need to be freed later. % -% % The format of the ExpandFilenames function is: % % status=ExpandFilenames(int *number_arguments,char ***arguments) diff --git a/MagickCore/version.h b/MagickCore/version.h index 54464c86c..a8647dc1b 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,17 +27,17 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2013 ImageMagick Studio LLC" -#define MagickSVNRevision "10470:10501M" +#define MagickSVNRevision "10505:10525M" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 8,0,0 #define MagickLibAddendum "-0" #define MagickLibInterface 8 #define MagickLibMinInterface 8 -#define MagickReleaseDate "2013-01-04" +#define MagickReleaseDate "2013-01-06" #define MagickChangeDate "20121005" #define MagickAuthoritativeURL "http://www.imagemagick.org" -#define MagickFeatures "HDRI OpenMP" +#define MagickFeatures "DistributedPixelCache HDRI OpenMP" #define MagickDelegates "bzlib freetype jp2 jpeg lcms lzma ps tiff x xml zlib" #define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-7.0.0/index.html" #if (MAGICKCORE_QUANTUM_DEPTH == 8) diff --git a/configure b/configure index bdb92678b..fd3fc744e 100755 --- a/configure +++ b/configure @@ -3650,7 +3650,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=10470:10501M +MAGICK_SVN_REVISION=10505:10525M @@ -24780,9 +24780,9 @@ LIBS="$MATH_LIBS $LIBS" # # Find socket library # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -$as_echo_n "checking for library containing socket... " >&6; } -if ${ac_cv_search_socket+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -24795,16 +24795,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char socket (); +char gethostbyname (); int main () { -return socket (); +return gethostbyname (); ; return 0; } _ACEOF -for ac_lib in '' socket; do +for ac_lib in '' resolv nsl; do if test -z "$ac_lib"; then ac_res="none required" else @@ -24812,33 +24812,33 @@ for ac_lib in '' socket; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_socket=$ac_res + ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_socket+:} false; then : + if ${ac_cv_search_gethostbyname+:} false; then : break fi done -if ${ac_cv_search_socket+:} false; then : +if ${ac_cv_search_gethostbyname+:} false; then : else - ac_cv_search_socket=no + ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -$as_echo "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if ${ac_cv_search_gethostbyname+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -24851,16 +24851,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char gethostbyname (); +char socket (); int main () { -return gethostbyname (); +return socket (); ; return 0; } _ACEOF -for ac_lib in '' resolv nsl; do +for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else @@ -24868,28 +24868,33 @@ for ac_lib in '' resolv nsl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_gethostbyname=$ac_res + ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_gethostbyname+:} false; then : + if ${ac_cv_search_socket+:} false; then : break fi done -if ${ac_cv_search_gethostbyname+:} false; then : +if ${ac_cv_search_socket+:} false; then : else - ac_cv_search_gethostbyname=no + ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } -ac_res=$ac_cv_search_gethostbyname +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_SOCKET 1" >>confdefs.h + + MAGICK_FEATURES="DistributedPixelCache $MAGICK_FEATURES" + fi diff --git a/configure.ac b/configure.ac index be707b96e..16e91a0de 100755 --- a/configure.ac +++ b/configure.ac @@ -1122,8 +1122,12 @@ AC_SUBST(MATH_LIBS) # # Find socket library # -AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(gethostbyname, resolv nsl) +AC_SEARCH_LIBS(socket, socket, +[ + AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.]) + MAGICK_FEATURES="DistributedPixelCache $MAGICK_FEATURES" +]) 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 socket 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])