From 626a27b7ba3ae0d975e27a546855e3302756ce87 Mon Sep 17 00:00:00 2001 From: dirk Date: Fri, 17 Jun 2016 20:40:27 +0200 Subject: [PATCH] Revert method signature change to fix issue #188. --- MagickCore/utility.c | 7 ++++--- MagickCore/utility.h | 6 +----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/MagickCore/utility.c b/MagickCore/utility.c index 5d47c5e1e..47b4578f1 100644 --- a/MagickCore/utility.c +++ b/MagickCore/utility.c @@ -1148,7 +1148,7 @@ MagickPrivate ssize_t GetMagickPageSize(void) % */ MagickExport MagickBooleanType GetPathAttributes(const char *path, - struct stat *attributes) + void *attributes) { MagickBooleanType status; @@ -1158,8 +1158,9 @@ MagickExport MagickBooleanType GetPathAttributes(const char *path, errno=EINVAL; return(MagickFalse); } - (void) ResetMagickMemory(attributes,0,sizeof(*attributes)); - status=stat_utf8(path,attributes) == 0 ? MagickTrue : MagickFalse; + (void) ResetMagickMemory(attributes,0,sizeof(struct stat)); + status=stat_utf8(path,(struct stat *) attributes) == 0 ? MagickTrue : + MagickFalse; return(status); } diff --git a/MagickCore/utility.h b/MagickCore/utility.h index b51c1c5f1..4c286a860 100644 --- a/MagickCore/utility.h +++ b/MagickCore/utility.h @@ -22,10 +22,6 @@ extern "C" { #endif -#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT) -# include -#endif - typedef enum { UndefinedPath, @@ -46,7 +42,7 @@ extern MagickExport MagickBooleanType AcquireUniqueFilename(char *), AcquireUniqueSymbolicLink(const char *,char *), ExpandFilenames(int *,char ***), - GetPathAttributes(const char *,struct stat *), + GetPathAttributes(const char *,void *), IsPathAccessible(const char *); extern MagickExport size_t -- 2.40.0