all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 7001@debbugs.gnu.org, monkey@sandpframing.com
Subject: bug#7001: should `byte-compile-from-buffer' evaluate	`binary-overwrite-mode' explicitly?
Date: Sun, 03 Oct 2010 01:43:26 -0400	[thread overview]
Message-ID: <E1P2HM6-00054V-5I@fencepost.gnu.org> (raw)
In-Reply-To: <87y6af28xc.fsf@stupidchicken.com> (message from Chong Yidong on Sun, 03 Oct 2010 00:32:15 -0400)

> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: monnier@iro.umontreal.ca, 7001@debbugs.gnu.org, monkey@sandpframing.com
> Date: Sun, 03 Oct 2010 00:32:15 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >>
> >> > Most likely this line can be removed from bytecomp.el.
> >>
> >> The comments in bytecomp.el say this is needed for DOS.
> >
> > That comment is obsolete.  All file I/O works in binary mode on DOS
> > and Windows since at least 15 years ago.
> 
> Wow, that's some history ;-)  I've removed the line; thanks.

Just for the record: I meant to say that _Emacs_ file I/O on
DOS/Windows works in binary mode, not that DOS/Windows in general do
that.  The following part in emacs.c does the trick:

  #if defined (MSDOS) || defined (WINDOWSNT)
    /* We do all file input/output as binary files.  When we need to translate
       newlines, we do that manually.  */
    _fmode = O_BINARY;
  #endif /* MSDOS || WINDOWSNT */

  #ifdef MSDOS
    if (!isatty (fileno (stdin)))
      setmode (fileno (stdin), O_BINARY);
    if (!isatty (fileno (stdout)))
      {
	fflush (stdout);
	setmode (fileno (stdout), O_BINARY);
      }
  #endif /* MSDOS */





      reply	other threads:[~2010-10-03  5:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 21:01 bug#7001: should `byte-compile-from-buffer' evaluate `binary-overwrite-mode' explicitly? MON KEY
2010-09-09 17:02 ` Stefan Monnier
2010-10-02 23:11   ` Chong Yidong
2010-10-03  4:04     ` Eli Zaretskii
2010-10-03  4:32       ` Chong Yidong
2010-10-03  5:43         ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1P2HM6-00054V-5I@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=7001@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=monkey@sandpframing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.