Alexander Gottwald wrote:

> Sven Köhler wrote:
> 
> > good hint, now it works
> > why? what's the problem using text-mounts with XWin?
> 
> either xkbcomp or XWin opens the file in the wrong mode (they do not 
> specify if the data is binary or text) so it get's opened in the mode
> which was specified with mount. I've just fixed the line in XWin but 
> have not tested if it fails too. But I guess it's xkbcomp which is the 
> problem.

xkbcomp was not aware of binary or text files. I've changed it and xkbcomp
now produces files with same length for binary and text mounts. Attached is 
a patch for this. It also patches the Xserver to open the files in binmode.

A test binary is available:
http://www-user.tu-chemnitz.de/~goal/xfree/xkbcomp.exe.bz2
replace the one in /usr/X11R6/bin und /usr/X11R6/lib/X11/xkb or 
/etc/X11/xkb

If it still fails, please test the patched XWin.exe too
http://www-user.tu-chemnitz.de/~goal/xfree/XWin-binmode.exe.bz2

bye
    ago

NP: Blutengel - Schmerz 2 - Lust
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org           ICQ: 126018723
Index: programs/Xserver/xkb/ddxLoad.c
===================================================================
RCS file: /cvs/xc/programs/Xserver/xkb/ddxLoad.c,v
retrieving revision 3.30
diff -u -r3.30 ddxLoad.c
--- programs/Xserver/xkb/ddxLoad.c      2002/05/31 18:46:06     3.30
+++ programs/Xserver/xkb/ddxLoad.c      2002/11/03 12:29:17
@@ -413,7 +413,7 @@
        else if (strlen(xkm_output_dir)+strlen(mapName)+5 <= PATH_MAX)
            sprintf(buf,"%s%s.xkm",xkm_output_dir,mapName);
        if (buf[0] != '\0')
-           file= fopen(buf,"r");
+           file= fopen(buf,"rb");
        else file= NULL;
     }
     else file= NULL;
Index: programs/xkbcomp/xkbcomp.c
===================================================================
RCS file: /cvs/xc/programs/xkbcomp/xkbcomp.c,v
retrieving revision 3.17
diff -u -r3.17 xkbcomp.c
--- programs/xkbcomp/xkbcomp.c  2002/06/05 00:00:37     3.17
+++ programs/xkbcomp/xkbcomp.c  2002/11/03 14:57:04
@@ -873,16 +873,30 @@
                 * -- Branden Robinson
                 */
                int outputFileFd;
+        int binMode = 0;
+        const char *openMode = "w";
                unlink(outputFile);
+#ifdef O_BINARY
+        switch (outputFormat) {
+            case WANT_XKM_FILE:
+                binMode = O_BINARY;
+                openMode = "wb";
+                break;
+            default:
+                binMode = 0;
+                break;
+        }
+#endif
                outputFileFd= open(outputFile, O_WRONLY|O_CREAT|O_EXCL,
-                           S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+                           S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH|binMode);
                if (outputFileFd<0) {
                    ERROR1("Cannot open \"%s\" to write keyboard description\n",
                                                                outputFile);
                    ACTION("Exiting\n");
                    exit(1);
                }
-               out= fdopen(outputFileFd, "w");
+        
+               out= fdopen(outputFileFd, openMode);
                /* end BR */
                if (out==NULL) {
                    ERROR1("Cannot open \"%s\" to write keyboard description\n",

Reply via email to