aboutsummaryrefslogtreecommitdiffstats
path: root/src/vm-limit.c
diff options
context:
space:
mode:
authorPaul Eggert2013-02-22 11:23:12 -0800
committerPaul Eggert2013-02-22 11:23:12 -0800
commitfcee50281201215b76621d91885c26cd9936b3f3 (patch)
tree97c9443279758ea22e6d610bd3b320415a146c3c /src/vm-limit.c
parentbba90ab24e80476efcad6b6a770fd5fda522a621 (diff)
downloademacs-fcee50281201215b76621d91885c26cd9936b3f3.tar.gz
emacs-fcee50281201215b76621d91885c26cd9936b3f3.zip
Assume C89 or better.
* ralloc.c (SIZE, POINTER, NIL): * vm-limit.c (POINTER): Remove, replacing all uses with C89 equivalents. These old symbols were present only for porting to pre-C89 platforms.
Diffstat (limited to 'src/vm-limit.c')
-rw-r--r--src/vm-limit.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 9dbb1b884b7..fc7a253325a 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -31,14 +31,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31enum warnlevel { not_warned, warned_75, warned_85, warned_95 }; 31enum warnlevel { not_warned, warned_75, warned_85, warned_95 };
32static enum warnlevel warnlevel; 32static enum warnlevel warnlevel;
33 33
34typedef void *POINTER;
35
36/* Function to call to issue a warning; 34/* Function to call to issue a warning;
37 0 means don't issue them. */ 35 0 means don't issue them. */
38static void (*warn_function) (const char *); 36static void (*warn_function) (const char *);
39 37
40/* Start of data space; can be changed by calling malloc_init. */ 38/* Start of data space; can be changed by calling malloc_init. */
41static POINTER data_space_start; 39static void *data_space_start;
42 40
43/* Number of bytes of writable memory we can expect to be able to get. */ 41/* Number of bytes of writable memory we can expect to be able to get. */
44static size_t lim_data; 42static size_t lim_data;
@@ -123,11 +121,11 @@ static void
123check_memory_limits (void) 121check_memory_limits (void)
124{ 122{
125#ifdef REL_ALLOC 123#ifdef REL_ALLOC
126 extern POINTER (*real_morecore) (ptrdiff_t); 124 extern void *(*real_morecore) (ptrdiff_t);
127#endif 125#endif
128 extern POINTER (*__morecore) (ptrdiff_t); 126 extern void *(*__morecore) (ptrdiff_t);
129 127
130 register POINTER cp; 128 void *cp;
131 size_t five_percent; 129 size_t five_percent;
132 size_t data_size; 130 size_t data_size;
133 enum warnlevel new_warnlevel; 131 enum warnlevel new_warnlevel;
@@ -215,9 +213,9 @@ start_of_data (void)
215{ 213{
216#ifdef BSD_SYSTEM 214#ifdef BSD_SYSTEM
217 extern char etext; 215 extern char etext;
218 return (POINTER)(&etext); 216 return (void *) &etext;
219#elif defined DATA_START 217#elif defined DATA_START
220 return ((POINTER) DATA_START); 218 return (void *) DATA_START;
221#elif defined ORDINARY_LINK 219#elif defined ORDINARY_LINK
222 /* 220 /*
223 * This is a hack. Since we're not linking crt0.c or pre_crt0.c, 221 * This is a hack. Since we're not linking crt0.c or pre_crt0.c,
@@ -225,10 +223,10 @@ start_of_data (void)
225 * is known to live at or near the start of the system crt0.c, and 223 * is known to live at or near the start of the system crt0.c, and
226 * we don't sweat the handful of bytes that might lose. 224 * we don't sweat the handful of bytes that might lose.
227 */ 225 */
228 return ((POINTER) &environ); 226 return (void *) &environ;
229#else 227#else
230 extern int data_start; 228 extern int data_start;
231 return ((POINTER) &data_start); 229 return (void *) &data_start;
232#endif 230#endif
233} 231}
234#endif /* (not CANNOT_DUMP or not SYSTEM_MALLOC) */ 232#endif /* (not CANNOT_DUMP or not SYSTEM_MALLOC) */
@@ -238,7 +236,7 @@ start_of_data (void)
238 WARNFUN specifies the function to call to issue a warning. */ 236 WARNFUN specifies the function to call to issue a warning. */
239 237
240void 238void
241memory_warnings (POINTER start, void (*warnfun) (const char *)) 239memory_warnings (void *start, void (*warnfun) (const char *))
242{ 240{
243 extern void (* __after_morecore_hook) (void); /* From gmalloc.c */ 241 extern void (* __after_morecore_hook) (void); /* From gmalloc.c */
244 242