Commit 6b61b957 by Tom Tromey Committed by Tom Tromey

mprec.c (mprec_calloc): Renamed.

	* native/fdlibm/mprec.c (mprec_calloc): Renamed.
	(Balloc): Updated.

From-SVN: r117204
parent 6aa5c6ba
2006-09-25 Tom Tromey <tromey@redhat.com>
* native/fdlibm/mprec.c (mprec_calloc): Renamed.
(Balloc): Updated.
2006-09-25 Mark Wielaard <mark@klomp.org> 2006-09-25 Mark Wielaard <mark@klomp.org>
Suggested by Aaron M. Ucko <ucko@debian.org> Suggested by Aaron M. Ucko <ucko@debian.org>
......
...@@ -101,7 +101,7 @@ typedef unsigned long __ULong; ...@@ -101,7 +101,7 @@ typedef unsigned long __ULong;
typedef long __Long; typedef long __Long;
static void * static void *
_calloc_r (void *ignore, size_t x1, size_t x2) mprec_calloc (void *ignore, size_t x1, size_t x2)
{ {
char *result = (char *) malloc (x1 * x2); char *result = (char *) malloc (x1 * x2);
memset (result, 0, x1 * x2); memset (result, 0, x1 * x2);
...@@ -119,7 +119,7 @@ _DEFUN (Balloc, (ptr, k), struct _reent *ptr _AND int k) ...@@ -119,7 +119,7 @@ _DEFUN (Balloc, (ptr, k), struct _reent *ptr _AND int k)
if (_REENT_MP_FREELIST(ptr) == NULL) if (_REENT_MP_FREELIST(ptr) == NULL)
{ {
/* Allocate a list of pointers to the mprec objects */ /* Allocate a list of pointers to the mprec objects */
_REENT_MP_FREELIST(ptr) = (struct _Bigint **) _calloc_r (ptr, _REENT_MP_FREELIST(ptr) = (struct _Bigint **) mprec_calloc (ptr,
sizeof (struct _Bigint *), sizeof (struct _Bigint *),
new_k); new_k);
if (_REENT_MP_FREELIST(ptr) == NULL) if (_REENT_MP_FREELIST(ptr) == NULL)
...@@ -150,7 +150,7 @@ _DEFUN (Balloc, (ptr, k), struct _reent *ptr _AND int k) ...@@ -150,7 +150,7 @@ _DEFUN (Balloc, (ptr, k), struct _reent *ptr _AND int k)
{ {
x = 1 << k; x = 1 << k;
/* Allocate an mprec Bigint and stick in in the freelist */ /* Allocate an mprec Bigint and stick in in the freelist */
rv = (_Bigint *) _calloc_r (ptr, rv = (_Bigint *) mprec_calloc (ptr,
1, 1,
sizeof (_Bigint) + sizeof (_Bigint) +
(x-1) * sizeof(rv->_x)); (x-1) * sizeof(rv->_x));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment