From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1725) id 8B8793858D35; Mon, 23 Aug 2021 22:28:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B8793858D35 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: William Schmidt To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3100] rs6000: Fix AIX bootstrap (don't call asprintf) X-Act-Checkin: gcc X-Git-Author: Bill Schmidt X-Git-Refname: refs/heads/master X-Git-Oldrev: 596f964f3272081a2320c1220e8aff06ee44fe91 X-Git-Newrev: 192d4edd15cabf1f0e88e5a62142cd252542ea0c Message-Id: <20210823222845.8B8793858D35@sourceware.org> Date: Mon, 23 Aug 2021 22:28:45 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2021 22:28:45 -0000 https://gcc.gnu.org/g:192d4edd15cabf1f0e88e5a62142cd252542ea0c commit r12-3100-g192d4edd15cabf1f0e88e5a62142cd252542ea0c Author: Bill Schmidt Date: Mon Aug 23 17:26:43 2021 -0500 rs6000: Fix AIX bootstrap (don't call asprintf) 2021-08-23 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (parse_bif_entry): Don't call asprintf, which is not available on AIX. Diff: --- gcc/config/rs6000/rs6000-gen-builtins.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c index 8a7505b1b6f..000e5f9a6fd 100644 --- a/gcc/config/rs6000/rs6000-gen-builtins.c +++ b/gcc/config/rs6000/rs6000-gen-builtins.c @@ -1794,8 +1794,9 @@ parse_bif_entry (void) /* Append a number representing the order in which this function was encountered to its name, and save in another lookup structure. */ - char *buf; - asprintf (&buf, "%s:%05d", bifs[curr_bif].idname, curr_bif); + int orig_len = strlen (bifs[curr_bif].idname); + char *buf = (char *) malloc (orig_len + 7); + sprintf (buf, "%s:%05d", bifs[curr_bif].idname, curr_bif); if (!rbt_insert (&bifo_rbt, buf)) {