Files
amigaos-cross-toolchain6/patches/binutils-2.9.1/libiberty/xmalloc.c.diff
T

30 lines
960 B
Diff

--- binutils-2.9.1/libiberty/xmalloc.c Fri May 1 08:47:56 1998
+++ binutils-2.9.1/libiberty/xmalloc.c Sun Aug 23 00:00:00 1998
@@ -53,7 +53,7 @@ xmalloc_set_program_name (s)
const char *s;
{
name = s;
-#if ! defined (_WIN32) || defined (__CYGWIN32__)
+#if defined (HAVE_SBRK) && (! defined (_WIN32) || defined (__CYGWIN32__))
/* Win32 ports other than cygwin32 don't have brk() */
if (first_break == NULL)
first_break = (char *) sbrk (0);
@@ -71,7 +71,7 @@ xmalloc (size)
newmem = malloc (size);
if (!newmem)
{
-#if ! defined (_WIN32) || defined (__CYGWIN32__)
+#if defined (HAVE_SBRK) && (! defined (_WIN32) || defined (__CYGWIN32__))
extern char **environ;
size_t allocated;
@@ -109,7 +109,7 @@ xrealloc (oldmem, size)
newmem = realloc (oldmem, size);
if (!newmem)
{
-#ifndef __MINGW32__
+#if defined (HAVE_SBRK) && !defined (__MINGW32__)
extern char **environ;
size_t allocated;