summaryrefslogtreecommitdiffstats
path: root/libvncserver
diff options
context:
space:
mode:
authorDaniel Cohen Gindi <[email protected]>2014-09-20 17:12:40 +0300
committerDaniel Cohen Gindi <[email protected]>2014-09-20 17:46:33 +0300
commit8c58593649f385a8bbaafefc768181d7a24c463d (patch)
treef008a989ceaa433ecebb3ecbb27c12d223f3d713 /libvncserver
parent741a18446c3f6060c6d49472c4bd3039ee4ec057 (diff)
downloadlibtdevnc-8c58593649f385a8bbaafefc768181d7a24c463d.tar.gz
libtdevnc-8c58593649f385a8bbaafefc768181d7a24c463d.zip
Just use a macro to bridge to the Win32 version of `mkdir`
The additional compat_mkdir function was not necessary at all.
Diffstat (limited to 'libvncserver')
-rw-r--r--libvncserver/rfbserver.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index 6972e37..e87fa42 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -43,6 +43,7 @@
#endif
#ifdef WIN32
+#include <io.h>
#define write(sock,buf,len) send(sock,buf,len,0)
#else
#ifdef LIBVNCSERVER_HAVE_UNISTD_H
@@ -90,12 +91,12 @@
#define strdup _strdup
#endif
+#ifdef WIN32
#ifdef __MINGW32__
-static int compat_mkdir(const char *path, int mode)
-{
- return mkdir(path);
-}
-#define mkdir compat_mkdir
+#define mkdir(path, perms) mkdir(path) /* Omit the perms argument to match POSIX signature */
+#else /* MSVC and other windows compilers */
+#define mkdir(path, perms) _mkdir(path) /* Omit the perms argument to match POSIX signature */
+#endif /* __MINGW32__ else... */
#endif
#ifdef LIBVNCSERVER_HAVE_LIBJPEG