]> git.eshelyaron.com Git - emacs.git/commitdiff
* unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 05:55:57 +0000 (22:55 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 05:55:57 +0000 (22:55 -0700)
src/ChangeLog
src/unexelf.c

index 8e74e4a630ed5c4c628192775d95516809ab1411..9c7cf3cba9a050508f363b273bc67a6f11b7cf6a 100644 (file)
@@ -1,5 +1,7 @@
 2011-06-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
+
        * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
 
        * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
index 8b45894f853fb35ccdb5ef15a52e4b182581a456..951e7c0eea6274bcd753469b792f6af5bb4e6971 100644 (file)
@@ -391,6 +391,7 @@ temacs:
 extern void fatal (const char *msgid, ...);
 
 #include <sys/types.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <sys/stat.h>
 #include <memory.h>
@@ -784,7 +785,7 @@ unexec (const char *new_name, const char *old_name)
   fprintf (stderr, "new_data2_incr %x\n", new_data2_incr);
 #endif
 
-  if ((unsigned) new_bss_addr < (unsigned) old_bss_addr + old_bss_size)
+  if ((uintptr_t) new_bss_addr < (uintptr_t) old_bss_addr + old_bss_size)
     fatal (".bss shrank when undumping???\n", 0, 0);
 
   /* Set the output file to the right size.  Allocate a buffer to hold