From 6eca6c43be8b3fa84a47153424b14886d530f110 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 28 Oct 2014 23:25:21 +0000 Subject: merge from gcc --- include/ChangeLog | 8 ++++++++ include/libiberty.h | 27 +++++++++++++++++++++++++++ include/longlong.h | 4 ++++ 3 files changed, 39 insertions(+) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index ebf6c8815..67d397155 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2014-10-28 Richard Henderson + + * longlong.h [__alpha] (umul_ppmm): Disable for c++. + +2014-10-28 Yury Gribov + + * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes. + 2014-10-27 Phil Muldoon Jan Kratochvil Tom Tromey diff --git a/include/libiberty.h b/include/libiberty.h index d09c9a548..571e85f1e 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -655,6 +655,33 @@ extern size_t strnlen (const char *, size_t); extern int strverscmp (const char *, const char *); #endif +#if defined(HAVE_DECL_STRTOL) && !HAVE_DECL_STRTOL +extern long int strtol (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_DECL_STRTOUL) && !HAVE_DECL_STRTOUL +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 +__extension__ +extern long long int strtoll (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOULL) && !HAVE_DECL_STRTOULL +__extension__ +extern unsigned long long int strtoull (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP +/* Compare version strings. */ +extern int strverscmp (const char *, const char *); +#endif + /* Set the title of a process */ extern void setproctitle (const char *name, ...); diff --git a/include/longlong.h b/include/longlong.h index 42c68ddd6..8cd2c7989 100644 --- a/include/longlong.h +++ b/include/longlong.h @@ -139,6 +139,9 @@ extern const UQItype __clz_tab[256] attribute_hidden; #endif /* __aarch64__ */ #if defined (__alpha) && W_TYPE_SIZE == 64 +/* There is a bug in g++ before version 5 that + errors on __builtin_alpha_umulh. */ +#if !defined(__cplusplus) || __GNUC__ >= 5 #define umul_ppmm(ph, pl, m0, m1) \ do { \ UDItype __m0 = (m0), __m1 = (m1); \ @@ -146,6 +149,7 @@ extern const UQItype __clz_tab[256] attribute_hidden; (pl) = __m0 * __m1; \ } while (0) #define UMUL_TIME 46 +#endif /* !c++ */ #ifndef LONGLONG_STANDALONE #define udiv_qrnnd(q, r, n1, n0, d) \ do { UDItype __r; \ -- cgit v1.2.3