GNU bug report logs - #7001
should `byte-compile-from-buffer' evaluate `binary-overwrite-mode' explicitly?

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Wed, 8 Sep 2010 21:00:03 UTC

Severity: minor

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 7001 <at> debbugs.gnu.org, monkey <at> sandpframing.com, monnier <at> iro.umontreal.ca
Subject: bug#7001: should `byte-compile-from-buffer' evaluate	`binary-overwrite-mode' explicitly?
Date: Sun, 03 Oct 2010 01:43:26 -0400
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Cc: monnier <at> iro.umontreal.ca, 7001 <at> debbugs.gnu.org, monkey <at> sandpframing.com
> Date: Sun, 03 Oct 2010 00:32:15 -0400
> 
> Eli Zaretskii <eliz <at> 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 */




This bug report was last modified 14 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.