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

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

Re: file sizes shown incorrectly for large files under Windows


From: Eli Zaretskii
Subject: Re: file sizes shown incorrectly for large files under Windows
Date: 13 Nov 2003 08:21:24 +0200

> From: Chris Moore <address@hidden>
> Date: Wed, 12 Nov 2003 20:16:48 +0100
> 
> How do you suggest I replace the 'struct stat' definition?
> I need to make sure that it is replaced everywhere, and I don't see
> any obvious place to put my definition.
> 
> Even making a new header file and #include'ing it from each source
> file that does a "#include <stat.h>", or from each source file that
> calls stat() isn't enough.  w32.c for example neither includes
> <stat.h> nor calls stat(), but it does need to see Emacs's 'struct
> stat' replacement, since it handles buffers returned from stat().

Adding the definition to a header file is the right way, I think.

The header should be included by every source file that appears in
the matches for "fgrep 'struct stat'".

I'd suggest to add the definition to w32.h or perhaps to
m/windowsnt.h.  Adding a new header sounds like an overkill to me.

> Perhaps it should #include <stat.h> - is this an oversight?  It turns
> out (for me) that the "#include <stddef.h> /* for offsetof */" line
> causes <stat.h> to be included, but wouldn't it be better to
> explicitly depend on stat.h?

I think it's definitely better to have sys/stat.h included in w32.c
explicitly.





reply via email to

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