From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 247C03857427; Sat, 10 Sep 2022 13:14:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 247C03857427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662815687; bh=IjruQ1xCCrMfwITOGEtnMA6Ld96V1yt4F7CiHHQd+80=; h=From:To:Subject:Date:From; b=SWniM9Q3NFeie391BauieP40Khu7yRYo8I0eIQjHEYa+fuCE2AOQiJc3BdgAnpHpS Obb+cxY5BV4WIxfDCMLhTcJz77F+3Sbfy/ahfwR0j1DcniFWlCuK9D4pRN8s7pyrKR SRy8wBlBL7e7nBErcYQbOANNfLBoYLie2ftIjvMg= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2578] libgomp: Use libiberty environ.h to declare the environment pointer. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/heads/master X-Git-Oldrev: 7c4c65d11469d29403d5a88316445ec95cd3c3f8 X-Git-Newrev: 7d37c7f67c1bb75f85ad0c07bfff51ca579e1476 Message-Id: <20220910131447.247C03857427@sourceware.org> Date: Sat, 10 Sep 2022 13:14:47 +0000 (GMT) List-Id: https://gcc.gnu.org/g:7d37c7f67c1bb75f85ad0c07bfff51ca579e1476 commit r13-2578-g7d37c7f67c1bb75f85ad0c07bfff51ca579e1476 Author: Iain Sandoe Date: Sat Sep 10 08:54:37 2022 +0100 libgomp: Use libiberty environ.h to declare the environment pointer. This allows for target-specific mechanisms for finding the pointer. Signed-off-by: Iain Sandoe libgomp/ChangeLog: * env.c (initialize_env): Include libiberty environ.h. Diff: --- libgomp/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/env.c b/libgomp/env.c index 92f32f72020..ac8c764db60 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -60,6 +60,7 @@ #endif /* LIBGOMP_OFFLOADED_ONLY */ #include "secure_getenv.h" +#include "environ.h" /* Default values of ICVs according to the OpenMP standard. */ const struct gomp_default_icv gomp_default_icv_values = { @@ -2033,7 +2034,6 @@ startswith (const char *str, const char *prefix) static void __attribute__((constructor)) initialize_env (void) { - extern char **environ; char **env; int omp_var, dev_num = 0, dev_num_len = 0, i; bool ignore = false;