bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10733: 24.0.93; w32 file truncation


From: Óscar Fuentes
Subject: bug#10733: 24.0.93; w32 file truncation
Date: Mon, 06 Feb 2012 17:16:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Óscar Fuentes <address@hidden> writes:

> I bet it is a bug on the CRT (the stat call that retrieves the file
> size, to be precise). Maybe it is a MinGW thing.

No, it is an Emacs thing. `stat' is defined in lib-src/ntlib.c,
overriding the MSVCRT implementation, which accounts for symlinks, while
Emacs' does not.

Before the definition of `stat' on lib-src/ntlib.c there is this
comment:

/* We need this because nt/inc/sys/stat.h defines struct stat that is
   incompatible with the MS run-time libraries.  */

That looks like an understatement. Actually, we need our own stat
function and struct because the `struct stat' that Emacs uses is
incompatible with the one defined in MSVCRT, right?

The obvious fix does not seem difficult, although ugly and
verbose. OTOH, I'll like to remove the Emacs reimplementation of `stat',
but that looks more cumbersome. How much time we have until the release?

BTW, the obvious fix may require some care for not breaking Emacs
support on MS Windows versions prior to XP. We still support Windows 9x,
don't we?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]