From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10733: 24.0.93; w32 file truncation Date: Mon, 06 Feb 2012 19:21:24 +0200 Message-ID: <83vcnjc1yj.fsf@gnu.org> References: <20120205.143400.416428493.Takaaki.Ota@am.sony.com> <20120205.161623.484163522.Takaaki.Ota@am.sony.com> <83zkcwbo7t.fsf@gnu.org> <874nv45y9f.fsf@wanadoo.es> <87zkcw3pjf.fsf@wanadoo.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1328548942 4325 80.91.229.3 (6 Feb 2012 17:22:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2012 17:22:22 +0000 (UTC) Cc: lekktu@gmail.com, Takaaki.Ota@am.sony.com, 10733@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 06 18:22:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RuSGi-0003yC-Mt for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 18:22:20 +0100 Original-Received: from localhost ([::1]:34521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuSGi-0000Qp-89 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 12:22:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuSGa-0000Pb-6G for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:22:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuSGZ-0004HW-23 for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:22:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuSGZ-0004HS-0X for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:22:11 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RuSHN-0003B8-RH for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 12:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Feb 2012 17:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10733 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10733-submit@debbugs.gnu.org id=B10733.132854896812198 (code B ref 10733); Mon, 06 Feb 2012 17:23:01 +0000 Original-Received: (at 10733) by debbugs.gnu.org; 6 Feb 2012 17:22:48 +0000 Original-Received: from localhost ([127.0.0.1]:57427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuSHA-0003Ah-3N for submit@debbugs.gnu.org; Mon, 06 Feb 2012 12:22:48 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:54303) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuSH5-0003AQ-TR for 10733@debbugs.gnu.org; Mon, 06 Feb 2012 12:22:45 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LYZ00A00DVC3B00@a-mtaout20.012.net.il> for 10733@debbugs.gnu.org; Mon, 06 Feb 2012 19:21:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.162.243]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYZ009RAEVLKRB0@a-mtaout20.012.net.il>; Mon, 06 Feb 2012 19:21:22 +0200 (IST) In-reply-to: <87zkcw3pjf.fsf@wanadoo.es> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56576 Archived-At: > From: =C3=93scar Fuentes > Cc: Eli Zaretskii , lekktu@gmail.com, "Ota\, Takaak= i" > Date: Mon, 06 Feb 2012 17:16:52 +0100 >=20 > =C3=93scar Fuentes writes: >=20 > > I bet it is a bug on the CRT (the stat call that retrieves the fi= le > > size, to be precise). Maybe it is a MinGW thing. >=20 > 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. Can you tell the details, please? Specifically, what would it take t= o "account for symlinks" in our implementation of `stat'? You did say symlinks were supposed to be transparent. > Before the definition of `stat' on lib-src/ntlib.c there is this > comment: >=20 > /* We need this because nt/inc/sys/stat.h defines struct stat that = is > incompatible with the MS run-time libraries. */ >=20 > 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? No, you are missing the point of that comment. lib-src/ntlib.c is no= t compiled into Emacs, it's compiled into lib-src programs. Theoretically, since those programs don't need anything fancy from `stat', they could use the stock MSVCRT implementation. But because these programs are compiled with -I../nt/inc, the compiler picks up the definition of `struct stat' that is used by Emacs, and because of this incompatibility lib-src programs cannot use the MSVCRT implementation of `stat'. > The obvious fix does not seem difficult, although ugly and > verbose. Can you please describe the problem, in addition to what you propose to be a solution? > I'll like to remove the Emacs reimplementation of `stat' That is a non-starter. The private implementation of `stat' is neede= d to support Posix features, such as meaningful inode numbers, UID and GID, etc. You won't find anything close to that in MSVCRT. Quite a few parts in Emacs expect those features. > How much time we have until the release? We cannot afford to make such a change before the release, no matter how far away is it, even if I'd agree to that (which I don't). `stat= ' is too central to Emacs operation to make such changes at this time. > BTW, the obvious fix may require some care for not breaking Emacs > support on MS Windows versions prior to XP. We still support Window= s 9x, > don't we? Yes, we do. In fact, Emacs 24.1 will again work on Windows 9X, after it turned out that 23.x (and perhaps also 22.x) didn't.