Add support for ia64-hpux target.
[deliverable/binutils-gdb.git] / mmalloc / mcalloc.c
index bc269d5d2d3bd4916fa0964c0d1fc9651715e9e4..c9fcc07e894858f541e74145eced4c70b17c3199 100644 (file)
@@ -13,10 +13,13 @@ Library General Public License for more details.
 
 You should have received a copy of the GNU Library General Public
 License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
-#include "mmalloc.h"
+#include <sys/types.h>  /* GCC on HP/UX needs this before string.h. */
+#include <string.h>    /* Prototypes for memcpy, memmove, memset, etc */
+
+#include "mmprivate.h"
 
 /* Allocate an array of NMEMB elements each SIZE bytes long.
    The entire array is initialized to zeros.  */
@@ -31,7 +34,7 @@ mcalloc (md, nmemb, size)
 
   if ((result = mmalloc (md, nmemb * size)) != NULL)
     {
-      (void) memset (result, 0, nmemb * size);
+      memset (result, 0, nmemb * size);
     }
   return (result);
 }
@@ -40,14 +43,12 @@ mcalloc (md, nmemb, size)
    on top of it, so that if we use the default sbrk() region we will not
    collide with another malloc package trying to do the same thing, if
    the application contains any "hidden" calls to malloc/realloc/free (such
-   as inside a system library).
-
-   NOTE:  Defining our own copy of this breaks ANSI conformance. */
+   as inside a system library). */
 
 PTR
 calloc (nmemb, size)
   size_t nmemb;
   size_t size;
 {
-  return (mcalloc ((void *) NULL, nmemb, size));
+  return (mcalloc ((PTR) NULL, nmemb, size));
 }
This page took 0.023532 seconds and 4 git commands to generate.