Merge from emacs-24; up to 2012-12-21T07:35:02Z!ueno@gnu.org
[bpt/emacs.git] / src / mem-limits.h
index 09be61b..941ccf5 100644 (file)
@@ -1,5 +1,6 @@
 /* Includes for memory limit warnings.
-   Copyright (C) 1990, 1993-1996, 2001-2011  Free Software Foundation, Inc.
+   Copyright (C) 1990, 1993-1996, 2001-2013 Free Software Foundation,
+   Inc.
 
 This file is part of GNU Emacs.
 
@@ -33,15 +34,10 @@ extern int etext;
 # endif
 #endif
 
-typedef unsigned long SIZE;
-
-extern char *start_of_data (void);
-#if defined USE_LSB_TAG
+extern char *start_of_data (void) ATTRIBUTE_CONST;
+#if USE_LSB_TAG || UINTPTR_MAX <= VAL_MAX
 #define EXCEEDS_LISP_PTR(ptr) 0
-#elif defined DATA_SEG_BITS
-#define EXCEEDS_LISP_PTR(ptr) \
-  (((EMACS_UINT) (ptr) & ~DATA_SEG_BITS) >> VALBITS)
 #else
-#define EXCEEDS_LISP_PTR(ptr) ((EMACS_UINT) (ptr) >> VALBITS)
+#define EXCEEDS_LISP_PTR(ptr) \
+  (((uintptr_t) (ptr) & ~DATA_SEG_BITS) >> VALBITS)
 #endif
-