diff options
-rw-r--r-- | lang/gcc-aux/Makefile | 4 | ||||
-rw-r--r-- | lang/gcc-aux/files/diff-cxx | 52 |
2 files changed, 45 insertions, 11 deletions
diff --git a/lang/gcc-aux/Makefile b/lang/gcc-aux/Makefile index 801fca06c2f..a3300bdbfee 100644 --- a/lang/gcc-aux/Makefile +++ b/lang/gcc-aux/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.6 2012/10/03 21:56:18 wiz Exp $ +# $NetBSD: Makefile,v 1.7 2013/01/31 23:01:56 marino Exp $ # PKGNAME= gcc-aux-${SNAPSHOT} DISTNAME= gcc-${GCC_VERSION} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/} DISTFILES= ${DISTNAME}.tar.bz2 diff --git a/lang/gcc-aux/files/diff-cxx b/lang/gcc-aux/files/diff-cxx index 8a0cd904a57..8b99f360f66 100644 --- a/lang/gcc-aux/files/diff-cxx +++ b/lang/gcc-aux/files/diff-cxx @@ -622,7 +622,7 @@ + struct ctype_base + { + // Non-standard typedefs. -+ typedef const unsigned char* __to_type; ++ typedef const int* __to_type; + + // NB: Offsets into ctype<char>::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. @@ -746,7 +746,7 @@ +} // namespace --- /dev/null +++ libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h -@@ -0,0 +1,127 @@ +@@ -0,0 +1,161 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000, 2003, 2004, 2005, 2009, 2010 @@ -791,14 +791,38 @@ + bool + ctype<char>:: + is(mask __m, char __c) const -+ { return _M_table[(unsigned char)(__c)] & __m; } ++ { ++ if (_M_table) ++ return _M_table[static_cast<unsigned char>(__c)] & __m; ++ else ++ return __libc_ctype_ [__c + 1] & __m; ++ } + + const char* + ctype<char>:: + is(const char* __low, const char* __high, mask* __vec) const + { -+ while (__low < __high) -+ *__vec++ = _M_table[*__low++]; ++ if (_M_table) ++ while (__low < __high) ++ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; ++ else ++ for (;__low < __high; ++__vec, ++__low) ++ { ++ mask __m = 0; ++ if (this->is(upper, *__low)) __m |= upper; ++ if (this->is(lower, *__low)) __m |= lower; ++ if (this->is(alpha, *__low)) __m |= alpha; ++ if (this->is(digit, *__low)) __m |= digit; ++ if (this->is(xdigit, *__low)) __m |= xdigit; ++ if (this->is(space, *__low)) __m |= space; ++ if (this->is(print, *__low)) __m |= print; ++ if (this->is(graph, *__low)) __m |= graph; ++ if (this->is(cntrl, *__low)) __m |= cntrl; ++ if (this->is(punct, *__low)) __m |= punct; ++ // Do not include explicit line for alnum mask since it is a ++ // pure composite of masks on DragonFly. ++ *__vec = __m; ++ } + return __high; + } + @@ -806,8 +830,13 @@ + ctype<char>:: + scan_is(mask __m, const char* __low, const char* __high) const + { -+ while (__low < __high && !this->is(__m, *__low)) -+ ++__low; ++ if (_M_table) ++ while (__low < __high ++ && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) ++ ++__low; ++ else ++ while (__low < __high && !this->is(__m, *__low)) ++ ++__low; + return __low; + } + @@ -815,8 +844,13 @@ + ctype<char>:: + scan_not(mask __m, const char* __low, const char* __high) const + { -+ while (__low < __high && this->is(__m, *__low) != 0) -+ ++__low; ++ if (_M_table) ++ while (__low < __high ++ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) ++ ++__low; ++ else ++ while (__low < __high && this->is(__m, *__low) != 0) ++ ++__low; + return __low; + } + |