comparison src/alloc.c @ 30784:dbc1e69a89a9

[HAVE_UNISTD_H]: Include unistd.h; don't declare sbrk. [!HAVE_UNISTD_H]: Use POINTER_TYPE to declare sbrk. (lisp_free): Declare and make static.
author Dave Love <fx@gnu.org>
date Mon, 14 Aug 2000 14:15:44 +0000
parents 5056adb52e97
children 8ee3740aaf60
comparison
equal deleted inserted replaced
30783:6134e3d42e3b 30784:dbc1e69a89a9
41 #include "keyboard.h" 41 #include "keyboard.h"
42 #include "charset.h" 42 #include "charset.h"
43 #include "syssignal.h" 43 #include "syssignal.h"
44 #include <setjmp.h> 44 #include <setjmp.h>
45 45
46 extern char *sbrk (); 46 #ifdef HAVE_UNISTD_H
47 #include <unistd.h>
48 #else
49 extern POINTER_TYPE *sbrk ();
50 #endif
47 51
48 #ifdef DOUG_LEA_MALLOC 52 #ifdef DOUG_LEA_MALLOC
49 53
50 #include <malloc.h> 54 #include <malloc.h>
51 #define __malloc_size_t int 55 #define __malloc_size_t int
281 285
282 Lisp_Object Vdead; 286 Lisp_Object Vdead;
283 287
284 struct mem_node; 288 struct mem_node;
285 static void *lisp_malloc P_ ((size_t, enum mem_type)); 289 static void *lisp_malloc P_ ((size_t, enum mem_type));
290 static void lisp_free P_ ((POINTER_TYPE *));
286 static void mark_stack P_ ((void)); 291 static void mark_stack P_ ((void));
287 static void init_stack P_ ((Lisp_Object *)); 292 static void init_stack P_ ((Lisp_Object *));
288 static int live_vector_p P_ ((struct mem_node *, void *)); 293 static int live_vector_p P_ ((struct mem_node *, void *));
289 static int live_buffer_p P_ ((struct mem_node *, void *)); 294 static int live_buffer_p P_ ((struct mem_node *, void *));
290 static int live_string_p P_ ((struct mem_node *, void *)); 295 static int live_string_p P_ ((struct mem_node *, void *));
510 515
511 516
512 /* Free BLOCK. This must be called to free memory allocated with a 517 /* Free BLOCK. This must be called to free memory allocated with a
513 call to lisp_malloc. */ 518 call to lisp_malloc. */
514 519
515 void 520 static void
516 lisp_free (block) 521 lisp_free (block)
517 POINTER_TYPE *block; 522 POINTER_TYPE *block;
518 { 523 {
519 BLOCK_INPUT; 524 BLOCK_INPUT;
520 free (block); 525 free (block);