aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp/xkbcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkbcomp/xkbcomp.c')
-rw-r--r--xkbcomp/xkbcomp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xkbcomp/xkbcomp.c b/xkbcomp/xkbcomp.c
index 2a3e8f48a..6b48c2f1c 100644
--- a/xkbcomp/xkbcomp.c
+++ b/xkbcomp/xkbcomp.c
@@ -552,8 +552,8 @@ parseArgs(int argc, char *argv[])
{
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;
@@ -1144,10 +1144,14 @@ main(int argc, char *argv[])
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