]> git.eshelyaron.com Git - emacs.git/commitdiff
(Finsert_file_contents): Give a more appropriate error
authorJason Rumney <jasonr@gnu.org>
Wed, 27 Nov 2002 23:50:54 +0000 (23:50 +0000)
committerJason Rumney <jasonr@gnu.org>
Wed, 27 Nov 2002 23:50:54 +0000 (23:50 +0000)
for files bigger than 2Gb when off_t is 32 bit.

src/fileio.c

index 69c1446b25d5ceecc248f74d879f4df60f11d161..0b06e4fee344b5cd3667cb8b24deaa4f1a711158 100644 (file)
@@ -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;