aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp/xkbcomp.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
committermarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
commitda8fe31a7ba4acf109097d5696ad0145b991cdfd (patch)
tree1c74d6f075702a73e557872f2a6f020ea4eb5432 /xkbcomp/xkbcomp.c
parent6590f805a12779909cb8504c230fa367148fe38c (diff)
parent529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff)
downloadvcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip
Changes for VC compilation
Diffstat (limited to 'xkbcomp/xkbcomp.c')
-rw-r--r--xkbcomp/xkbcomp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xkbcomp/xkbcomp.c b/xkbcomp/xkbcomp.c
index 111a7b371..419fccdda 100644
--- a/xkbcomp/xkbcomp.c
+++ b/xkbcomp/xkbcomp.c
@@ -438,7 +438,8 @@ register int i,tmp;
if (warningLevel>8) {
WARN1("Changing root directory to \"%s\"\n",rootDir);
}
- if ((chdir(rootDir)<0) && (warningLevel>0)) {
+ XkbAddDirectoryToPath(rootDir);
+ if (!XkbAddDirectoryToPath(rootDir) && (warningLevel>0)) {
WARN1("Couldn't change directory to \"%s\"\n",rootDir);
ACTION("Root directory (-R) option ignored\n");
rootDir= NULL;
@@ -919,8 +920,12 @@ Status status;
break;
}
#endif
+#ifdef _MSC_VER
+ outputFileFd= open(outputFile, O_WRONLY|O_CREAT|O_EXCL|binMode,_S_IREAD | _S_IWRITE);
+#else
outputFileFd= open(outputFile, O_WRONLY|O_CREAT|O_EXCL,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH|binMode);
+#endif
if (outputFileFd<0) {
ERROR1("Cannot open \"%s\" to write keyboard description\n",
outputFile);