diff options
author | Roland McGrath <roland@gnu.org> | 2015-10-18 10:33:37 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2015-10-18 10:33:37 +0000 |
commit | efd40fc4161967fa7e0503f12162c8b28c85d632 (patch) | |
tree | 5fc208bc3baf41e825404c97445ff45b58f1f042 /libiberty/xmalloc.c | |
parent | 37341412a50d7389802039e1890df3dca717b9db (diff) | |
download | gcc-efd40fc4161967fa7e0503f12162c8b28c85d632.zip gcc-efd40fc4161967fa7e0503f12162c8b28c85d632.tar.gz gcc-efd40fc4161967fa7e0503f12162c8b28c85d632.tar.bz2 |
Fix PR63758 by using the _NSGetEnviron() API on Darwin
include/
Roland McGrath <roland@gnu.org>
PR other/63758
* environ.h: New file.
libiberty/
Roland McGrath <roland@gnu.org>
Iain Sandoe <iain@codesourcery.com>
PR other/63758
* pex-unix.c: Obtain the environment interface from settings in environ.h
rather than in-line code. Update copyright date.
* setenv.c: Likewise.
* xmalloc.c: Likewise.
Co-Authored-By: Iain Sandoe <iain@codesourcery.com>
From-SVN: r228942
Diffstat (limited to 'libiberty/xmalloc.c')
-rw-r--r-- | libiberty/xmalloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libiberty/xmalloc.c b/libiberty/xmalloc.c index 3e97aab..f849aee 100644 --- a/libiberty/xmalloc.c +++ b/libiberty/xmalloc.c @@ -1,5 +1,6 @@ /* memory allocation routines with error checking. - Copyright 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 2015 + Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -65,6 +66,7 @@ function will be called to print an error message and terminate execution. #endif #include "ansidecl.h" #include "libiberty.h" +#include "environ.h" #include <stdio.h> @@ -117,7 +119,6 @@ void xmalloc_failed (size_t size) { #ifdef HAVE_SBRK - extern char **environ; size_t allocated; if (first_break != NULL) |