Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Sep 2013 14:40:00 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r328140 - head/lang/gnat-aux/files
Message-ID:  <201309241440.r8OEe03d035108@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Tue Sep 24 14:39:59 2013
New Revision: 328140
URL: http://svnweb.freebsd.org/changeset/ports/328140

Log:
  lang/gnat-aux: Support iconv update in DragonFly master branch
  
  This update affects dragonfly only, and supports the updated ctypes
  in the DragonFly master branch.

Modified:
  head/lang/gnat-aux/files/diff-cxx

Modified: head/lang/gnat-aux/files/diff-cxx
==============================================================================
--- head/lang/gnat-aux/files/diff-cxx	Tue Sep 24 14:34:59 2013	(r328139)
+++ head/lang/gnat-aux/files/diff-cxx	Tue Sep 24 14:39:59 2013	(r328140)
@@ -579,7 +579,7 @@
 +}
 --- /dev/null
 +++ libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,75 @@
 +// Locale support -*- C++ -*-
 +
 +// Copyright (C) 2000, 2003, 2009, 2010 Free Software Foundation, Inc.
@@ -609,8 +609,6 @@
 +//
 +
 +// Information as gleaned from /usr/include/ctype.h on DragonFly.
-+// Full details can be found from git repo at:
-+// http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/ctype.h
 +
 +namespace std _GLIBCXX_VISIBILITY(default)
 +{
@@ -624,6 +622,22 @@
 +
 +    // NB: Offsets into ctype<char>::_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 uint16_t		mask;
 +    static const mask upper	= _CTYPEMASK_U;
 +    static const mask lower	= _CTYPEMASK_L;
@@ -636,13 +650,14 @@
 +    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_inline.h
-@@ -0,0 +1,127 @@
+@@ -0,0 +1,144 @@
 +// Locale support -*- C++ -*-
 +
 +// Copyright (C) 2000, 2003, 2004, 2005, 2009, 2010
@@ -721,7 +736,11 @@
 +  ctype<wchar_t>::
 +  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*
@@ -729,6 +748,10 @@
 +  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;
@@ -746,6 +769,7 @@
 +
 +      *__vec = __m;
 +    }
++#endif
 +    return __hi;
 +  }
 +
@@ -753,7 +777,11 @@
 +  ctype<wchar_t>::
 +  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;
 +  }
@@ -762,7 +790,11 @@
 +  ctype<wchar_t>::
 +  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;
 +  }
@@ -772,7 +804,7 @@
 +} // namespace
 --- /dev/null
 +++ libstdc++-v3/config/os/bsd/dragonfly/ctype_noninline.h
-@@ -0,0 +1,94 @@
+@@ -0,0 +1,98 @@
 +// Locale support -*- C++ -*-
 +
 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2009, 2010
@@ -809,7 +841,11 @@
 +
 +// Information as gleaned from /usr/include/ctype.h
 +
++#ifdef _CTYPE_S
++  extern "C" const unsigned long __libc_C_ctype_[];
++#else
 +  extern "C" const __uint16_t __libc_C_ctype_[];
++#endif
 +
 +  const ctype_base::mask*
 +  ctype<char>::classic_table() throw()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309241440.r8OEe03d035108>