This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ddxLoad patch?


On Wed, 17 Sep 2003, Harold L Hunt II wrote:

> Alexander,
> 
> I want to get the following patch that you made to xoncygwin HEAD taken 
> care of:
> 
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/xoncygwin/xc/programs/Xserver/xkb/ddxLoad.c.diff?r1=1.1&r2=1.2 

This is the actual change: 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/xoncygwin/xc/programs/Xserver/xkb/ddxLoad.c.diff?r1=1.1.1.2&r2=1.2

Revision 1.1 is from XFree 4.2. The Import of XFree 4.3 is in the vendor branch
and has the revision 1.1.1.2 assigned.

If you're pulling the diffs from cvs use the command 
cvs diff -r XFREE86_4_3_0

Otherwise you'll get the changes from XFree 4.2 to 4.3 too.

===================================================================
RCS file: /cvsroot/xoncygwin/xc/programs/Xserver/xkb/ddxLoad.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- xoncygwin/xc/programs/Xserver/xkb/ddxLoad.c	2003/06/03 11:13:19	1.1.1.2
+++ xoncygwin/xc/programs/Xserver/xkb/ddxLoad.c	2003/09/07 18:37:19	1.2
@@ -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;

This is far more simple. The "b" flag to the modes is defined in the 
ANSI C standard.

>From the fopen man page:
       The mode string can also include the letter  ``b''  either
       as  a last character or as a character between the charac­
       ters in any of the two-character strings described  above.
       This  is  strictly for compatibility with ANSI X3.159-1989
       (``ANSI C'') and has no effect; the ``b''  is  ignored  on
       all  POSIX  conforming  systems,  including Linux.  (Other
       systems may treat text files and binary files differently,
       and adding the ``b'' may be a good idea if you do I/O to a
       binary file and expect that your program may be ported  to
       non-Unix environments.)

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]