mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-14 07:29:54 +08:00
configure.host: Add support for *-tpf.
* configure.host: Add support for *-tpf. * crossconfig.m4: Likewise. * configure: Regenerate. * config/os/tpf: New directory. * config/os/tpf/os_defines.h: New file. * config/os/tpf/ctype_base.h: Likewise. * config/os/tpf/ctype_inline.h: Likewise. * config/os/tpf/ctype_noninline.h: Likewise. Co-Authored-By: PJ Darcy <darcypj@us.ibm.com> From-SVN: r76724
This commit is contained in:
parent
f08df7c603
commit
6e198ee05d
@ -1,3 +1,15 @@
|
||||
2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
PJ Darcy <darcypj@us.ibm.com>
|
||||
|
||||
* configure.host: Add support for *-tpf.
|
||||
* crossconfig.m4: Likewise.
|
||||
* configure: Regenerate.
|
||||
* config/os/tpf: New directory.
|
||||
* config/os/tpf/os_defines.h: New file.
|
||||
* config/os/tpf/ctype_base.h: Likewise.
|
||||
* config/os/tpf/ctype_inline.h: Likewise.
|
||||
* config/os/tpf/ctype_noninline.h: Likewise.
|
||||
|
||||
2004-01-27 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/13884
|
||||
|
55
libstdc++-v3/config/os/tpf/ctype_base.h
Normal file
55
libstdc++-v3/config/os/tpf/ctype_base.h
Normal file
@ -0,0 +1,55 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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
|
||||
|
||||
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 unsigned short mask;
|
||||
static const mask upper = _ISupper;
|
||||
static const mask lower = _ISlower;
|
||||
static const mask alpha = _ISalpha;
|
||||
static const mask digit = _ISdigit;
|
||||
static const mask xdigit = _ISxdigit;
|
||||
static const mask space = _ISspace;
|
||||
static const mask print = _ISprint;
|
||||
static const mask graph = _ISalpha | _ISdigit | _ISpunct;
|
||||
static const mask cntrl = _IScntrl;
|
||||
static const mask punct = _ISpunct;
|
||||
static const mask alnum = _ISalpha | _ISdigit;
|
||||
};
|
69
libstdc++-v3/config/os/tpf/ctype_inline.h
Normal file
69
libstdc++-v3/config/os/tpf/ctype_inline.h
Normal file
@ -0,0 +1,69 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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
|
||||
&& !(_M_table[static_cast<unsigned char>(*__low)] & __m))
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
scan_not(mask __m, const char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high
|
||||
&& (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
103
libstdc++-v3/config/os/tpf/ctype_noninline.h
Normal file
103
libstdc++-v3/config/os/tpf/ctype_noninline.h
Normal file
@ -0,0 +1,103 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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()
|
||||
{
|
||||
const ctype_base::mask* __ret;
|
||||
char* __old = strdup(setlocale(LC_CTYPE, NULL));
|
||||
setlocale(LC_CTYPE, "C");
|
||||
__ret = *__ctype_b_loc();
|
||||
setlocale(LC_CTYPE, __old);
|
||||
free(__old);
|
||||
return __ret;
|
||||
}
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_del(__table != 0 && __del)
|
||||
{
|
||||
char* __old=strdup(setlocale(LC_CTYPE, NULL));
|
||||
setlocale(LC_CTYPE, "C");
|
||||
_M_toupper = *__ctype_toupper_loc();
|
||||
_M_tolower = *__ctype_tolower_loc();
|
||||
_M_table = __table ? __table : *__ctype_b_loc();
|
||||
setlocale(LC_CTYPE, __old);
|
||||
free(__old);
|
||||
_M_c_locale_ctype = _S_get_c_locale();
|
||||
}
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: facet(__refs), _M_del(__table != 0 && __del)
|
||||
{
|
||||
char* __old=strdup(setlocale(LC_CTYPE, NULL));
|
||||
setlocale(LC_CTYPE, "C");
|
||||
_M_toupper = *__ctype_toupper_loc();
|
||||
_M_tolower = *__ctype_tolower_loc();
|
||||
_M_table = __table ? __table : *__ctype_b_loc();
|
||||
setlocale(LC_CTYPE, __old);
|
||||
free(__old);
|
||||
_M_c_locale_ctype = _S_get_c_locale();
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return _M_toupper[static_cast<unsigned char>(__c)]; }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = _M_toupper[static_cast<unsigned char>(*__low)];
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return _M_tolower[static_cast<unsigned char>(__c)]; }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = _M_tolower[static_cast<unsigned char>(*__low)];
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
45
libstdc++-v3/config/os/tpf/os_defines.h
Normal file
45
libstdc++-v3/config/os/tpf/os_defines.h
Normal file
@ -0,0 +1,45 @@
|
||||
// Specific definitions for TPF -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// 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.
|
||||
|
||||
// TPF is a big endian OS, let it be known here.
|
||||
#define _BIG_ENDIAN 1
|
||||
|
||||
// This keeps isanum, et al from being propagated as macros.
|
||||
#define __NO_CTYPE 1
|
||||
|
||||
// We must not see the optimized string functions GNU libc defines.
|
||||
#define __NO_STRING_INLINES
|
||||
|
||||
#endif
|
2027
libstdc++-v3/configure
vendored
2027
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -186,6 +186,9 @@ case "${host_os}" in
|
||||
solaris2.[789] | solaris2.1[0-9])
|
||||
os_include_dir="os/solaris/solaris2.7"
|
||||
;;
|
||||
tpf)
|
||||
os_include_dir="os/tpf"
|
||||
;;
|
||||
vxworks)
|
||||
os_include_dir="os/vxworks"
|
||||
;;
|
||||
|
@ -336,6 +336,33 @@ case "${host}" in
|
||||
AC_DEFINE(HAVE_MODFF)
|
||||
AC_DEFINE(HAVE_HYPOT)
|
||||
;;
|
||||
*-tpf)
|
||||
AC_CHECK_HEADERS([nan.h endian.h machine/endian.h \
|
||||
sys/param.h sys/types.h locale.h float.h inttypes.h])
|
||||
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
||||
AC_SUBST(SECTION_FLAGS)
|
||||
GLIBCXX_CHECK_LINKER_FEATURES
|
||||
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
|
||||
GLIBCXX_CHECK_WCHAR_T_SUPPORT
|
||||
AC_DEFINE(HAVE_COPYSIGN)
|
||||
AC_DEFINE(HAVE_COPYSIGNF)
|
||||
AC_DEFINE(HAVE_FINITE)
|
||||
AC_DEFINE(HAVE_FINITEF)
|
||||
AC_DEFINE(HAVE_FREXPF)
|
||||
AC_DEFINE(HAVE_HYPOTF)
|
||||
AC_DEFINE(HAVE_ISINF)
|
||||
AC_DEFINE(HAVE_ISINFF)
|
||||
AC_DEFINE(HAVE_ISNAN)
|
||||
AC_DEFINE(HAVE_ISNANF)
|
||||
AC_DEFINE(HAVE_SINCOS)
|
||||
AC_DEFINE(HAVE_SINCOSF)
|
||||
if test x"long_double_math_on_this_cpu" = x"yes"; then
|
||||
AC_DEFINE(HAVE_FINITEL)
|
||||
AC_DEFINE(HAVE_HYPOTL)
|
||||
AC_DEFINE(HAVE_ISINFL)
|
||||
AC_DEFINE(HAVE_ISNANL)
|
||||
fi
|
||||
;;
|
||||
*-vxworks)
|
||||
AC_DEFINE(HAVE_MMAP)
|
||||
AC_DEFINE(HAVE_ACOSF)
|
||||
|
Loading…
Reference in New Issue
Block a user