Fixed numerous issues which prevented compilation with --enable-cxx on Sun CC.
This commit is contained in:
parent
4f2cb35bc0
commit
811e7de5a7
@ -50,7 +50,7 @@ operator>> (istream &i, mpf_ptr f)
|
||||
const char *lconv_point = localeconv()->decimal_point;
|
||||
|
||||
// C++ decimal point
|
||||
#if HAVE_STD__LOCALE
|
||||
#if HAVE_STD__LOCALE && defined (__GNUC__)
|
||||
const locale& loc = i.getloc();
|
||||
char point_char = use_facet< numpunct<char> >(loc).decimal_point();
|
||||
#else
|
||||
@ -63,7 +63,7 @@ operator>> (istream &i, mpf_ptr f)
|
||||
if (i.flags() & ios::skipws) // skip initial whitespace
|
||||
{
|
||||
// C++ isspace
|
||||
#if HAVE_STD__LOCALE
|
||||
#if HAVE_STD__LOCALE && defined(__GNUC__)
|
||||
const ctype<char>& ct = use_facet< ctype<char> >(loc);
|
||||
#define cxx_isspace(c) (ct.is(ctype_base::space,(c)))
|
||||
#else
|
||||
|
@ -39,7 +39,7 @@ operator>> (istream &i, mpz_ptr z)
|
||||
|
||||
if (i.flags() & ios::skipws) // skip initial whitespace
|
||||
{
|
||||
#if HAVE_STD__LOCALE
|
||||
#if HAVE_STD__LOCALE && defined (__GNUC__)
|
||||
const ctype<char>& ct = use_facet< ctype<char> >(i.getloc());
|
||||
#define cxx_isspace(c) (ct.is(ctype_base::space,(c)))
|
||||
#else
|
||||
|
@ -44,7 +44,7 @@ operator<< (ostream &o, mpf_srcptr f)
|
||||
|
||||
__gmp_doprnt_params_from_ios (¶m, o);
|
||||
|
||||
#if HAVE_STD__LOCALE
|
||||
#if HAVE_STD__LOCALE && defined (__GNUC__)
|
||||
char point[2];
|
||||
point[0] = use_facet< numpunct<char> >(o.getloc()).decimal_point();
|
||||
point[1] = '\0';
|
||||
|
@ -218,13 +218,13 @@ typedef unsigned long gmp_uint_least32_t;
|
||||
is more restrictive than "pure". See info node "(gcc)Function
|
||||
Attributes". __GMP_NO_ATTRIBUTE_CONST_PURE lets tune/common.c etc turn
|
||||
this off when trying to write timing loops. */
|
||||
#if HAVE_ATTRIBUTE_CONST && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE)
|
||||
#if HAVE_ATTRIBUTE_CONST && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) && defined (__GNUC__)
|
||||
#define ATTRIBUTE_CONST __attribute__ ((const))
|
||||
#else
|
||||
#define ATTRIBUTE_CONST
|
||||
#endif
|
||||
|
||||
#if HAVE_ATTRIBUTE_NORETURN
|
||||
#if HAVE_ATTRIBUTE_NORETURN && defined (__GNUC__)
|
||||
#define ATTRIBUTE_NORETURN __attribute__ ((noreturn))
|
||||
#else
|
||||
#define ATTRIBUTE_NORETURN
|
||||
@ -232,7 +232,7 @@ typedef unsigned long gmp_uint_least32_t;
|
||||
|
||||
/* "malloc" means a function behaves like malloc in that the pointer it
|
||||
returns doesn't alias anything. */
|
||||
#if HAVE_ATTRIBUTE_MALLOC
|
||||
#if HAVE_ATTRIBUTE_MALLOC && defined (__GNUC__)
|
||||
#define ATTRIBUTE_MALLOC __attribute__ ((malloc))
|
||||
#else
|
||||
#define ATTRIBUTE_MALLOC
|
||||
@ -2807,7 +2807,7 @@ __GMP_DECLSPEC extern const unsigned char modlimb_invert_table[128];
|
||||
|
||||
|
||||
/* Define stuff for longlong.h. */
|
||||
#if HAVE_ATTRIBUTE_MODE
|
||||
#if HAVE_ATTRIBUTE_MODE && defined (__GNUC__)
|
||||
typedef unsigned int UQItype __attribute__ ((mode (QI)));
|
||||
typedef int SItype __attribute__ ((mode (SI)));
|
||||
typedef unsigned int USItype __attribute__ ((mode (SI)));
|
||||
|
Loading…
Reference in New Issue
Block a user