summaryrefslogtreecommitdiff
path: root/libiberty/setenv.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2015-10-18 10:33:37 +0000
committerIain Sandoe <iains@gcc.gnu.org>2015-10-18 10:33:37 +0000
commitefd40fc4161967fa7e0503f12162c8b28c85d632 (patch)
tree5fc208bc3baf41e825404c97445ff45b58f1f042 /libiberty/setenv.c
parent37341412a50d7389802039e1890df3dca717b9db (diff)
downloadgcc-efd40fc4161967fa7e0503f12162c8b28c85d632.tar.gz
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/setenv.c')
-rw-r--r--libiberty/setenv.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libiberty/setenv.c b/libiberty/setenv.c
index 714ca0a4076..5b51193319d 100644
--- a/libiberty/setenv.c
+++ b/libiberty/setenv.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 2002, 2011 Free Software Foundation,
- Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 2002, 2011, 2015
+ Free Software Foundation, Inc.
This file based on setenv.c in the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -62,11 +62,7 @@ extern int errno;
#endif
#define __environ environ
-#ifndef HAVE_ENVIRON_DECL
-#ifndef environ
-extern char **environ;
-#endif
-#endif
+#include "environ.h"
#undef setenv
#undef unsetenv