summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2000-04-29 00:35:47 +0200
committerKevin Ryde <user42@zip.com.au>2000-04-29 00:35:47 +0200
commit58a662d6e0e4a42d6fd58e760ec955162dbcbb55 (patch)
tree24808d561f3bf08b8c4c05937b3e1f6f8cad579d /memory.c
parent46cf0b1134813f340e6bd236fa2c7a18b87d6bb9 (diff)
downloadgmp-58a662d6e0e4a42d6fd58e760ec955162dbcbb55.tar.gz
* memory.c: Use <stdlib.h> for malloc etc, and use _PROTO.
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/memory.c b/memory.c
index 9ee1da8a1..25b108e9e 100644
--- a/memory.c
+++ b/memory.c
@@ -20,6 +20,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
#include <stdio.h>
+#include <stdlib.h> /* for malloc, realloc, free */
#include "gmp.h"
#include "gmp-impl.h"
@@ -28,16 +29,12 @@ MA 02111-1307, USA. */
#define static
#endif
-#if __STDC__
-void * (*_mp_allocate_func) (size_t) = _mp_default_allocate;
-void * (*_mp_reallocate_func) (void *, size_t, size_t)
+
+void * (*_mp_allocate_func) _PROTO ((size_t)) = _mp_default_allocate;
+void * (*_mp_reallocate_func) _PROTO ((void *, size_t, size_t))
= _mp_default_reallocate;
-void (*_mp_free_func) (void *, size_t) = _mp_default_free;
-#else
-void * (*_mp_allocate_func) () = _mp_default_allocate;
-void * (*_mp_reallocate_func) () = _mp_default_reallocate;
-void (*_mp_free_func) () = _mp_default_free;
-#endif
+void (*_mp_free_func) _PROTO ((void *, size_t)) = _mp_default_free;
+
/* Default allocation functions. In case of failure to allocate/reallocate
an error message is written to stderr and the program aborts. */