Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch-readline] history file generation on minGW host
@ 2006-03-17  0:15 Denis PILAT
  2006-03-17  0:26 ` Daniel Jacobowitz
  2006-03-17 16:07 ` Eli Zaretskii
  0 siblings, 2 replies; 18+ messages in thread
From: Denis PILAT @ 2006-03-17  0:15 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

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



[-- Attachment #2: readline.patch --]
[-- Type: text/plain, Size: 1095 bytes --]

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 <errno.h>
 #if !defined (errno)

[-- Attachment #3: ChangeLog.gdb --]
[-- Type: text/plain, Size: 118 bytes --]

2006-03-16  Denis Pilat <denis.pilat@st.com>

	* histfile.c (O_BINARY): Avoid \n -> \r\n conversion 
	for minGW host.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2006-03-21 20:02 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-17  0:15 [patch-readline] history file generation on minGW host Denis PILAT
2006-03-17  0:26 ` Daniel Jacobowitz
2006-03-17  0:31   ` Denis PILAT
2006-03-17 16:07 ` Eli Zaretskii
2006-03-17 19:12   ` Denis PILAT
2006-03-17 19:37     ` Chet Ramey
2006-03-21 15:30   ` [patch-readline] history file reading Denis PILAT
2006-03-21 15:32     ` Chet Ramey
2006-03-21 15:38       ` Daniel Jacobowitz
2006-03-21 16:29         ` Andreas Schwab
2006-03-21 16:42           ` Bob Rossi
2006-03-21 16:46             ` Daniel Jacobowitz
2006-03-23  4:55             ` Eli Zaretskii
2006-03-21 19:52         ` Brian J. Fox
2006-03-21 19:55           ` Daniel Jacobowitz
2006-03-21 20:02           ` Andreas Schwab
2006-03-23  5:15             ` Eli Zaretskii
2006-03-23  4:37         ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox