From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; uid problems on w32 Date: Sat, 05 Apr 2008 18:08:07 +0300 Message-ID: References: <47EEBE03.9030104@gmail.com> <47EEE4D9.9090600@gnu.org> <47EF9D73.4000508@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1207408123 26205 80.91.229.12 (5 Apr 2008 15:08:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2008 15:08:43 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, lennart.borgman@gmail.com, monnier@iro.umontreal.ca To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 05 17:09:14 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JiA12-0004Os-VK for ged-emacs-devel@m.gmane.org; Sat, 05 Apr 2008 17:09:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiA0Q-0003CR-1j for ged-emacs-devel@m.gmane.org; Sat, 05 Apr 2008 11:08:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiA0M-00039k-JC for emacs-devel@gnu.org; Sat, 05 Apr 2008 11:08:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiA0J-00034J-Vz for emacs-devel@gnu.org; Sat, 05 Apr 2008 11:08:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiA0J-000348-Rc for emacs-devel@gnu.org; Sat, 05 Apr 2008 11:08:27 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JiA0K-0003Cg-3J for emacs-devel@gnu.org; Sat, 05 Apr 2008 11:08:28 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JiA0J-0006PU-C4 for emacs-pretest-bug@gnu.org; Sat, 05 Apr 2008 11:08:27 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JiA0G-0003C0-8g for emacs-pretest-bug@gnu.org; Sat, 05 Apr 2008 11:08:27 -0400 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JiA0B-0003Af-M4; Sat, 05 Apr 2008 11:08:19 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-231-225.inter.net.il [84.229.231.225]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id FKV47735 (AUTH halo1); Sat, 5 Apr 2008 18:08:06 +0300 (IDT) In-reply-to: <47EF9D73.4000508@gnu.org> (message from Jason Rumney on Sun, 30 Mar 2008 15:02:27 +0100) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94410 gmane.emacs.pretest.bugs:21877 Archived-At: > Date: Sun, 30 Mar 2008 15:02:27 +0100 > From: Jason Rumney > CC: Stefan Monnier , emacs-pretest-bug@gnu.org, > lennart.borgman@gmail.com > > Eli Zaretskii wrote: > > Actually, one (in `struct passwd') is `signed int', the other (in > > `struct stat') is `signed short'. Darn that MS-supplied stat.h! > > > > Yes, this is probably the reason. > > > > Jason, do we have any good reasons to use `struct stat' as declared on > > the system header? > > Not that I'm aware, but I'm probably less familiar with that code than > you are. Okay, I've committed to the trunk several changes to remove dependence on the CRT definition of `struct stat'. There's now a new file nt/inc/sys/stat.h that is used instead. Windows users, please try this and report any problems you see, especially if you use MSVC to compile Emacs, as I don't have Visual Studio installed and could not test with it. As the result of these changes, file-attributes and its ilk will now return a 3-member cons cell when the inode number does not fit into a 32-bit datum; see the doc string of file-attributes for details. If someone thinks this could mean trouble for Lisp code that uses file-attributes, please tell the details. (I already fixed ls-lisp.el to handle this, so this one is not the problem.) The user-visible changes due to this (limited to Windows) are: . inode numbers are now very large (as this is what Windows reports); try "C-u C-x d i RET RET", i.e. invoke Dired with -ali as switches to the (emulated) `ls'. Also, inodes should never be negative, and they should be identical to what "ls -i" reports from the command line. . uid and gid are no longer restricted to 16-bit numbers, and should never be negative; try "C-u C-x d DEL n RET RET", i.e. invoke Dired with -an as switches to `ls' emulation. Note that I didn't yet add to our emulation of `stat' support for Windows native owner's user and group id of files; this will be done later, when all the dust from this change settles.