From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25103 invoked by alias); 16 Mar 2006 13:44:51 -0000 Received: (qmail 25095 invoked by uid 22791); 16 Mar 2006 13:44:51 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-03.spheriq.net (HELO lon-del-03.spheriq.net) (195.46.50.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 16 Mar 2006 13:44:49 +0000 Received: from lon-out-03.spheriq.net ([195.46.50.131]) by lon-del-03.spheriq.net with ESMTP id k2GDikEo029115 for ; Thu, 16 Mar 2006 13:44:46 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-03.spheriq.net with ESMTP id k2GDijTq000565 for ; Thu, 16 Mar 2006 13:44:45 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id k2GDif9W012083 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Thu, 16 Mar 2006 13:44:44 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C2422DA4C for ; Thu, 16 Mar 2006 13:44:40 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5C450475B2 for ; Thu, 16 Mar 2006 13:48:35 +0000 (GMT) Received: from st.com (crx1177.cro.st.com [164.129.47.77]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CGZ13054 (AUTH "denis pilat"); Thu, 16 Mar 2006 14:44:38 +0100 (CET) Message-ID: <44196BC6.4050503@st.com> Date: Fri, 17 Mar 2006 00:15:00 -0000 From: Denis PILAT User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch-readline] history file generation on minGW host Content-Type: multipart/mixed; boundary="------------040103010307030009030704" X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.2.01 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00214.txt.bz2 This is a multi-part message in MIME format. --------------040103010307030009030704 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 341 On minGW host, history file are open in text mode, that's imply windows specific carriage return to be inserted ( \n -> \r\n conversion performed) and prevents windows history file to be compliant with linux one's. When using current history file for windows, "^M" appears at each end of line. This patch fixes this problem. -- Denis --------------040103010307030009030704 Content-Type: text/plain; name="readline.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="readline.patch" Content-length: 1095 Index: readline/histfile.c =================================================================== --- readline/histfile.c (revision 368) +++ readline/histfile.c (working copy) @@ -70,17 +70,18 @@ #endif /* HAVE_MMAP */ /* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment - on win 95/98/nt), we want to open files with O_BINARY mode so that there + on win 95/98/nt) or __MINGW32__ (pure windows environment), + we want to open files with O_BINARY mode so that there is no \n -> \r\n conversion performed. On other systems, we don't want to mess around with O_BINARY at all, so we ensure that it's defined to 0. */ -#if defined (__EMX__) || defined (__CYGWIN__) +#if defined (__EMX__) || defined (__CYGWIN__) || defined (__MINGW32__) # ifndef O_BINARY # define O_BINARY 0 # endif -#else /* !__EMX__ && !__CYGWIN__ */ +#else /* !__EMX__ && !__CYGWIN__ && !__MINGW32__ */ # undef O_BINARY # define O_BINARY 0 -#endif /* !__EMX__ && !__CYGWIN__ */ +#endif /* !__EMX__ && !__CYGWIN__ && !__MINGW32__ */ #include #if !defined (errno) --------------040103010307030009030704 Content-Type: text/plain; name="ChangeLog.gdb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ChangeLog.gdb" Content-length: 118 2006-03-16 Denis Pilat * histfile.c (O_BINARY): Avoid \n -> \r\n conversion for minGW host. --------------040103010307030009030704--