https://gcc.gnu.org/g:aa0906b0ae8b02e2f9ad721d6b52cd97b8bce427
commit r17-5769-gaa0906b0ae8b02e2f9ad721d6b52cd97b8bce427 Author: Kael Andrew Alonzo Franco <[email protected]> Date: Fri Oct 30 18:18:32 2026 -0400 libiberty: Declare strto{u,}ll if at least C++11. [PR128228] If at least C++11, then declare strto{u,}ll functions on libiberty.h to fix hppa64-hp-hpux11.11 GCC bootstrap. Bootstrapped on x86_64-pc-linux-gnu. PR bootstrap/128228 include/ChangeLog: * libiberty.h (strtoll, strtoull): Declare if C++11. Diff: --- include/libiberty.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/libiberty.h b/include/libiberty.h index e905f2cf1902..4ed783e6ef91 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -728,16 +728,21 @@ extern unsigned long int strtoul (const char *nptr, char **endptr, int base); #endif -#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOLL) && !HAVE_DECL_STRTOLL +/* hppa64-hp-hpux11.11 GCC bootstrap pass with this and + declare strto{u,}ll if at least C++11. */ +#if (defined(HAVE_LONG_LONG) \ + || (defined(__cplusplus) && __cplusplus >= 201103L)) +# if defined(HAVE_DECL_STRTOLL) && !HAVE_DECL_STRTOLL __extension__ extern long long int strtoll (const char *nptr, char **endptr, int base); -#endif +# endif -#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOULL) && !HAVE_DECL_STRTOULL +# if defined(HAVE_DECL_STRTOULL) && !HAVE_DECL_STRTOULL __extension__ extern unsigned long long int strtoull (const char *nptr, char **endptr, int base); +# endif #endif /* Set the title of a process */
