]> code.delx.au - gnu-emacs/blobdiff - src/puresize.h
TODO update
[gnu-emacs] / src / puresize.h
index a1b7007805b18b19652c749c6fdb9fdf40cf425c..2f717571c7c7c079730e9a1c202e8bfaaba8ecc8 100644 (file)
@@ -1,5 +1,5 @@
 /* How much read-only Lisp storage a dumped Emacs needs.
-   Copyright (C) 1993, 2001-201 Free Software Foundation, Inc.
+   Copyright (C) 1993, 2001-2013 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -40,16 +40,16 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 
 #ifndef BASE_PURESIZE
-#define BASE_PURESIZE (1620000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (1700000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
 #endif
 
 /* Increase BASE_PURESIZE by a ratio depending on the machine's word size.  */
 #ifndef PURESIZE_RATIO
-#if BITS_PER_EMACS_INT > 32
+#if EMACS_INT_MAX >> 31 != 0
 #if PTRDIFF_MAX >> 31 != 0
-#define PURESIZE_RATIO 10/6    /* Don't surround with `()'. */
+#define PURESIZE_RATIO 10 / 6  /* Don't surround with `()'.  */
 #else
-#define PURESIZE_RATIO 8/6     /* Don't surround with `()'. */
+#define PURESIZE_RATIO 8 / 6   /* Don't surround with `()'.  */
 #endif
 #else
 #define PURESIZE_RATIO 1
@@ -60,7 +60,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* ENABLE_CHECKING somehow increases the purespace used, probably because
    it tends to cause some macro arguments to be evaluated twice.  This is
    a bug, but it's difficult to track it down.  */
-#define PURESIZE_CHECKING_RATIO 12/10  /* Don't surround with `()'. */
+#define PURESIZE_CHECKING_RATIO 12 / 10        /* Don't surround with `()'.  */
 #else
 #define PURESIZE_CHECKING_RATIO 1
 #endif
@@ -75,25 +75,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
   { if (PURE_P (obj))    \
       pure_write_error (); }
 
-extern void pure_write_error (void) NO_RETURN;
+extern _Noreturn void pure_write_error (void);
 \f
 /* Define PURE_P.  */
 
-#ifdef VIRT_ADDR_VARIES
-/* For machines where text and data can go anywhere
-   in virtual memory.  */
-
 extern EMACS_INT pure[];
 
 #define PURE_P(obj) \
- ((PNTR_COMPARISON_TYPE) XPNTR (obj) < (PNTR_COMPARISON_TYPE) ((char *) pure + PURESIZE) \
-  && (PNTR_COMPARISON_TYPE) XPNTR (obj) >= (PNTR_COMPARISON_TYPE) pure)
-
-#else /* not VIRT_ADDR_VARIES */
-
-extern char my_edata[];
-
-#define PURE_P(obj) \
-  ((PNTR_COMPARISON_TYPE) XPNTR (obj) < (PNTR_COMPARISON_TYPE) my_edata)
-
-#endif /* VIRT_ADDRESS_VARIES */
+  ((uintptr_t) XPNTR (obj) - (uintptr_t) pure <= PURESIZE)