This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: bash history not restored
- To: earnie_boyd@yahoo.com, Ian Zimmerman <itz@lbin.com>, cygwin@sourceware.cygnus.com
- Subject: Re: bash history not restored
- From: Mark Levedahl <mark.levedahl@trw.com>
- Date: Tue, 25 May 1999 09:55:28 -0400
--- Earnie Boyd <earnie_boyd@yahoo.com> wrote:
> This is a bug in the readline/history libraries used by bash. I
> haven't tracked them down as yet. ...
Simple, really. Bash opens .bash_history in binary mode ONLY with emx.
Following patch fixes things.
Mark Levedahl
diff -ur bash-2.02.1-orig/lib/readline/histfile.c
bash-2.02.1/lib/readline/histfile.c
--- bash-2.02.1-orig/lib/readline/histfile.c Mon Oct 06 12:45:12 1997
+++ bash-2.02.1/lib/readline/histfile.c Tue May 25 08:56:39 1999
@@ -54,15 +54,15 @@
# include <strings.h>
#endif /* !HAVE_STRING_H */
-#if defined (__EMX__)
+#if defined (__EMX__) || defined (__CYGWIN__)
# ifndef O_BINARY
# define O_BINARY 0
# endif
-#else /* !__EMX__ */
+#else /* !__EMX__ && !__CYGWIN__ */
/* If we're not compiling for __EMX__, we don't want this at all.
Ever. */
# undef O_BINARY
# define O_BINARY 0
-#endif /* !__EMX__ */
+#endif /* !__EMX__ && !__CYGWIN__*/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com