diff options
Diffstat (limited to 'xkb/ddxLoad.c')
-rw-r--r-- | xkb/ddxLoad.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index d462957f4..2d00a3430 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -104,7 +104,7 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, const char *xkbbindir = emptystring; const char *xkbbindirsep = emptystring; -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) /* WIN32 has no popen. The input must be stored in a file which is used as input for xkbcomp. xkbcomp does not read from stdin. */ char tmpname[PATH_MAX]; @@ -117,9 +117,9 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) strcpy(tmpname, Win32TempDir()); - strcat(tmpname, "\\xkb_XXXXXX"); + strcat(tmpname, PATHSEPARATOR "xkb_XXXXXX"); (void) mktemp(tmpname); #endif @@ -158,7 +158,7 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, return FALSE; } -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN__) out = Popen(buf, "w"); #else out = fopen(tmpname, "w"); @@ -172,7 +172,7 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, } #endif XkbWriteXKBKeymapForNames(out, names, xkb, want, need); -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN__) if (Pclose(out) == 0) #else if (fclose(out) == 0 && System(buf) >= 0) @@ -184,14 +184,14 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, strlcpy(nameRtrn, keymap, nameRtrnLen); } free(buf); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) unlink(tmpname); #endif return TRUE; } else LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) /* remove the temporary file */ unlink(tmpname); #endif |