]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libiberty/xmalloc.c
Daily bump.
[thirdparty/gcc.git] / libiberty / xmalloc.c
index f849aee53e28c8581e662c872c9931bdbcca2b91..3cc4cea37c35f63f7ca5d723c3c35177ea0223a6 100644 (file)
@@ -1,6 +1,5 @@
 /* memory allocation routines with error checking.
-   Copyright 1989, 1990, 1991, 1992, 1993, 1994, 2015
-   Free Software Foundation, Inc.
+   Copyright (C) 1989-2022 Free Software Foundation, Inc.
    
 This file is part of the libiberty library.
 Libiberty is free software; you can redistribute it and/or
@@ -88,7 +87,9 @@ extern "C" {
 void *malloc (size_t);
 void *realloc (void *, size_t);
 void *calloc (size_t, size_t);
+#ifdef HAVE_SBRK
 void *sbrk (ptrdiff_t);
+#endif
 #    ifdef __cplusplus
 }
 #    endif /* __cplusplus */
@@ -138,10 +139,10 @@ xmalloc_failed (size_t size)
   xexit (1);
 }  
 
-PTR
+void *
 xmalloc (size_t size)
 {
-  PTR newmem;
+  void *newmem;
 
   if (size == 0)
     size = 1;
@@ -152,10 +153,10 @@ xmalloc (size_t size)
   return (newmem);
 }
 
-PTR
+void *
 xcalloc (size_t nelem, size_t elsize)
 {
-  PTR newmem;
+  void *newmem;
 
   if (nelem == 0 || elsize == 0)
     nelem = elsize = 1;
@@ -167,10 +168,10 @@ xcalloc (size_t nelem, size_t elsize)
   return (newmem);
 }
 
-PTR
-xrealloc (PTR oldmem, size_t size)
+void *
+xrealloc (void *oldmem, size_t size)
 {
-  PTR newmem;
+  void *newmem;
 
   if (size == 0)
     size = 1;