X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ef0f0304040ee5e0ba503baa77109c99ce54e367..aec3bf9f49c8c0d0356a0e57f362bd0e23206e7d:/src/puresize.h diff --git a/src/puresize.h b/src/puresize.h index a1b7007805..25a11aafbc 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -1,5 +1,5 @@ /* How much read-only Lisp storage a dumped Emacs needs. - Copyright (C) 1993, 2001-2011 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 . */ #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 . */ /* 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 @@ -73,27 +73,13 @@ along with GNU Emacs. If not, see . */ /* Signal an error if OBJ is pure. */ #define CHECK_IMPURE(obj) \ { if (PURE_P (obj)) \ - pure_write_error (); } + pure_write_error (obj); } -extern void pure_write_error (void) NO_RETURN; +extern _Noreturn void pure_write_error (Lisp_Object); /* 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)