diff options
author | Jason Rumney <jasonr@gnu.org> | 2002-11-27 23:50:54 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2002-11-27 23:50:54 +0000 |
commit | 11d300dba0c28dad55a14b42b96d7aee32f5bd5d (patch) | |
tree | cfe346de1e3e9512fe212ac664d4da3b6715f7a7 /src | |
parent | 670773af778e8ecd853648bb990ba2d7c66472c7 (diff) | |
download | emacs-11d300dba0c28dad55a14b42b96d7aee32f5bd5d.tar.gz |
(Finsert_file_contents): Give a more appropriate error
for files bigger than 2Gb when off_t is 32 bit.
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 69c1446b25d..0b06e4fee34 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3686,8 +3686,11 @@ actually used. */) 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; |