head 1.7; access; symbols pkgsrc-2026Q1:1.7.0.88 pkgsrc-2026Q1-base:1.7 pkgsrc-2025Q4:1.7.0.86 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.84 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.7.0.82 pkgsrc-2025Q2-base:1.7 pkgsrc-2025Q1:1.7.0.80 pkgsrc-2025Q1-base:1.7 pkgsrc-2024Q4:1.7.0.78 pkgsrc-2024Q4-base:1.7 pkgsrc-2024Q3:1.7.0.76 pkgsrc-2024Q3-base:1.7 pkgsrc-2024Q2:1.7.0.74 pkgsrc-2024Q2-base:1.7 pkgsrc-2024Q1:1.7.0.72 pkgsrc-2024Q1-base:1.7 pkgsrc-2023Q4:1.7.0.70 pkgsrc-2023Q4-base:1.7 pkgsrc-2023Q3:1.7.0.68 pkgsrc-2023Q3-base:1.7 pkgsrc-2023Q2:1.7.0.66 pkgsrc-2023Q2-base:1.7 pkgsrc-2023Q1:1.7.0.64 pkgsrc-2023Q1-base:1.7 pkgsrc-2022Q4:1.7.0.62 pkgsrc-2022Q4-base:1.7 pkgsrc-2022Q3:1.7.0.60 pkgsrc-2022Q3-base:1.7 pkgsrc-2022Q2:1.7.0.58 pkgsrc-2022Q2-base:1.7 pkgsrc-2022Q1:1.7.0.56 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.54 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.52 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.50 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.7.0.48 pkgsrc-2021Q1-base:1.7 pkgsrc-2020Q4:1.7.0.46 pkgsrc-2020Q4-base:1.7 pkgsrc-2020Q3:1.7.0.44 pkgsrc-2020Q3-base:1.7 pkgsrc-2020Q2:1.7.0.40 pkgsrc-2020Q2-base:1.7 pkgsrc-2020Q1:1.7.0.20 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.42 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.38 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.7.0.36 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.34 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.32 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.30 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.7.0.28 pkgsrc-2018Q2-base:1.7 pkgsrc-2018Q1:1.7.0.26 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.24 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.22 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.18 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.16 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.7.0.14 pkgsrc-2016Q4-base:1.7 pkgsrc-2016Q3:1.7.0.12 pkgsrc-2016Q3-base:1.7 pkgsrc-2016Q2:1.7.0.10 pkgsrc-2016Q2-base:1.7 pkgsrc-2016Q1:1.7.0.8 pkgsrc-2016Q1-base:1.7 pkgsrc-2015Q4:1.7.0.6 pkgsrc-2015Q4-base:1.7 pkgsrc-2015Q3:1.7.0.4 pkgsrc-2015Q3-base:1.7 pkgsrc-2015Q2:1.7.0.2 pkgsrc-2015Q2-base:1.7 pkgsrc-2015Q1:1.6.0.8 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.6 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.4 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.2 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.4.0.6 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.4 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.2 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.3.0.2 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.2.0.2 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.1.0.4 pkgsrc-2012Q4-base:1.1 pkgsrc-2012Q3:1.1.0.2 pkgsrc-2012Q3-base:1.1; locks; strict; comment @# @; 1.7 date 2015.06.14.19.46.51; author marino; state Exp; branches; next 1.6; commitid i4MzQbttad2UYqpy; 1.6 date 2014.05.09.09.50.47; author marino; state Exp; branches; next 1.5; commitid Oy5437kz9RaFzQzx; 1.5 date 2014.04.30.16.24.39; author marino; state Exp; branches; next 1.4; commitid iQlusHIUi1LI2Jyx; 1.4 date 2013.07.20.19.47.19; author marino; state Exp; branches; next 1.3; commitid jt3g8M0UN9ceifYw; 1.3 date 2013.04.12.15.40.54; author marino; state Exp; branches; next 1.2; 1.2 date 2013.01.31.23.01.56; author marino; state Exp; branches; next 1.1; 1.1 date 2012.07.08.19.30.38; author marino; state Exp; branches; next ; desc @@ 1.7 log @lang/gcc-aux: various fixes, remove NLS option This update is a by-product of working on new package, gcc5-aux, and applying those concepts here. Several changes were made, including: - Version date was not updated when version changed from 4.9.0 => 4.9.2 (revbump occurred instead). Remove revbump and fix date - Remove DragonFly-i386 from permitted platforms. This platform will be completely unsupported when DragonFly 4.2 is released (very soon) - Remove references to OpenBSD and MirBSD. Support was never activated due to technical issues and likely will not happen. - Reindent (cosmetic) - It is seemingly impossible to work around NetBSD's binary compatibility scheme (e.g. __socket30, __nanosleep50). These weak symbols are simply ignored by Ada's pragma Import and no c-tricks seem to avoid conflicts. (Why can't NetBSD use symbol versioning???) Anyway, having NetBSD- specific copies of source files to handle a couple of symbol differences is simply not sustainable, so move to a new scheme where these are replaced on the fly. By the way, this problem basically means that I cannot fix GNAT upstream, even if I found somebody to sponsor getting the NUMEROUS non-ada patches upstream. GCC devs would laugh at me if I describe why I want to introduce so many new but similar files to support NetBSD. So it's very likely never going to happen. - Disable libitm and libcilkrts by default. They are out of scope and not worth building / fixing. - Apparently NLS support doesn't build on NetBSD 6.1? Nobody reported this to me, but there are linking issues. I'm just removing the option (which was on by default) until further notice. Having NLS support on by default was questionable anyway. - Remove exetim mods, this was wrong (for all BSD platforms) - Android support leaked in, but it's not used here - The diff-ada file dropped about 150k in size, and could have been more had the android osinte file been masked too. @ text @--- /dev/null +++ libstdc++-v3/config/locale/dragonfly/c_locale.cc @@@@ -0,0 +1,300 @@@@ +// Wrapper for underlying C-language localization -*- C++ -*- + +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// +// ISO C++ 14882: 22.8 Standard locale categories. +// + +// Written by Benjamin Kosnik + +#include // For errno +#include // For isinf, finite, finitef, fabs +#include // For strof, strtold +#include +#include +#include +#include + +#ifdef _GLIBCXX_HAVE_IEEEFP_H +#include +#endif + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template<> + void + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, + const __c_locale&) throw() + { + // Assumes __s formatted for "C" locale. + char* __old = setlocale(LC_ALL, 0); + const size_t __len = strlen(__old) + 1; + char* __sav = new char[__len]; + memcpy(__sav, __old, __len); + setlocale(LC_ALL, "C"); + char* __sanity; + bool __overflow = false; + +#if !__FLT_HAS_INFINITY__ + errno = 0; +#endif + +#ifdef _GLIBCXX_HAVE_STRTOF + __v = strtof(__s, &__sanity); +#else + double __d = strtod(__s, &__sanity); + __v = static_cast(__d); +#ifdef _GLIBCXX_HAVE_FINITEF + if (!finitef (__v)) + __overflow = true; +#elif defined (_GLIBCXX_HAVE_FINITE) + if (!finite (static_cast (__v))) + __overflow = true; +#elif defined (_GLIBCXX_HAVE_ISINF) + if (isinf (static_cast (__v))) + __overflow = true; +#else + if (fabs(__d) > numeric_limits::max()) + __overflow = true; +#endif +#endif // _GLIBCXX_HAVE_STRTOF + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 23. Num_get overflow result. + if (__sanity == __s || *__sanity != '\0') + { + __v = 0.0f; + __err = ios_base::failbit; + } + else if (__overflow +#if __FLT_HAS_INFINITY__ + || __v == numeric_limits::infinity() + || __v == -numeric_limits::infinity() +#else + || ((__v > 1.0f || __v < -1.0f) && errno == ERANGE) +#endif + ) + { + if (__v > 0.0f) + __v = numeric_limits::max(); + else + __v = -numeric_limits::max(); + __err = ios_base::failbit; + } + + setlocale(LC_ALL, __sav); + delete [] __sav; + } + + template<> + void + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, + const __c_locale&) throw() + { + // Assumes __s formatted for "C" locale. + char* __old = setlocale(LC_ALL, 0); + const size_t __len = strlen(__old) + 1; + char* __sav = new char[__len]; + memcpy(__sav, __old, __len); + setlocale(LC_ALL, "C"); + char* __sanity; + +#if !__DBL_HAS_INFINITY__ + errno = 0; +#endif + + __v = strtod(__s, &__sanity); + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 23. Num_get overflow result. + if (__sanity == __s || *__sanity != '\0') + { + __v = 0.0; + __err = ios_base::failbit; + } + else if ( +#if __DBL_HAS_INFINITY__ + __v == numeric_limits::infinity() + || __v == -numeric_limits::infinity()) +#else + (__v > 1.0 || __v < -1.0) && errno == ERANGE) +#endif + { + if (__v > 0.0) + __v = numeric_limits::max(); + else + __v = -numeric_limits::max(); + __err = ios_base::failbit; + } + + setlocale(LC_ALL, __sav); + delete [] __sav; + } + + template<> + void + __convert_to_v(const char* __s, long double& __v, + ios_base::iostate& __err, const __c_locale&) throw() + { + // Assumes __s formatted for "C" locale. + char* __old = setlocale(LC_ALL, 0); + const size_t __len = strlen(__old) + 1; + char* __sav = new char[__len]; + memcpy(__sav, __old, __len); + setlocale(LC_ALL, "C"); + +#if !__LDBL_HAS_INFINITY__ + errno = 0; +#endif + +#if defined(_GLIBCXX_HAVE_STRTOLD) && !defined(_GLIBCXX_HAVE_BROKEN_STRTOLD) + char* __sanity; + __v = strtold(__s, &__sanity); + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 23. Num_get overflow result. + if (__sanity == __s || *__sanity != '\0') +#else + typedef char_traits::int_type int_type; + int __p = sscanf(__s, "%Lf", &__v); + + if (!__p || static_cast(__p) == char_traits::eof()) +#endif + { + __v = 0.0l; + __err = ios_base::failbit; + } + else if ( +#if __LDBL_HAS_INFINITY__ + __v == numeric_limits::infinity() + || __v == -numeric_limits::infinity()) +#else + (__v > 1.0l || __v < -1.0l) && errno == ERANGE) +#endif + { + if (__v > 0.0l) + __v = numeric_limits::max(); + else + __v = -numeric_limits::max(); + __err = ios_base::failbit; + } + + setlocale(LC_ALL, __sav); + delete [] __sav; + } + + + /* DragonFly's implementation of setlocale won't accept something like + "de_DE". According to nls manpage, the expected format is: + language[_territory][.codeset][@@modifier], but it seems that both + the _territory and .codeset components are required. + + As an attempt to correct for this, we'll tack on ".UTF-8" if + a period is not detected in the locale string. + + There are no locales with modifiers on DragonFly so if found, they + will just be stripped off silently. e.g "de_DE@@euro" will be reduced + to "de_DE". The UTF-8 default would be added after that. + */ + + void + locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale) + { + const size_t size__s = (__s == NULL) ? 1 : strlen (__s); + const char UTF8[] = ".UTF-8"; + char localspec[size__s + 6 + 1]; + + if (__s == NULL) { + localspec[0] = NULL; + } else { + strcpy (localspec, __s); + char * pch = strchr (localspec, '@@'); + if (pch != NULL) + *pch = 0; + + if ( (strchr (__s, '.') == NULL) + && (strcmp (__s, "C") != 0) + && (strcmp (__s, "POSIX") != 0)) + strncat (localspec, UTF8, 6); + } + + const char * result = std::setlocale(LC_ALL, localspec); + + if ((strcmp(result, "C") != 0) && (strcmp (result, localspec) != 0)) + __throw_runtime_error(__N("locale::facet::_S_create_c_locale " + "name not valid")); + __cloc = 0; + } + + void + locale::facet::_S_destroy_c_locale(__c_locale& __cloc) + { __cloc = 0; } + + __c_locale + locale::facet::_S_clone_c_locale(__c_locale&) throw() + { return __c_locale(); } + + __c_locale + locale::facet::_S_lc_ctype_c_locale(__c_locale, const char*) + { return __c_locale(); } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = + { + "LC_CTYPE", + "LC_NUMERIC", + "LC_TIME", + "LC_COLLATE", + "LC_MONETARY", + "LC_MESSAGES" + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + const char* const* const locale::_S_categories = __gnu_cxx::category_names; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +// XXX GLIBCXX_ABI Deprecated +#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT +#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ + extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) +_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); +#endif // _GLIBCXX_LONG_DOUBLE_COMPAT --- /dev/null +++ libstdc++-v3/config/locale/dragonfly/ctype_members.cc @@@@ -0,0 +1,174 @@@@ +// std::ctype implementation details, GNU version -*- C++ -*- + +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// +// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. +// + +// Written by Benjamin Kosnik + +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ + // NB: The other ctype specializations are in src/locale.cc and + // various /config/os/* files. + + ctype_byname::ctype_byname(const char* __s, size_t __refs) + : ctype(0, false, __refs) + { + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_ctype); + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); + } + } + + ctype_byname::~ctype_byname() + { } + +#ifdef _GLIBCXX_USE_WCHAR_T + ctype::__wmask_type + ctype::_M_convert_to_wmask( + const mask __attribute__((__unused__)) __m) const throw() + { + // DragonFly uses the same codes for 'char' as 'wchar_t', so this routine + // never gets called. + return __wmask_type(); + }; + + wchar_t + ctype::do_toupper(wchar_t __c) const + { return towupper(__c); } + + const wchar_t* + ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const + { + while (__lo < __hi) + { + *__lo = towupper(*__lo); + ++__lo; + } + return __hi; + } + + wchar_t + ctype::do_tolower(wchar_t __c) const + { return towlower(__c); } + + const wchar_t* + ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const + { + while (__lo < __hi) + { + *__lo = towlower(*__lo); + ++__lo; + } + return __hi; + } + + wchar_t + ctype:: + do_widen(char __c) const + { return _M_widen[static_cast(__c)]; } + + const char* + ctype:: + do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const + { + while (__lo < __hi) + { + *__dest = _M_widen[static_cast(*__lo)]; + ++__lo; + ++__dest; + } + return __hi; + } + + char + ctype:: + do_narrow(wchar_t __wc, char __dfault) const + { + if (__wc >= 0 && __wc < 128 && _M_narrow_ok) + return _M_narrow[__wc]; + const int __c = wctob(__wc); + return (__c == EOF ? __dfault : static_cast(__c)); + } + + const wchar_t* + ctype:: + do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, + char* __dest) const + { + if (_M_narrow_ok) + while (__lo < __hi) + { + if (*__lo >= 0 && *__lo < 128) + *__dest = _M_narrow[*__lo]; + else + { + const int __c = wctob(*__lo); + *__dest = (__c == EOF ? __dfault : static_cast(__c)); + } + ++__lo; + ++__dest; + } + else + while (__lo < __hi) + { + const int __c = wctob(*__lo); + *__dest = (__c == EOF ? __dfault : static_cast(__c)); + ++__lo; + ++__dest; + } + return __hi; + } + + void + ctype::_M_initialize_ctype() throw() + { + wint_t __i; + for (__i = 0; __i < 128; ++__i) + { + const int __c = wctob(__i); + if (__c == EOF) + break; + else + _M_narrow[__i] = static_cast(__c); + } + if (__i == 128) + _M_narrow_ok = true; + else + _M_narrow_ok = false; + for (size_t __i = 0; + __i < sizeof(_M_widen) / sizeof(wint_t); ++__i) + _M_widen[__i] = btowc(__i); + } +#endif // _GLIBCXX_USE_WCHAR_T +} --- /dev/null +++ libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h @@@@ -0,0 +1,75 @@@@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000, 2003, 2009, 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// +// ISO C++ 14882: 22.1 Locales +// + +// Information as gleaned from /usr/include/ctype.h on DragonFly. + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /// @@brief Base class for ctype. + struct ctype_base + { + // Non-standard typedefs. + typedef const int* __to_type; + + // NB: Offsets into ctype::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. +#ifdef _CTYPE_S + // DragonFly 3.6 and later + typedef unsigned long mask; + static const mask upper = _CTYPE_U; + static const mask lower = _CTYPE_L; + static const mask alpha = _CTYPE_A; + static const mask digit = _CTYPE_D; + static const mask xdigit = _CTYPE_X; + static const mask space = _CTYPE_S; + static const mask print = _CTYPE_R; + static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P; + static const mask cntrl = _CTYPE_C; + static const mask punct = _CTYPE_P; + static const mask alnum = _CTYPE_A | _CTYPE_D; +#else + // DragonFly 3.4 and older + typedef unsigned short mask; + static const mask upper = _CTYPEMASK_U; + static const mask lower = _CTYPEMASK_L; + static const mask alpha = _CTYPEMASK_A; + static const mask digit = _CTYPEMASK_D; + static const mask xdigit = _CTYPEMASK_X; + static const mask space = _CTYPEMASK_S; + static const mask print = _CTYPEMASK_R; + static const mask graph = _CTYPEMASK_G; + static const mask cntrl = _CTYPEMASK_C; + static const mask punct = _CTYPEMASK_P; + static const mask alnum = _CTYPEMASK_A | _CTYPEMASK_D; +#endif + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace --- /dev/null +++ libstdc++-v3/config/os/bsd/dragonfly/ctype_configure_char.cc @@@@ -0,0 +1,99 @@@@ +// Locale support -*- C++ -*- + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @@file ctype_configure_char.cc */ + +// +// ISO C++ 14882: 22.1 Locales +// + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +// Information as gleaned from /usr/include/ctype.h + + const ctype_base::mask* + ctype::classic_table() throw() + { return 0; } + + ctype::ctype(__c_locale, const mask* __table, bool __del, + size_t __refs) + : facet(__refs), _M_del(__table != 0 && __del), + _M_toupper(NULL), _M_tolower(NULL), + _M_table(__table ? __table : classic_table()) + { + memset(_M_widen, 0, sizeof(_M_widen)); + _M_widen_ok = 0; + memset(_M_narrow, 0, sizeof(_M_narrow)); + _M_narrow_ok = 0; + } + + ctype::ctype(const mask* __table, bool __del, size_t __refs) + : facet(__refs), _M_del(__table != 0 && __del), + _M_toupper(NULL), _M_tolower(NULL), + _M_table(__table ? __table : classic_table()) + { + memset(_M_widen, 0, sizeof(_M_widen)); + _M_widen_ok = 0; + memset(_M_narrow, 0, sizeof(_M_narrow)); + _M_narrow_ok = 0; + } + + char + ctype::do_toupper(char __c) const + { return ::toupper((int) __c); } + + const char* + ctype::do_toupper(char* __low, const char* __high) const + { + while (__low < __high) + { + *__low = ::toupper((int) *__low); + ++__low; + } + return __high; + } + + char + ctype::do_tolower(char __c) const + { return ::tolower((int) __c); } + + const char* + ctype::do_tolower(char* __low, const char* __high) const + { + while (__low < __high) + { + *__low = ::tolower((int) *__low); + ++__low; + } + return __high; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace --- /dev/null +++ libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h @@@@ -0,0 +1,187 @@@@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000, 2003, 2004, 2005, 2009, 2010 +// Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @@file bits/ctype_inline.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @@headername{locale} + */ + +// +// ISO C++ 14882: 22.1 Locales +// + +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) +// functions go in ctype.cc + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + bool + ctype:: + is(mask __m, char __c) const + { + if (_M_table) + return _M_table[static_cast(__c)] & __m; + else +#ifdef _CTYPE_S + return __istype(__c, __m); +#else + return __libc_ctype_ [__c + 1] & __m; +#endif + } + + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + if (_M_table) + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + else + for (;__low < __high; ++__vec, ++__low) + { +#ifdef _CTYPE_S + *__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit + | space | print | graph | cntrl | punct | alnum); +#else + 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; +#endif + } + return __high; + } + + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + if (_M_table) + while (__low < __high + && !(_M_table[static_cast(*__low)] & __m)) + ++__low; + else + while (__low < __high && !this->is(__m, *__low)) + ++__low; + return __low; + } + + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + if (_M_table) + while (__low < __high + && (_M_table[static_cast(*__low)] & __m) != 0) + ++__low; + else + while (__low < __high && this->is(__m, *__low) != 0) + ++__low; + return __low; + } + +#ifdef _GLIBCXX_USE_WCHAR_T + inline bool + ctype:: + do_is(mask __m, wchar_t __c) const + { +#ifdef _CTYPE_S + return __istype (__c, __m); +#else + return __libc_ctype_ [__c + 1] & __m; +#endif + } + + inline const wchar_t* + ctype:: + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const + { + for (; __lo < __hi; ++__vec, ++__lo) +#ifdef _CTYPE_S + *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit + | space | print | graph | cntrl | punct | alnum); +#else + { + mask __m = 0; + if (isupper (*__lo)) __m |= _CTYPEMASK_U; + if (islower (*__lo)) __m |= _CTYPEMASK_L; + if (isdigit (*__lo)) __m |= _CTYPEMASK_D; + if (isspace (*__lo)) __m |= _CTYPEMASK_S; + if (ispunct (*__lo)) __m |= _CTYPEMASK_P; + if (isblank (*__lo)) __m |= _CTYPEMASK_B; + if (iscntrl (*__lo)) __m |= _CTYPEMASK_C; + if (isalpha (*__lo)) __m |= _CTYPEMASK_A; + if (isgraph (*__lo)) __m |= _CTYPEMASK_G; + if (isprint (*__lo)) __m |= _CTYPEMASK_R; + if (isxdigit(*__lo)) __m |= _CTYPEMASK_X; + /* alnum already covered = alpha | digit */ + + *__vec = __m; + } +#endif + return __hi; + } + + inline const wchar_t* + ctype:: + do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const + { +#ifdef _CTYPE_S + while (__lo < __hi && ! __istype (*__lo, __m)) +#else + while (__lo < __hi && !(__libc_ctype_ [*__lo + 1] & __m)) +#endif + ++__lo; + return __lo; + } + + inline const wchar_t* + ctype:: + do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { +#ifdef _CTYPE_S + while (__lo < __hi && __istype (*__lo, __m)) +#else + while (__lo < __hi && (__libc_ctype_ [*__lo + 1] & __m)) +#endif + ++__lo; + return __lo; + } +#endif + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace --- /dev/null +++ libstdc++-v3/config/os/bsd/dragonfly/os_defines.h @@@@ -0,0 +1,41 @@@@ +// Specific definitions for BSD -*- C++ -*- + +// Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + + +#ifndef _GLIBCXX_OS_DEFINES +#define _GLIBCXX_OS_DEFINES 1 + +// System-specific #define, typedefs, corrections, etc, go here. This +// file will come before all others. + +/* FreeBSD approach, likely a mistake for DragonFly. +#define _GLIBCXX_USE_C99_CHECK 1 +#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999)) +#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1 +#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED) +#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK 1 +#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC defined _XOPEN_SOURCE +*/ + +#endif --- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig +++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h @@@@ -1,6 +1,6 @@@@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2014 Free Software Foundation, Inc. +// Copyright (C) 2000, 2009, 2011, 2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@@@ -30,7 +30,7 @@@@ // Full details can be found from the CVS files at: // anoncvs@@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h // See www.netbsd.org for details of access. - + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@@@ -43,21 +43,22 @@@@ // NB: Offsets into ctype::_M_table force a particular size // on the mask type. Because of this, we don't use an enum. - typedef unsigned char mask; -#ifndef _CTYPE_U - static const mask upper = _U; - static const mask lower = _L; - static const mask alpha = _U | _L; - static const mask digit = _N; - static const mask xdigit = _N | _X; - static const mask space = _S; - static const mask print = _P | _U | _L | _N | _B; - static const mask graph = _P | _U | _L | _N; - static const mask cntrl = _C; - static const mask punct = _P; - static const mask alnum = _U | _L | _N; -#else +#if defined(_CTYPE_BL) + typedef unsigned short mask; + static const mask upper = _CTYPE_U; + static const mask lower = _CTYPE_L; + static const mask alpha = _CTYPE_A; + static const mask digit = _CTYPE_D; + static const mask xdigit = _CTYPE_X; + static const mask space = _CTYPE_S; + static const mask print = _CTYPE_R; + static const mask graph = _CTYPE_G; + static const mask cntrl = _CTYPE_C; + static const mask punct = _CTYPE_P; + static const mask alnum = _CTYPE_A | _CTYPE_D; +#elif defined(_CTYPE_U) + typedef unsigned char mask; static const mask upper = _CTYPE_U; static const mask lower = _CTYPE_L; static const mask alpha = _CTYPE_U | _CTYPE_L; @@@@ -69,6 +70,19 @@@@ static const mask cntrl = _CTYPE_C; static const mask punct = _CTYPE_P; static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_N; +#else + typedef unsigned char mask; + static const mask upper = _U; + static const mask lower = _L; + static const mask alpha = _U | _L; + static const mask digit = _N; + static const mask xdigit = _N | _X; + static const mask space = _S; + static const mask print = _P | _U | _L | _N | _B; + static const mask graph = _P | _U | _L | _N; + static const mask cntrl = _C; + static const mask punct = _P; + static const mask alnum = _U | _L | _N; #endif }; --- libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc.orig +++ libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc @@@@ -1,6 +1,6 @@@@ // Locale support -*- C++ -*- -// Copyright (C) 2011-2014 Free Software Foundation, Inc. +// Copyright (C) 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@@@ -38,11 +38,17 @@@@ // Information as gleaned from /usr/include/ctype.h +#ifndef _CTYPE_BL extern "C" const u_int8_t _C_ctype_[]; +#endif const ctype_base::mask* ctype::classic_table() throw() +#ifdef _CTYPE_BL + { return _C_ctype_tab_ + 1; } +#else { return _C_ctype_ + 1; } +#endif ctype::ctype(__c_locale, const mask* __table, bool __del, size_t __refs) @@@@ -69,14 +75,14 @@@@ char ctype::do_toupper(char __c) const - { return ::toupper((int) __c); } + { return ::toupper((int)(unsigned char) __c); } const char* ctype::do_toupper(char* __low, const char* __high) const { while (__low < __high) { - *__low = ::toupper((int) *__low); + *__low = ::toupper((int)(unsigned char) *__low); ++__low; } return __high; @@@@ -84,14 +90,14 @@@@ char ctype::do_tolower(char __c) const - { return ::tolower((int) __c); } + { return ::tolower((int)(unsigned char) __c); } const char* ctype::do_tolower(char* __low, const char* __high) const { while (__low < __high) { - *__low = ::tolower((int) *__low); + *__low = ::tolower((int)(unsigned char) *__low); ++__low; } return __high; --- libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h.orig +++ libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h @@@@ -1,6 +1,6 @@@@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2014 Free Software Foundation, Inc. +// Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@@@ -48,7 +48,7 @@@@ is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) - *__vec++ = _M_table[*__low++]; + *__vec++ = _M_table[(unsigned char)*__low++]; return __high; } --- libstdc++-v3/acinclude.m4.orig +++ libstdc++-v3/acinclude.m4 @@@@ -1989,6 +1989,9 @@@@ darwin* | freebsd*) enable_clocale_flag=darwin ;; + dragonfly*) + enable_clocale_flag=dragonfly + ;; openbsd*) enable_clocale_flag=newlib ;; @@@@ -2075,6 +2078,23 @@@@ CMESSAGES_H=config/locale/generic/messages_members.h CMESSAGES_CC=config/locale/generic/messages_members.cc CMONEY_CC=config/locale/generic/monetary_members.cc + CNUMERIC_CC=config/locale/generic/numeric_members.cc + CTIME_H=config/locale/generic/time_members.h + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; + + dragonfly) + AC_MSG_RESULT(dragonfly) + + CLOCALE_H=config/locale/generic/c_locale.h + CLOCALE_CC=config/locale/dragonfly/c_locale.cc + CCODECVT_CC=config/locale/generic/codecvt_members.cc + CCOLLATE_CC=config/locale/generic/collate_members.cc + CCTYPE_CC=config/locale/dragonfly/ctype_members.cc + CMESSAGES_H=config/locale/generic/messages_members.h + CMESSAGES_CC=config/locale/generic/messages_members.cc + CMONEY_CC=config/locale/generic/monetary_members.cc CNUMERIC_CC=config/locale/generic/numeric_members.cc CTIME_H=config/locale/generic/time_members.h CTIME_CC=config/locale/generic/time_members.cc --- libstdc++-v3/configure.orig +++ libstdc++-v3/configure @@@@ -15849,6 +15849,9 @@@@ darwin* | freebsd*) enable_clocale_flag=darwin ;; + dragonfly*) + enable_clocale_flag=dragonfly + ;; openbsd*) enable_clocale_flag=newlib ;; @@@@ -15988,6 +15991,24 @@@@ CMESSAGES_H=config/locale/generic/messages_members.h CMESSAGES_CC=config/locale/generic/messages_members.cc CMONEY_CC=config/locale/generic/monetary_members.cc + CNUMERIC_CC=config/locale/generic/numeric_members.cc + CTIME_H=config/locale/generic/time_members.h + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; + + dragonfly) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dragonfly" >&5 +$as_echo "dragonfly" >&6; } + + CLOCALE_H=config/locale/generic/c_locale.h + CLOCALE_CC=config/locale/dragonfly/c_locale.cc + CCODECVT_CC=config/locale/generic/codecvt_members.cc + CCOLLATE_CC=config/locale/generic/collate_members.cc + CCTYPE_CC=config/locale/dragonfly/ctype_members.cc + CMESSAGES_H=config/locale/generic/messages_members.h + CMESSAGES_CC=config/locale/generic/messages_members.cc + CMONEY_CC=config/locale/generic/monetary_members.cc CNUMERIC_CC=config/locale/generic/numeric_members.cc CTIME_H=config/locale/generic/time_members.h CTIME_CC=config/locale/generic/time_members.cc --- libstdc++-v3/configure.host.orig +++ libstdc++-v3/configure.host @@@@ -230,6 +230,12 @@@@ os_include_dir="os/generic" atomicity_dir="cpu/generic" ;; + dragonfly*) + os_include_dir="os/bsd/dragonfly" + ;; + linux-androideabi) + os_include_dir="os/bionic" + ;; bsd*) # Plain BSD attempts to share FreeBSD files. os_include_dir="os/bsd/freebsd" @ 1.6 log @lang/gcc-aux: Primarily add Solaris i386 and x86_64 targets I was never able to build gcc-aux with multilib support when it was based on gcc 4.7. It turns out that this is because Ada support for multilib was broken per GCC's bugzilla. It's been fixed since. After some significant effort and many hours, I finally produced a multilib bootstrap for Solaris. It can produce other multilib compilers (x86-64) and it can produce 32-bit only compilers (i386). This was tested on a stock OmniOS x86-64 installation and the Joyent dev area (i386). Solaris has not supported static linking since Solaris 9, so it is not possible to create a static bootstrap like the BSDs have, nor is it possible to build the compiler statically, so that option is disabled. That means it is unlikely that the bootstrap will run on Solaris 10 or Solaris 11, but this theory has not been tested. Much of the changes to the diff-* patchsets are a result of OpenBSD work. An OpenBSD static bootstrap has been created against devel/binutils, and as a result it fails to find system libraries such as libc and libm. That is a side note explaining the OpenBSD additions. There are some DragonFly and NetBSD changes in the diff-* patches though. The bootstrap target was significantly modified, mainly to capture the special needs of creating a Solaris bootstrap. The creation of the bootstrap tarball was put in it's own target. The zlib and math libraries were connected to the bootstrap option. It's not a good idea to use system zlib on Illumos because the zlib header is not guaranteed to be installed. The feature to rebuild the compiler with the installed gcc-aux was fixed; it should use it's own c++ compiler instead of the system c++ compiler. OpenBSD 5.5 does not support "cp -a", so this was changed to "cp -RpP" for portability reasons. @ text @a1051 15 --- libstdc++-v3/config/os/bsd/openbsd/os_defines.h.orig +++ libstdc++-v3/config/os/bsd/openbsd/os_defines.h @@@@ -38,4 +38,12 @@@@ #define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC _GLIBCXX_USE_C99_DYNAMIC #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC _GLIBCXX_USE_C99_DYNAMIC +/* max_align_t is defined in ginclude/stddef.h which OpenBSD intentionally + excludes. Bringing the definition here fixes the libstdc++ build. */ + +typedef struct { + long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); + long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); +} max_align_t; + #endif @ 1.5 log @lang/gcc-aux: Change base of gcc 4.7.3 to gcc 4.9.0 It appears that gcc-aux is the first gcc 4.9.0 in pkgsrc. It's purpose is to build the Ada packages in pkgsrc, but it also supports C, C++, Objective-C, and Fortran languages by default. GCC 4.9 was released on 22 April 2014. Of note, GCC 4.9 fully supports the new Ada-2012 standard. The rest of the changes since GCC 4.8.2 are too numerous to mention, but a decent summary can be found here: http://gcc.gnu.org/gcc-4.9/changes.html FreeBSD support was added, but SunOS support was temporarily disabled. This is due to all new bootstraps being provided, but the SunOS bootstrap is not yet ready. Currently supported platforms are * NetBSD i386 and x86-64 * DragonFly i386 and x86-64 * FreeBSD i386 and x86-64 All platform fully pass the Ada testsuite: * http://www.dragonlace.net/gnataux/netbsd32/ * http://www.dragonlace.net/gnataux/netbsd64/ * http://www.dragonlace.net/gnataux/dragonfly32/ * http://www.dragonlace.net/gnataux/dragonfly64/ * http://www.dragonlace.net/gnataux/freebsd32/ * http://www.dragonlace.net/gnataux/freebsd64/ @ text @d1052 15 @ 1.4 log @lang/gcc-aux: bug fix This commit achieves the following: 1) Fix specific case of falsely identified aggregate array index duplicates. Fix taken from gcc 4.8 source, it apparently will never be backported. 2) Fix typo that caused mktemp to be used in DragonFly 3) Incorporate NetBSD libstdc++ fixes into gcc-aux repository (which is a parallel fork) and regenerate diff-cxx. This enables patches to be removed. @ text @a0 101 --- libstdc++-v3/acinclude.m4.orig +++ libstdc++-v3/acinclude.m4 @@@@ -1903,7 +1903,7 @@@@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ GLIBCXX_ENABLE(clocale,auto,[[[=MODEL]]], [use MODEL for target locale package], - [permit generic|gnu|ieee_1003.1-2001|newlib|yes|no|auto]) + [permit generic|gnu|ieee_1003.1-2001|newlib|darwin|dragonfly|yes|no|auto]) # Deal with gettext issues. Default to not using it (=no) until we detect # support for it later. Let the user turn it off via --e/d, but let that @@@@ -1930,6 +1930,9 @@@@ darwin* | freebsd*) enable_clocale_flag=darwin ;; + dragonfly*) + enable_clocale_flag=dragonfly + ;; *) if test x"$with_newlib" = x"yes"; then enable_clocale_flag=newlib @@@@ -2018,7 +2021,22 @@@@ CTIME_CC=config/locale/generic/time_members.cc CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; + dragonfly) + AC_MSG_RESULT(dragonfly) + CLOCALE_H=config/locale/generic/c_locale.h + CLOCALE_CC=config/locale/dragonfly/c_locale.cc + CCODECVT_CC=config/locale/generic/codecvt_members.cc + CCOLLATE_CC=config/locale/generic/collate_members.cc + CCTYPE_CC=config/locale/dragonfly/ctype_members.cc + CMESSAGES_H=config/locale/generic/messages_members.h + CMESSAGES_CC=config/locale/generic/messages_members.cc + CMONEY_CC=config/locale/generic/monetary_members.cc + CNUMERIC_CC=config/locale/generic/numeric_members.cc + CTIME_H=config/locale/generic/time_members.h + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; gnu) AC_MSG_RESULT(gnu) --- libstdc++-v3/configure.orig +++ libstdc++-v3/configure @@@@ -15738,7 +15738,7 @@@@ if test "${enable_clocale+set}" = set; then : enableval=$enable_clocale; case "$enableval" in - generic|gnu|ieee_1003.1-2001|newlib|yes|no|auto) ;; + generic|gnu|ieee_1003.1-2001|newlib|darwin|dragonfly|yes|no|auto) ;; *) as_fn_error "Unknown argument to enable/disable clocale" "$LINENO" 5 ;; esac @@@@ -15776,6 +15776,9 @@@@ darwin* | freebsd*) enable_clocale_flag=darwin ;; + dragonfly*) + enable_clocale_flag=dragonfly + ;; *) if test x"$with_newlib" = x"yes"; then enable_clocale_flag=newlib @@@@ -15917,7 +15920,23 @@@@ CTIME_CC=config/locale/generic/time_members.cc CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; + dragonfly) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dragonfly" >&5 +$as_echo "dragonfly" >&6; } + CLOCALE_H=config/locale/generic/c_locale.h + CLOCALE_CC=config/locale/dragonfly/c_locale.cc + CCODECVT_CC=config/locale/generic/codecvt_members.cc + CCOLLATE_CC=config/locale/generic/collate_members.cc + CCTYPE_CC=config/locale/dragonfly/ctype_members.cc + CMESSAGES_H=config/locale/generic/messages_members.h + CMESSAGES_CC=config/locale/generic/messages_members.cc + CMONEY_CC=config/locale/generic/monetary_members.cc + CNUMERIC_CC=config/locale/generic/numeric_members.cc + CTIME_H=config/locale/generic/time_members.h + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; gnu) { $as_echo "$as_me:${as_lineno-$LINENO}: result: gnu" >&5 $as_echo "gnu" >&6; } --- libstdc++-v3/configure.host.orig +++ libstdc++-v3/configure.host @@@@ -239,6 +239,9 @@@@ os_include_dir="os/djgpp" error_constants_dir="os/djgpp" ;; + dragonfly*) + os_include_dir="os/bsd/dragonfly" + ;; freebsd*) os_include_dir="os/bsd/freebsd" ;; d483 1 a483 1 @@@@ -0,0 +1,60 @@@@ a512 2 +// Full details can be found from git repo at: +// http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/ctype.h d526 17 a542 1 + typedef uint16_t mask; d554 1 d663 1 a663 1 @@@@ -0,0 +1,161 @@@@ d712 3 d716 1 d729 4 d747 1 d785 3 d789 1 d797 4 d818 1 d826 3 d830 1 d839 3 d843 1 d897 8 d973 8 d1035 8 d1052 88 @ 1.3 log @lang/gcc-aux: Update to gcc 4.7.3 (version 20130411) This is a bug fix release. The official change page is http://gcc.gnu.org/gcc-4.7/changes.html According to it, 119 bugs have been resolved since version 4.7.2 was released (3 P1 bugs, 27 P2 bugs). @ text @d955 133 @ 1.2 log @lang/gcc-aux: Fix DragonFly iostream bug @ text @d47 1 a47 1 @@@@ -15704,7 +15704,7 @@@@ d56 1 a56 1 @@@@ -15742,6 +15742,9 @@@@ d66 1 a66 1 @@@@ -15883,7 +15886,23 @@@@ @ 1.1 log @Import lang/gcc-aux based on gcc-4.7.1 The primary difference between this compiler package and lang/gcc47 is that lang/gcc-aux supports the Ada language. Additionally, it is intended that the USE_LANGUAGES makefile variable whill be extended to recognize "ada" as a valid language, and that specifying it will cause lang/gcc-aux to be used to build the package. All current Ada-based packages will be modified to build with USE_LANGUAGES+= ada rather than specifying a dependency on lang/gnat-aux, the other Ada-capable compiler in pkgsrc based on gcc-4.6.3. lang/gcc-aux supports C, C++, Objective-C, Fortran, and Ada by default, but the latter four languages can be disabled via the options framework. The three non-default options are "nls", "testsuite" and "static" which enable Native Language Support, languages tests, and building the compiler statically. The "static" option is unalterably enabled for NetBSD in order to use dl_iterate_phdr error handling on NetBSD 6. On the NetBSD 6 beta builds, exceptions won't unwind properly with the libgcc_s shared library, and the issue seems to be external to gcc-aux. It's hoped the libgcc_s exception handling works on NetBSD 5.x series as dl_iterate_phdr isn't supported by rtld there, but gcc-aux hasn't been tested on 5.x yet. lang/gcc-aux can be built by 5 platforms currently: NetBSD i386/x86_64, DragonFly i386/x86_64, and OpenSolaris i386. New platform support requires new bootstraps. FreeBSD i386/x86_64 could be added easily as bootstrap compilers are available for FreeBSD ports lang/gnat-aux. OpenBSD bootstrap compilers have been built but never used, but further patches are on a couple of gcc's configuration files are needed as well as testing to provide OpenBSD support. All five platforms pass all tests (over 3200) in the Ada testsuite. See http://gcc.gnu.org/gcc-4.7/changes.html for more information about improvements over the GCC 4.6 series. @ text @d625 1 a625 1 + typedef const unsigned char* __to_type; d749 1 a749 1 @@@@ -0,0 +1,127 @@@@ d794 6 a799 1 + { return _M_table[(unsigned char)(__c)] & __m; } d805 21 a825 2 + while (__low < __high) + *__vec++ = _M_table[*__low++]; d833 7 a839 2 + while (__low < __high && !this->is(__m, *__low)) + ++__low; d847 7 a853 2 + while (__low < __high && this->is(__m, *__low) != 0) + ++__low; @