diff options
author | Bill Schmidt <wschmidt@linux.ibm.com> | 2021-08-23 17:26:43 -0500 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.ibm.com> | 2021-08-23 17:28:37 -0500 |
commit | 192d4edd15cabf1f0e88e5a62142cd252542ea0c (patch) | |
tree | 93040f9f06bab7fbf82ce6e359aff05e1c3801c1 /gcc | |
parent | 596f964f3272081a2320c1220e8aff06ee44fe91 (diff) | |
download | gcc-192d4edd15cabf1f0e88e5a62142cd252542ea0c.zip gcc-192d4edd15cabf1f0e88e5a62142cd252542ea0c.tar.gz gcc-192d4edd15cabf1f0e88e5a62142cd252542ea0c.tar.bz2 |
rs6000: Fix AIX bootstrap (don't call asprintf)
2021-08-23 Bill Schmidt <wschmidt@linux.ibm.com>
gcc/
* config/rs6000/rs6000-gen-builtins.c (parse_bif_entry): Don't call
asprintf, which is not available on AIX.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000-gen-builtins.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c index 8a7505b..000e5f9 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)) { |