components/gnump/patches/009-ismpf.cc.patch
changeset 219 22d9e175d379
equal deleted inserted replaced
218:2659b05538d8 219:22d9e175d379
       
     1 --- cxx/ismpf.cc.orig	2007-09-01 03:09:03.000000000 -0700
       
     2 +++ cxx/ismpf.cc	2008-04-18 10:10:34.840332673 -0700
       
     3 @@ -21,13 +21,11 @@
       
     4  #include <iostream>
       
     5  #include <string>
       
     6  #include <clocale>    // for localeconv
       
     7 +using namespace std;
       
     8  
       
     9  #include "gmp.h"
       
    10  #include "gmp-impl.h"
       
    11  
       
    12 -using namespace std;
       
    13 -
       
    14 -
       
    15  // For g++ libstdc++ parsing see num_get<chartype,initer>::_M_extract_float
       
    16  // in include/bits/locale_facets.tcc.
       
    17  //
       
    18 @@ -50,7 +48,13 @@
       
    19    // C++ decimal point
       
    20  #if HAVE_STD__LOCALE
       
    21    const locale& loc = i.getloc();
       
    22 -  char point_char = use_facet< numpunct<char> >(loc).decimal_point();
       
    23 +  char point_char =
       
    24 +#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
       
    25 +      use_facet< numpunct<char> >(loc)
       
    26 +#else
       
    27 +      use_facet(loc,(numpunct<char>*)0)
       
    28 +#endif
       
    29 +      .decimal_point();
       
    30  #else
       
    31    const char *point = lconv_point;
       
    32    char point_char = *point;
       
    33 @@ -62,7 +66,12 @@
       
    34      {
       
    35        // C++ isspace
       
    36  #if HAVE_STD__LOCALE
       
    37 -      const ctype<char>& ct = use_facet< ctype<char> >(loc);
       
    38 +      const ctype<char>& ct =
       
    39 +#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
       
    40 +	use_facet< ctype<char> >(loc);
       
    41 +#else
       
    42 +	use_facet(loc,(ctype<char>*)0);
       
    43 +#endif
       
    44  #define cxx_isspace(c)  (ct.is(ctype_base::space,(c)))
       
    45  #else
       
    46  #define cxx_isspace(c)  isspace(c)