PATCH: RDOS support for libstdc++-v3

Leif Ekblad leif@rdos.net
Fri Dec 30 16:19:00 GMT 2005


      2005-12-30  Leif Ekblad  leif@rdos.net

      * /libstdc++-v3/configure: Added support for RDOS
      * /libstdc++-v3/configure.host: Added support for RDOS
      * /libstdc++-v3/config/os/rdos/ctype_base.h: Add file copied from
newlib
      * /libstdc++-v3/config/os/rdos/ctype_inline.h: Add file copied from
newlib
      * /libstdc++-v3/config/os/rdos/ctype_noninline.h: Add file copied from
newlib
      * /libstdc++-v3/config/os/rdos/os_defines.h: Add file os-defines for
RDOS

--- configure 2005-08-04 01:17:06.000000000 +0200
+++ ../../gcc-4.1-20051008/libstdc++-v3/configure 2005-12-29
19:25:20.000000000 +0100
@@ -3927,6 +3927,10 @@ cygwin* | mingw* |pw32*)
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
darwin* | rhapsody*)
# this will be overwritten by pass_all, but leave it in just in case
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared
library'
@@ -4511,6 +4515,9 @@ ia64-*-hpux*)
rm -rf conftest*
;;
+*-*rdos*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -76851,7 +76858,7 @@ _ACEOF
;;
esac
;;
- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
+ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu |
*-*-rdos*)
@@ -78169,7 +78176,7 @@ echo "${ECHO_T}$enable_iconv" >&6
_ACEOF
case "$target" in
- *-uclinux*)
+ *-uclinux* | *-rdos*)
# Don't enable LFS with uClibc
;;
*)

--- configure.host 2005-05-25 21:33:34.000000000 +0200
+++ ../../gcc-4.1-20051008/libstdc++-v3/configure.host 2005-12-29
17:35:10.000000000 +0100
@@ -174,6 +174,9 @@ case "${host_os}" in
cygwin*)
os_include_dir="os/newlib"
;;
+ rdos*)
+ os_include_dir="os/newlib"
+ ;;
darwin | darwin[1-7] | darwin[1-7].*)
# On Darwin, performance is improved if libstdc++ is single-module.
# Up to at least 10.3.7, -flat_namespace is required for proper

Added file ctype_base.h:

// Locale support -*- C++ -*-
// Copyright (C) 2000 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you
compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1
// Support for Solaris 2.5.1
struct ctype_base
{
// Non-standard typedefs.
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.
typedef 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 = _X | _N;
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;
};

Added file ctype_inline.h:

// Locale support -*- C++ -*-
// Copyright (C) 2000, 2002 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you
compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.1 Locales
//
// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
// functions go in ctype.cc
bool
ctype<char>::
is(mask __m, char __c) const
{ return _M_table[static_cast<unsigned char>(__c)] & __m; }
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
while (__low < __high)
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
return __high;
}
const char*
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && !this->is(__m, *__low))
++__low;
return __low;
}
const char*
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && this->is(__m, *__low) != 0)
++__low;
return __low;
}

Added file ctype_noninline.h:

// Locale support -*- C++ -*-
// Copyright (C) 2000, 2001, 2002 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you
compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from /usr/include/ctype.h
const ctype_base::mask*
ctype<char>::classic_table() throw()
{ return _ctype_ + 1; }
ctype<char>::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<char>::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<char>::do_toupper(char __c) const
{
int __x = __c;
return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x);
}
const char*
ctype<char>::do_toupper(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = this->do_toupper(*__low);
++__low;
}
return __high;
}
char
ctype<char>::do_tolower(char __c) const
{
int __x = __c;
return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x);
}
const char*
ctype<char>::do_tolower(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = this->do_tolower(*__low);
++__low;
}
return __high;
}

Added file os_defines.h:

// Specific definitions for RDOS
// Copyright (C) 2000, 2005 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you
compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCXX_OS_DEFINES
#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
#ifdef __CYGWIN__
#define _GLIBCXX_GTHREAD_USE_WEAK 0
// See libstdc++/20806.
#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1
#endif
#endif

-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.diff
Type: application/octet-stream
Size: 1136 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051230/4a062cd2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.host.diff
Type: application/octet-stream
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051230/4a062cd2/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctype_base.h
Type: application/octet-stream
Size: 2256 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051230/4a062cd2/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctype_inline.h
Type: application/octet-stream
Size: 2275 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051230/4a062cd2/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctype_noninline.h
Type: application/octet-stream
Size: 3028 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051230/4a062cd2/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: os_defines.h
Type: application/octet-stream
Size: 1729 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051230/4a062cd2/attachment-0005.obj>


More information about the Gcc-patches mailing list