[Top][All Lists]

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

Re: file sizes shown incorrectly for large files under Windows

From: Jason Rumney
Subject: Re: file sizes shown incorrectly for large files under Windows
Date: 14 Nov 2003 00:12:00 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Chris Moore <address@hidden> writes:

> I hope we don't move to requiring MSVC (non-free) to compile Emacs
> under Windows.

That was never an option.

> I've looked at the MinGW site ( http://www.mingw.org/ ) but not found
> the version which allows me to use 64 bit integers.

It is not a version of MinGW, but a different set of functions in
MSVCRT.DLL (the Windows C library). Something like _stat64, _fstat64

> I don't like the idea of showing ever file of 4Gb and over as 4Gb-1
> bytes

If it is between that and doing nothing, it is still an
improvement. The case you found where Emacs opened a 1 byte buffer
without warning for example would at least produce a warning.

> + #ifdef WINDOWSNT

It is better to avoid this. If it is possible to use __int64 instead
of off_t without breaking anything, then that is preferable to
introducing a new struct, as it avoids conditionals for WINDOWSNT.

> + #ifndef _STAT_DEFINED

Is ms-w32.h ALWAYS included before sys/stat.h? If not, this might

> +     _off_t  st_size;        /* Low 32 bits of file size in bytes */
> +     _off_t  st_size_high;   /* High 32 bits of file size in bytes */
> +     time_t  st_atime;       /* Accessed date (always 00:00 hrs local

If introducing a new struct member, it is usually safest to add it to
the end of the struct.

reply via email to

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