]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/utility-private.h
(no commit message)
[imagemagick] / MagickCore / utility-private.h
index 922985e0c09c14fbc9ff9fc8e21b9c58a72d2dbc..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,6 +105,11 @@ static inline FILE *fopen_utf8(const char *path,const char *mode)
 #endif
 }
 
+#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__)
@@ -131,7 +137,7 @@ static inline int open_utf8(const char *path,int flags,mode_t 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;