From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: Re: Emacs current-time-string core dump on 64-bit hosts Date: Wed, 29 Mar 2006 23:52:31 -0800 Message-ID: <877j6c74jk.fsf@penguin.cs.ucla.edu> References: <87k6arnqsx.fsf@penguin.cs.ucla.edu> <87fyle6luu.fsf@penguin.cs.ucla.edu> <878xqv1rbk.fsf@penguin.cs.ucla.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143718942 19300 80.91.229.2 (30 Mar 2006 11:42:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Mar 2006 11:42:22 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 30 13:42:18 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FOvXd-0001k1-F7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Mar 2006 13:42:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOvXd-0003kx-1j for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Mar 2006 06:42:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FOrxX-0007xp-A4 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2006 02:52:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FOrxT-0007wo-Hw for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2006 02:52:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOrxT-0007wl-B1 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2006 02:52:43 -0500 Original-Received: from [131.179.128.19] (helo=kiwi.cs.ucla.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FOrzR-0004hm-LQ; Thu, 30 Mar 2006 02:54:45 -0500 Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by kiwi.cs.ucla.edu (8.11.7p1+Sun/8.11.7/UCLACS-5.2) with ESMTP id k2U7qV820570; Wed, 29 Mar 2006 23:52:31 -0800 (PST) Original-Received: from eggert by penguin.cs.ucla.edu with local (Exim 4.50) id 1FOrxH-0001NB-1v; Wed, 29 Mar 2006 23:52:31 -0800 Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Tue, 28 Mar 2006 12:16:25 +0200") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-Mailman-Approved-At: Thu, 30 Mar 2006 06:42:15 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15011 Archived-At: Eli Zaretskii writes: > Paul, please re-read the comment in w32.c: it says that ctime returns > NULL when the current directory is on a networked drive. Ah, sorry, I misunderstood that comment. I thought the comment meant that if code did this: stat (".", &sb); p = ctime (&sb.st_mtime); then p is NULL when "." is a networked directory. But from what you write, the comment actually means that, given code like this: t = time (NULL); p = ctime (&t); then p is NULL when "." is a networked directory. Am I understanding you correctly now? Hmm, but if that's the case, why can't w32.c and ntlib.c use this wrapper instead? char * sys_ctime (const time_t *t) { return asctime (localtime (t)); } Is it possible that the actual bug with networked drives is in localtime, not in ctime? If so, shouldn't localtime be wrapped? But localtime is used in a bunch of places, so I'd be a bit surprised if it needed to be wrapped. Or perhaps asctime needs to be wrapped? That would be really strange; I can't imagine why that would be. (Can you tell that I'm somewhat at sea when reasoning about the behavior of Microsoft Windows? :-) Anyway, I think your last draft comment sounds reasonable, though I'd like to understand the bug better before worrying about the details there.