Commit 8c585936 authored by Daniel Cohen Gindi's avatar Daniel Cohen Gindi

Just use a macro to bridge to the Win32 version of `mkdir`

The additional compat_mkdir function was not necessary at all.
parent 741a1844
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#endif #endif
#ifdef WIN32 #ifdef WIN32
#include <io.h>
#define write(sock,buf,len) send(sock,buf,len,0) #define write(sock,buf,len) send(sock,buf,len,0)
#else #else
#ifdef LIBVNCSERVER_HAVE_UNISTD_H #ifdef LIBVNCSERVER_HAVE_UNISTD_H
...@@ -90,12 +91,12 @@ ...@@ -90,12 +91,12 @@
#define strdup _strdup #define strdup _strdup
#endif #endif
#ifdef WIN32
#ifdef __MINGW32__ #ifdef __MINGW32__
static int compat_mkdir(const char *path, int mode) #define mkdir(path, perms) mkdir(path) /* Omit the perms argument to match POSIX signature */
{ #else /* MSVC and other windows compilers */
return mkdir(path); #define mkdir(path, perms) _mkdir(path) /* Omit the perms argument to match POSIX signature */
} #endif /* __MINGW32__ else... */
#define mkdir compat_mkdir
#endif #endif
#ifdef LIBVNCSERVER_HAVE_LIBJPEG #ifdef LIBVNCSERVER_HAVE_LIBJPEG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment