]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/utility-private.h
(no commit message)
[imagemagick] / MagickCore / utility-private.h
index 4cc4bc2e7889b57c55f0753816006a7e9a2f9c6a..df0160d838acfca94f8fb846e974a5949ed93cd5 100644 (file)
@@ -23,6 +23,7 @@ extern "C" {
 #endif
 
 #include "MagickCore/memory_.h"
+#include "MagickCore/nt-base.h"
 #include "MagickCore/nt-base-private.h"
 
 extern MagickPrivate char
@@ -104,7 +105,12 @@ static inline FILE *fopen_utf8(const char *path,const char *mode)
 #endif
 }
 
-static inline int open_utf8(const char *path,int flags,int mode)
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__CYGWIN__) && !defined(__MINGW32__)
+typedef int
+  mode_t;
+#endif
+
+static inline int open_utf8(const char *path,int flags,mode_t mode)
 {
 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__)
   return(open(path,flags,mode));
@@ -131,7 +137,7 @@ static inline int open_utf8(const char *path,int flags,int mode)
 static inline FILE *popen_utf8(const char *command,const char *type)
 {
 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__)
-  return(fopen(command,type));
+  return(popen(command,type));
 #else
    FILE
      *file;