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

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

Re: Emacs current-time-string core dump on 64-bit hosts


From: Paul Eggert
Subject: Re: Emacs current-time-string core dump on 64-bit hosts
Date: Wed, 29 Mar 2006 23:52:31 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> 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.




reply via email to

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