summaryrefslogtreecommitdiff
path: root/xmalloc.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2016-09-15 16:59:08 -0400
committerChet Ramey <chet.ramey@case.edu>2016-09-15 16:59:08 -0400
commita0c0a00fc419b7bc08202a79134fcd5bc0427071 (patch)
treecfde1549b35d73504bb539008de4b00e44e8f8fb /xmalloc.c
parent30a978b7d808c067219c95be88c4979b6a7aa251 (diff)
downloadbash-a0c0a00fc419b7bc08202a79134fcd5bc0427071.tar.gz
Bash-4.4 distribution sources and documentationbash-4.4
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 2344d2d5..b32c0685 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- safe versions of malloc and realloc */
-/* Copyright (C) 1991-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of GNU Bash, the GNU Bourne Again SHell.
@@ -61,7 +61,7 @@ static size_t allocated;
/* */
/* **************************************************************** */
-#if defined (HAVE_SBRK)
+#if defined (HAVE_SBRK) && defined (USING_BASH_MALLOC)
#define FINDBRK() \
do { \
if (brkfound == 0) \
@@ -86,7 +86,7 @@ allocerr (func, bytes)
const char *func;
size_t bytes;
{
-#if defined (HAVE_SBRK)
+#if defined (HAVE_SBRK) && defined (USING_BASH_MALLOC)
allocated = findbrk ();
fatal_error (_("%s: cannot allocate %lu bytes (%lu bytes allocated)"), func, (unsigned long)bytes, (unsigned long)allocated);
#else