Removed attributes and facets only for Sun CC instead of all non-GNU compilers.
This commit is contained in:
parent
8b54eeeb04
commit
46ce851199
@ -50,7 +50,7 @@ operator>> (istream &i, mpf_ptr f)
|
||||
const char *lconv_point = localeconv()->decimal_point;
|
||||
|
||||
// C++ decimal point
|
||||
#if HAVE_STD__LOCALE && defined (__GNUC__)
|
||||
#if HAVE_STD__LOCALE && !defined (__sun)
|
||||
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 && defined(__GNUC__)
|
||||
#if HAVE_STD__LOCALE && !defined(__sun)
|
||||
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 && defined (__GNUC__)
|
||||
#if HAVE_STD__LOCALE && !defined (__sun)
|
||||
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 && defined (__GNUC__)
|
||||
#if HAVE_STD__LOCALE && !defined (__sun)
|
||||
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) && defined (__GNUC__)
|
||||
#if HAVE_ATTRIBUTE_CONST && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) && !( defined (__cplusplus) && defined (__sun))
|
||||
#define ATTRIBUTE_CONST __attribute__ ((const))
|
||||
#else
|
||||
#define ATTRIBUTE_CONST
|
||||
#endif
|
||||
|
||||
#if HAVE_ATTRIBUTE_NORETURN && defined (__GNUC__)
|
||||
#if HAVE_ATTRIBUTE_NORETURN && !( defined (__cplusplus) && defined (__sun))
|
||||
#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 && defined (__GNUC__)
|
||||
#if HAVE_ATTRIBUTE_MALLOC && !( defined (__cplusplus) && defined (__sun))
|
||||
#define ATTRIBUTE_MALLOC __attribute__ ((malloc))
|
||||
#else
|
||||
#define ATTRIBUTE_MALLOC
|
||||
|
Loading…
Reference in New Issue
Block a user