Mercurial > emacs
changeset 48562:b3e8e8c5face
(Finsert_file_contents): Give a more appropriate error
for files bigger than 2Gb when off_t is 32 bit.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 27 Nov 2002 23:50:54 +0000 |
parents | b4fb06f61bfd |
children | 26e19e854ef3 |
files | src/fileio.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Wed Nov 27 23:48:33 2002 +0000 +++ b/src/fileio.c Wed Nov 27 23:50:54 2002 +0000 @@ -3686,8 +3686,11 @@ record_unwind_protect (close_file_unwind, make_number (fd)); /* Supposedly happens on VMS. */ + /* Can happen on any platform that uses long as type of off_t, but allows + file sizes to exceed 2Gb. VMS is no longer officially supported, so + give a message suitable for the latter case. */ if (! not_regular && st.st_size < 0) - error ("File size is negative"); + error ("Maximum buffer size exceeded"); /* Prevent redisplay optimizations. */ current_buffer->clip_changed = 1;