diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/lib/libiberty/src/xmalloc.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/gnu/lib/libiberty/src/xmalloc.c b/gnu/lib/libiberty/src/xmalloc.c index 3e97aab563f..5c95b8b0dd9 100644 --- a/gnu/lib/libiberty/src/xmalloc.c +++ b/gnu/lib/libiberty/src/xmalloc.c @@ -96,44 +96,19 @@ void *sbrk (ptrdiff_t); /* The program name if set. */ static const char *name = ""; -#ifdef HAVE_SBRK -/* The initial sbrk, set when the program name is set. Not used for win32 - ports other than cygwin32. */ -static char *first_break = NULL; -#endif /* HAVE_SBRK */ - void xmalloc_set_program_name (const char *s) { name = s; -#ifdef HAVE_SBRK - /* Win32 ports other than cygwin32 don't have brk() */ - if (first_break == NULL) - first_break = (char *) sbrk (0); -#endif /* HAVE_SBRK */ } void xmalloc_failed (size_t size) { -#ifdef HAVE_SBRK - extern char **environ; - size_t allocated; - - if (first_break != NULL) - allocated = (char *) sbrk (0) - first_break; - else - allocated = (char *) sbrk (0) - (char *) &environ; - fprintf (stderr, - "\n%s%sout of memory allocating %lu bytes after a total of %lu bytes\n", - name, *name ? ": " : "", - (unsigned long) size, (unsigned long) allocated); -#else /* HAVE_SBRK */ fprintf (stderr, "\n%s%sout of memory allocating %lu bytes\n", name, *name ? ": " : "", (unsigned long) size); -#endif /* HAVE_SBRK */ xexit (1); } |