summaryrefslogtreecommitdiff
path: root/Xtransutil.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-15 15:06:56 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-15 15:06:56 +0000
commit92e80a5a67273fc60623b17a5f34c239f1ed6947 (patch)
treec558ac6e0366b8e8243db7a7086dace1daed45e2 /Xtransutil.c
parentd92a9d31416a8366cd065886d7ff352fefce646d (diff)
downloadxorg-lib-libxtrans-92e80a5a67273fc60623b17a5f34c239f1ed6947.tar.gz
Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
mingw (Win32) port
Diffstat (limited to 'Xtransutil.c')
-rw-r--r--Xtransutil.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Xtransutil.c b/Xtransutil.c
index 2432ba7..cd22b68 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -472,7 +472,7 @@ TRANS(WSAStartup) (void)
PRMSG (2,"WSAStartup()\n", 0, 0, 0);
- if (!wsadata.wVersion && WSAStartup(MAKEWORD(1,1), &wsadata))
+ if (!wsadata.wVersion && WSAStartup(0x0101, &wsadata))
return 1;
return 0;
}
@@ -498,6 +498,7 @@ is_numeric (char *str)
#include <errno.h>
#if !defined(S_IFLNK) && !defined(S_ISLNK)
+#undef lstat
#define lstat(a,b) stat(a,b)
#endif
@@ -523,6 +524,7 @@ trans_mkdir(char *path, int mode)
}
/* Dir doesn't exist. Try to create it */
+#ifndef WIN32
/*
* 'sticky' bit requested: assume application makes
* certain security implications. If effective user ID
@@ -541,7 +543,9 @@ trans_mkdir(char *path, int mode)
path, 0, 0);
}
}
-
+#endif
+
+#ifndef WIN32
if (mkdir(path, mode) == 0) {
if (chmod(path, mode)) {
PRMSG(1, "mkdir: ERROR: Mode of %s should be set to %04o\n",
@@ -550,6 +554,9 @@ trans_mkdir(char *path, int mode)
return -1;
#endif
}
+#else
+ if (mkdir(path) == 0) {
+#endif
} else {
PRMSG(1, "mkdir: ERROR: Cannot create %s\n",
path, 0, 0);