Remove bits which are not part of GCC 3.3.x anymore.
This commit is contained in:
parent
0fb0a43f46
commit
a2faa65a72
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,76 +0,0 @@
|
||||
// Low-level functions for atomic operations: Alpha version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
/* @@@ With gas we can play nice .subsection games to get the
|
||||
non-predicted branch pointing forward. But Digital assemblers
|
||||
don't understand those directives. This isn't a terribly
|
||||
important issue, so just ignore it. */
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
register int __result, __tmp;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"\n$Lxadd_%=:\n\t"
|
||||
"ldl_l %0,%3\n\t"
|
||||
"addl %0,%4,%1\n\t"
|
||||
"stl_c %1,%2\n\t"
|
||||
"beq %1,$Lxadd_%=\n\t"
|
||||
"mb"
|
||||
: "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
|
||||
: "m" (*__mem), "r"(__val));
|
||||
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
register _Atomic_word __result;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"\n$Ladd_%=:\n\t"
|
||||
"ldl_l %0,%2\n\t"
|
||||
"addl %0,%3,%0\n\t"
|
||||
"stl_c %0,%1\n\t"
|
||||
"beq %0,$Ladd_%=\n\t"
|
||||
"mb"
|
||||
: "=&r"(__result), "=m"(*__mem)
|
||||
: "m" (*__mem), "r"(__val));
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,38 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_bits 64
|
||||
|
||||
#define __glibcpp_long_double_bits 64
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,221 +0,0 @@
|
||||
// Low-level functions for atomic operations: ARM version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
_Atomic_word __tmp, __tmp2, __result;
|
||||
#ifdef __thumb__
|
||||
/* Since this function is inlined, we can't be sure of the alignment. */
|
||||
__asm__ __volatile__ (
|
||||
"ldr %0, 4f \n\t"
|
||||
"bx %0 \n\t"
|
||||
".align 0 \n"
|
||||
"4:\t"
|
||||
".word 0f \n\t"
|
||||
".code 32 \n"
|
||||
"0:\t"
|
||||
"ldr %0, [%3] \n\t"
|
||||
"add %1, %0, %4 \n\t"
|
||||
"swp %2, %1, [%3] \n\t"
|
||||
"cmp %0, %2 \n\t"
|
||||
"swpne %1, %2, [%3] \n\t"
|
||||
"bne 0b \n\t"
|
||||
"ldr %1, 1f \n\t"
|
||||
"bx %1 \n"
|
||||
"1:\t"
|
||||
".word 2f \n\t"
|
||||
".code 16 \n"
|
||||
"2:\n"
|
||||
: "=&l"(__result), "=&r"(__tmp), "=&r"(__tmp2)
|
||||
: "r" (__mem), "r"(__val)
|
||||
: "cc", "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"\n"
|
||||
"0:\t"
|
||||
"ldr %0, [%3] \n\t"
|
||||
"add %1, %0, %4 \n\t"
|
||||
"swp %2, %1, [%3] \n\t"
|
||||
"cmp %0, %2 \n\t"
|
||||
"swpne %1, %2, [%3] \n\t"
|
||||
"bne 0b \n\t"
|
||||
""
|
||||
: "=&r"(__result), "=&r"(__tmp), "=&r"(__tmp2)
|
||||
: "r" (__mem), "r"(__val)
|
||||
: "cc", "memory");
|
||||
#endif
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
_Atomic_word __tmp, __tmp2, __tmp3;
|
||||
#ifdef __thumb__
|
||||
/* Since this function is inlined, we can't be sure of the alignment. */
|
||||
__asm__ __volatile__ (
|
||||
"ldr %0, 4f \n\t"
|
||||
"bx %0 \n\t"
|
||||
".align 0\n"
|
||||
"4:\t"
|
||||
".word 0f \n\t"
|
||||
".code 32 \n"
|
||||
"0:\t"
|
||||
"ldr %0, [%3] \n\t"
|
||||
"add %1, %0, %4 \n\t"
|
||||
"swp %2, %1, [%3] \n\t"
|
||||
"cmp %0, %2 \n\t"
|
||||
"swpne %1, %2,[%3] \n\t"
|
||||
"bne 0b \n\t"
|
||||
"ldr %1, 1f \n\t"
|
||||
"bx %1 \n"
|
||||
"1:\t"
|
||||
".word 2f \n\t"
|
||||
".code 16 \n"
|
||||
"2:\n"
|
||||
: "=&l"(__tmp), "=&r"(__tmp2), "=&r"(__tmp3)
|
||||
: "r" (__mem), "r"(__val)
|
||||
: "cc", "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"\n"
|
||||
"0:\t"
|
||||
"ldr %0, [%3] \n\t"
|
||||
"add %1, %0, %4 \n\t"
|
||||
"swp %2, %1, [%3] \n\t"
|
||||
"cmp %0, %2 \n\t"
|
||||
"swpne %1, %2, [%3] \n\t"
|
||||
"bne 0b \n\t"
|
||||
""
|
||||
: "=&r"(__tmp), "=&r"(__tmp2), "=&r"(__tmp3)
|
||||
: "r" (__mem), "r"(__val)
|
||||
: "cc", "memory");
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline long
|
||||
__attribute__ ((__unused__))
|
||||
__always_swap (volatile long *__p, long __newval)
|
||||
{
|
||||
long __result;
|
||||
#ifdef __thumb__
|
||||
long __tmp;
|
||||
/* Since this function is inlined, we can't be sure of the alignment. */
|
||||
__asm__ __volatile__ (
|
||||
"ldr %0, 4f \n\t"
|
||||
"bx %0 \n\t"
|
||||
".align 0 \n"
|
||||
"4:\t"
|
||||
".word 0f \n\t"
|
||||
".code 32\n"
|
||||
"0:\t"
|
||||
"swp %0, %3, [%2] \n\t"
|
||||
"ldr %1, 1f \n\t"
|
||||
"bx %1 \n"
|
||||
"1:\t"
|
||||
".word 2f \n\t"
|
||||
".code 16 \n"
|
||||
"2:\n"
|
||||
: "=&l"(__result), "=&r"(__tmp)
|
||||
: "r"(__p), "r"(__newval)
|
||||
: "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"\n\t"
|
||||
"swp %0, %2, [%1] \n\t"
|
||||
""
|
||||
: "=&r"(__result)
|
||||
: "r"(__p), "r"(__newval)
|
||||
: "memory");
|
||||
#endif
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline int
|
||||
__attribute__ ((__unused__))
|
||||
__test_and_set (volatile long *__p, long __newval)
|
||||
{
|
||||
int __result;
|
||||
long __tmp;
|
||||
#ifdef __thumb__
|
||||
/* Since this function is inlined, we can't be sure of the alignment. */
|
||||
__asm__ __volatile__ (
|
||||
"ldr %0, 4f \n\t"
|
||||
"bx %0 \n\t"
|
||||
".align 0 \n"
|
||||
"4:\t"
|
||||
".word 0f \n\t"
|
||||
".code 32 \n"
|
||||
"0:\t"
|
||||
"ldr %0, [%2] \n\t"
|
||||
"cmp %0, #0 \n\t"
|
||||
"bne 1f \n\t"
|
||||
"swp %1, %3, [%2] \n\t"
|
||||
"cmp %0, %1 \n\t"
|
||||
"swpne %0, %1, [%2]\n\t"
|
||||
"bne 0b \n"
|
||||
"1:\t"
|
||||
"ldr %1, 2f \n\t"
|
||||
"bx %1 \n"
|
||||
"2:\t"
|
||||
".word 3f \n\t"
|
||||
".code 16 \n"
|
||||
"3:"
|
||||
: "=&l"(__result), "=r" (__tmp)
|
||||
: "r"(__p), "r"(__newval)
|
||||
: "cc", "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"\n"
|
||||
"0:\t"
|
||||
"ldr %0, [%2] \n\t"
|
||||
"cmp %0, #0 \n\t"
|
||||
"bne 1f \n\t"
|
||||
"swp %1, %3, [%2] \n\t"
|
||||
"cmp %0, %1 \n\t"
|
||||
"swpne %0, %1, [%2] \n\t"
|
||||
"bne 0b \n"
|
||||
"1:\n\t"
|
||||
""
|
||||
: "=&r"(__result), "=r" (__tmp)
|
||||
: "r"(__p), "r"(__newval)
|
||||
: "cc", "memory");
|
||||
#endif
|
||||
return __result;
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,79 +0,0 @@
|
||||
// Low-level functions for atomic operations: CRIS version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
// This entity must not cross a page boundary.
|
||||
typedef int _Atomic_word __attribute__ ((__aligned__ (4)));
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
int __tmp;
|
||||
_Atomic_word __result;
|
||||
|
||||
#if (__CRIS_arch_version >= 10)
|
||||
__asm__ __volatile__ (" clearf \n"
|
||||
"0: \n"
|
||||
" move.d %4,%2 \n"
|
||||
" move.d [%3],%0 \n"
|
||||
" add.d %0,%2 \n"
|
||||
" ax \n"
|
||||
" move.d %2,[%3] \n"
|
||||
" bwf 0b \n"
|
||||
" clearf \n"
|
||||
: "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
|
||||
: "r" (__mem), "g" (__val), "m" (*__mem)
|
||||
: "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (" move $ccr,$r9 \n"
|
||||
" di \n"
|
||||
" move.d %4,%2 \n"
|
||||
" move.d [%3],%0 \n"
|
||||
" add.d %0,%2 \n"
|
||||
" move.d %2,[%3] \n"
|
||||
" move $r9,$ccr \n"
|
||||
: "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
|
||||
: "r" (__mem), "g" (__val), "m" (*__mem)
|
||||
: "memory", "r9");
|
||||
#endif
|
||||
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
__exchange_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,33 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_double_bits 64
|
||||
|
||||
#endif
|
@ -1,51 +0,0 @@
|
||||
// Low-level functions for atomic operations: Generic version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1999, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
_Atomic_word __result = *__mem;
|
||||
*__mem += __val;
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
*__mem += __val;
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,41 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
// Nothing is defined in the generic file. In that way, we fall back
|
||||
// on the defaults in std_limits.h.
|
||||
|
||||
// If you need to override these defaults, you can either use a
|
||||
// CPU-specific version (in which case you must modify
|
||||
// configure.target) or you must add the overrides to your
|
||||
// os_defines.h. In general, if all systems for your CPU use the
|
||||
// same values, it is best to use a cpu-specific configuration file.
|
||||
|
||||
#endif
|
||||
|
@ -1,40 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
// Nothing is defined in the generic file. In that way, we fall back
|
||||
// on the defaults in std_limits.h.
|
||||
|
||||
// If you need to override these defaults, you can either use a
|
||||
// CPU-specific version (in which case you must modify
|
||||
// configure.target) or you must add the overrides to your
|
||||
// os_defines.h. In general, if all systems for your CPU use the
|
||||
// same values, it is best to use a cpu-specific configuration file.
|
||||
|
||||
#endif
|
@ -1,59 +0,0 @@
|
||||
// Low-level functions for atomic operations: x86, x < 4 version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
register _Atomic_word __result;
|
||||
__asm__ __volatile__ ("lock; xaddl %0,%2"
|
||||
: "=r" (__result)
|
||||
: "0" (__val), "m" (*__mem)
|
||||
: "memory");
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
__asm__ __volatile__ ("lock; addl %0,%1"
|
||||
: : "ir" (__val), "m" (*__mem) : "memory");
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
||||
|
||||
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_double_bits 80
|
||||
|
||||
#endif
|
@ -1,57 +0,0 @@
|
||||
// Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
register _Atomic_word __result;
|
||||
__asm__ __volatile__ ("lock; xaddl %0,%2"
|
||||
: "=r" (__result)
|
||||
: "0" (__val), "m" (*__mem)
|
||||
: "memory");
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
__asm__ __volatile__ ("lock; addl %0,%1"
|
||||
: : "ir" (__val), "m" (*__mem) : "memory");
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
||||
|
||||
|
@ -1,51 +0,0 @@
|
||||
// Low-level functions for atomic operations: IA64 version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
#include <ia64intrin.h>
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
return __sync_fetch_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
__sync_fetch_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,36 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_bits 64
|
||||
|
||||
// While sizeof(long double) == 16, the format is the same as the x86.
|
||||
#define __glibcpp_long_double_bits 80
|
||||
|
||||
#endif
|
@ -1,158 +0,0 @@
|
||||
// Low-level functions for atomic operations: m68k version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
#if defined(__mc68020__) || defined(__mc68030__) \
|
||||
|| defined(__mc68040__) || defined(__mc68060__)
|
||||
// These variants support compare-and-swap.
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
register _Atomic_word __result = *__mem;
|
||||
register _Atomic_word __temp;
|
||||
__asm__ __volatile__ ("1: move%.l %0,%1\n\t"
|
||||
"add%.l %2,%1\n\t"
|
||||
"cas%.l %0,%1,%3\n\t"
|
||||
"jne 1b"
|
||||
: "=d" (__result), "=&d" (__temp)
|
||||
: "d" (__val), "m" (*__mem), "0" (__result)
|
||||
: "memory");
|
||||
return __result;
|
||||
}
|
||||
|
||||
#elif defined(__rtems__)
|
||||
/*
|
||||
* TAS/JBNE is unsafe on systems with strict priority-based scheduling.
|
||||
* Disable interrupts, which we can do only from supervisor mode.
|
||||
*/
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
_Atomic_word __result;
|
||||
short __level, __tmpsr;
|
||||
__asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr"
|
||||
: "=d"(__level), "=d"(__tmpsr) : "1"(0x700));
|
||||
|
||||
__result = *__mem;
|
||||
*__mem = __result + __val;
|
||||
|
||||
__asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level));
|
||||
|
||||
return __result;
|
||||
}
|
||||
|
||||
#elif !defined(__mcf5200__) && !defined(__mcf5300__)
|
||||
// 68000, 68010, cpu32 and 5400 support test-and-set.
|
||||
|
||||
template <int __inst>
|
||||
struct __Atomicity_lock
|
||||
{
|
||||
static volatile unsigned char _S_atomicity_lock;
|
||||
};
|
||||
|
||||
template <int __inst>
|
||||
volatile unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
|
||||
|
||||
template volatile unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
_Atomic_word __result;
|
||||
|
||||
__asm__ __volatile__("1: tas %0\n\tjbne 1b"
|
||||
: "=m"(__Atomicity_lock<0>::_S_atomicity_lock)
|
||||
: "m"(__Atomicity_lock<0>::_S_atomicity_lock));
|
||||
|
||||
__result = *__mem;
|
||||
*__mem = __result + __val;
|
||||
|
||||
__Atomicity_lock<0>::_S_atomicity_lock = 0;
|
||||
|
||||
return __result;
|
||||
}
|
||||
|
||||
#elif defined(__vxWorks__) || defined(__embedded__)
|
||||
// The best we can hope for is to disable interrupts, which we
|
||||
// can only do from supervisor mode.
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
_Atomic_word __result;
|
||||
short __level, __tmpsr;
|
||||
__asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr"
|
||||
: "=d"(__level), "=d"(__tmpsr) : "1"(0x700));
|
||||
|
||||
__result = *__mem;
|
||||
*__mem = __result + __val;
|
||||
|
||||
__asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level));
|
||||
|
||||
return __result;
|
||||
}
|
||||
|
||||
#else
|
||||
// These variants do not support any atomic operations at all.
|
||||
|
||||
#warning "__exchange_and_add is not atomic for this target"
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
_Atomic_word __result;
|
||||
|
||||
__result = *__mem;
|
||||
*__mem = __result + __val;
|
||||
|
||||
return __result;
|
||||
}
|
||||
|
||||
#endif /* CAS / IRQ / TAS */
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
// Careful: using add.l with a memory destination is not
|
||||
// architecturally guaranteed to be atomic.
|
||||
(void) __exchange_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,35 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_double_bits 96
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,78 +0,0 @@
|
||||
// Low-level functions for atomic operations. MIPS II version.
|
||||
|
||||
// Copyright (C) 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
// #include <sgidefs.h>
|
||||
// #ifdef (_MIPS_ISA_MIPS2)
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
int __result, __tmp;
|
||||
|
||||
__asm__ __volatile__
|
||||
("/* Inline exchange & add */\n\t"
|
||||
"1:\n\t"
|
||||
"ll %0,%3\n\t"
|
||||
"addu %1,%4,%0\n\t"
|
||||
"sc %1,%2\n\t"
|
||||
"beqz %1,1b\n\t"
|
||||
"/* End exchange & add */"
|
||||
: "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
|
||||
: "m" (*__mem), "r"(__val)
|
||||
: "memory");
|
||||
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((unused))
|
||||
__atomic_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
int __result;
|
||||
|
||||
__asm__ __volatile__
|
||||
("/* Inline atomic add */\n\t"
|
||||
"1:\n\t"
|
||||
"ll %0,%2\n\t"
|
||||
"addu %0,%3,%0\n\t"
|
||||
"sc %0,%1\n\t"
|
||||
"beqz %0,1b\n\t"
|
||||
"/* End atomic add */"
|
||||
: "=&r"(__result), "=m"(*__mem)
|
||||
: "m" (*__mem), "r"(__val)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,34 +0,0 @@
|
||||
// Copyright (C) 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, 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_bits 64
|
||||
#define __glibcpp_long_double_bits 64
|
||||
|
||||
#endif
|
@ -1,112 +0,0 @@
|
||||
// Low-level functions for atomic operations: PowerPC version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
_Atomic_word __tmp, __res;
|
||||
__asm__ __volatile__ (
|
||||
"/* Inline exchange & add */\n"
|
||||
"0:\t"
|
||||
"lwarx %0,0,%2 \n\t"
|
||||
"add%I3 %1,%0,%3 \n\t"
|
||||
"stwcx. %1,0,%2 \n\t"
|
||||
"bne- 0b \n\t"
|
||||
"/* End exchange & add */"
|
||||
: "=&b"(__res), "=&r"(__tmp)
|
||||
: "r" (__mem), "Ir"(__val)
|
||||
: "cr0", "memory");
|
||||
return __res;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
_Atomic_word __tmp;
|
||||
__asm__ __volatile__ (
|
||||
"/* Inline atomic add */\n"
|
||||
"0:\t"
|
||||
"lwarx %0,0,%1 \n\t"
|
||||
"add%I2 %0,%0,%2 \n\t"
|
||||
"stwcx. %0,0,%1 \n\t"
|
||||
"bne- 0b \n\t"
|
||||
"/* End atomic add */"
|
||||
: "=&b"(__tmp)
|
||||
: "r" (__mem), "Ir"(__val)
|
||||
: "cr0", "memory");
|
||||
}
|
||||
|
||||
static inline long
|
||||
__attribute__ ((__unused__))
|
||||
__always_swap (volatile long *__p, long int __newval)
|
||||
{
|
||||
long __res;
|
||||
__asm__ __volatile__ (
|
||||
"/* Inline always swap */\n"
|
||||
"0:\t"
|
||||
"lwarx %0,0,%1 \n\t"
|
||||
"stwcx. %2,0,%1 \n\t"
|
||||
"bne- 0b \n\t"
|
||||
"/* End always swap */"
|
||||
: "=&r"(__res)
|
||||
: "r"(__p), "r"(__newval)
|
||||
: "cr0", "memory");
|
||||
return __res;
|
||||
}
|
||||
|
||||
static inline int
|
||||
__attribute__ ((__unused__))
|
||||
__test_and_set (volatile long *__p, long int __newval)
|
||||
{
|
||||
int __res;
|
||||
__asm__ __volatile__ (
|
||||
"/* Inline test & set */\n"
|
||||
"0:\t"
|
||||
"lwarx %0,0,%1 \n\t"
|
||||
"cmpwi %0,0 \n\t"
|
||||
"bne- 1f \n\t"
|
||||
"stwcx. %2,0,%1 \n\t"
|
||||
"bne- 0b \n"
|
||||
"1:\n\t"
|
||||
"/* End test & set */"
|
||||
: "=&r"(__res)
|
||||
: "r"(__p), "r"(__newval)
|
||||
: "cr0", "memory");
|
||||
return __res;
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
||||
|
@ -1,38 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#ifndef __LONG_DOUBLE_128__
|
||||
#define __glibcpp_long_double_bits 64
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,60 +0,0 @@
|
||||
// Low-level functions for atomic operations: S/390 version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
register _Atomic_word __old_val, __new_val;
|
||||
|
||||
__asm__ __volatile__ (" l %0,0(%2)\n"
|
||||
"0: lr %1,%0\n"
|
||||
" ar %1,%3\n"
|
||||
" cs %0,%1,0(%2)\n"
|
||||
" jl 0b"
|
||||
: "=&d" (__old_val), "=&d" (__new_val)
|
||||
: "a" (__mem), "d" (__val) : "cc", "memory" );
|
||||
return __old_val;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
__exchange_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_double_bits 64
|
||||
|
||||
#endif
|
@ -1,131 +0,0 @@
|
||||
// Low-level functions for atomic operations: Sparc version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1999, 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, 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
#ifdef __arch64__
|
||||
|
||||
typedef long _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
_Atomic_word __tmp1, __tmp2;
|
||||
|
||||
__asm__ __volatile__("1: ldx [%2], %0\n\t"
|
||||
" add %0, %3, %1\n\t"
|
||||
" casx [%2], %0, %1\n\t"
|
||||
" sub %0, %1, %0\n\t"
|
||||
" brnz,pn %0, 1b\n\t"
|
||||
" nop"
|
||||
: "=&r" (__tmp1), "=&r" (__tmp2)
|
||||
: "r" (__mem), "r" (__val)
|
||||
: "memory");
|
||||
return __tmp2;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
_Atomic_word __tmp1, __tmp2;
|
||||
|
||||
__asm__ __volatile__("1: ldx [%2], %0\n\t"
|
||||
" add %0, %3, %1\n\t"
|
||||
" casx [%2], %0, %1\n\t"
|
||||
" sub %0, %1, %0\n\t"
|
||||
" brnz,pn %0, 1b\n\t"
|
||||
" nop"
|
||||
: "=&r" (__tmp1), "=&r" (__tmp2)
|
||||
: "r" (__mem), "r" (__val)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#else /* __arch32__ */
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
template <int __inst>
|
||||
struct __Atomicity_lock
|
||||
{
|
||||
static unsigned char _S_atomicity_lock;
|
||||
};
|
||||
|
||||
template <int __inst>
|
||||
unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
|
||||
|
||||
template unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
|
||||
|
||||
static int
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
_Atomic_word __result, __tmp;
|
||||
|
||||
__asm__ __volatile__("1: ldstub [%1], %0\n\t"
|
||||
" cmp %0, 0\n\t"
|
||||
" bne 1b\n\t"
|
||||
" nop"
|
||||
: "=&r" (__tmp)
|
||||
: "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
|
||||
: "memory");
|
||||
__result = *__mem;
|
||||
*__mem += __val;
|
||||
__asm__ __volatile__("stb %%g0, [%0]"
|
||||
: /* no outputs */
|
||||
: "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
|
||||
: "memory");
|
||||
return __result;
|
||||
}
|
||||
|
||||
static void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
_Atomic_word __tmp;
|
||||
|
||||
__asm__ __volatile__("1: ldstub [%1], %0\n\t"
|
||||
" cmp %0, 0\n\t"
|
||||
" bne 1b\n\t"
|
||||
" nop"
|
||||
: "=&r" (__tmp)
|
||||
: "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
|
||||
: "memory");
|
||||
*__mem += __val;
|
||||
__asm__ __volatile__("stb %%g0, [%0]"
|
||||
: /* no outputs */
|
||||
: "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif /* __arch32__ */
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,55 +0,0 @@
|
||||
// Low-level functions for atomic operations: AMD x86-64, -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
typedef int _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
|
||||
{
|
||||
register _Atomic_word __result;
|
||||
__asm__ __volatile__ ("lock; xaddl %0,%2"
|
||||
: "=r" (__result)
|
||||
: "0" (__val), "m" (*__mem)
|
||||
: "memory");
|
||||
return __result;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
{
|
||||
__asm__ __volatile__ ("lock; addl %0,%1"
|
||||
: : "ir" (__val), "m" (*__mem) : "memory");
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,35 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_bits 64
|
||||
|
||||
#define __glibcpp_long_double_bits 80
|
||||
|
||||
#endif
|
@ -1,59 +0,0 @@
|
||||
// Low-level functions for atomic operations: AIX version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
/* We cannot use the cpu/powerpc/bits/atomicity.h inline assembly
|
||||
definitions for these operations since they depend on operations
|
||||
that are not available on the original POWER architecture. AIX
|
||||
still runs on the POWER architecture, so it would be incorrect to
|
||||
assume the existence of these instructions. */
|
||||
|
||||
/* This should match the type pointed to by atomic_p in
|
||||
<sys/atomic_op.h>. */
|
||||
typedef int _Atomic_word;
|
||||
|
||||
#include <sys/atomic_op.h>
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
__exchange_and_add (atomic_p __mem, int __val)
|
||||
{
|
||||
return fetch_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
static inline void
|
||||
__attribute__ ((unused))
|
||||
__atomic_add (atomic_p __mem, int __val)
|
||||
{
|
||||
(void) fetch_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,55 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 1999 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 int 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 = _ISGRAPH;
|
||||
static const mask cntrl = _ISCNTRL;
|
||||
static const mask punct = _ISPUNCT;
|
||||
static const mask alnum = _ISALNUM;
|
||||
};
|
@ -1,76 +0,0 @@
|
||||
// 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, 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 __OBJ_DATA(__lc_ctype)->mask[__c] & __m; }
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const
|
||||
{
|
||||
while (__low < __high)
|
||||
*__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,81 +0,0 @@
|
||||
// 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, 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()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return ::toupper((int) __c); }
|
||||
|
||||
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
|
||||
{ return ::tolower((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = this->do_tolower(*__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
// Specific definitions for AIX -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#undef _XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE 500
|
||||
#undef _XOPEN_SOURCE_EXTENDED
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
|
||||
// off64_t
|
||||
#ifndef _LARGE_FILE_API
|
||||
#define _LARGE_FILE_API
|
||||
#endif
|
||||
|
||||
// atomic types
|
||||
#ifndef _ALL_SOURCE
|
||||
#define _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
#undef _G_USING_THUNKS
|
||||
#define _G_USING_THUNKS 0
|
||||
|
||||
#if !defined(_AIX51) || !defined(__64BIT__)
|
||||
#define __glibcpp_wchar_t_bits 16
|
||||
#define __glibcpp_wchar_t_is_signed false
|
||||
#endif
|
||||
|
||||
#ifdef __64BIT__
|
||||
#define __glibcpp_long_bits 64
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,76 +0,0 @@
|
||||
// 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, 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 on FreeBSD 3.4,
|
||||
// 4.0 and all versions of the CVS managed file at:
|
||||
// :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/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 long mask;
|
||||
#ifdef _CTYPE_S
|
||||
// FreeBSD 4.0 uses this style of define.
|
||||
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;
|
||||
#else
|
||||
// Older versions, including Free BSD 3.4, use this style of define.
|
||||
static const mask upper = _U;
|
||||
static const mask lower = _L;
|
||||
static const mask alpha = _A;
|
||||
static const mask digit = _D;
|
||||
static const mask xdigit = _X;
|
||||
static const mask space = _S;
|
||||
static const mask print = _R;
|
||||
static const mask graph = _G;
|
||||
static const mask cntrl = _C;
|
||||
static const mask punct = _P;
|
||||
static const mask alnum = _A | _D;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,94 +0,0 @@
|
||||
// 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, 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 __istype(__c, __m);
|
||||
}
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const
|
||||
{
|
||||
for (;__low < __high; ++__vec, ++__low)
|
||||
{
|
||||
#if defined (_CTYPE_S) || defined (__istype)
|
||||
*__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 FreeBSD.
|
||||
*__vec = __m;
|
||||
#endif
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,81 +0,0 @@
|
||||
// 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, 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()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return ::toupper((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::toupper((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return ::tolower((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::tolower((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
// Specific definitions for BSD -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#define __glibcpp_long_double_bits __glibcpp_double_bits
|
||||
|
||||
#endif
|
@ -1,58 +0,0 @@
|
||||
// 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, 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 on NetBSD.
|
||||
// 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.
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
// Non-standard typedefs.
|
||||
typedef const unsigned char* __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 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;
|
||||
};
|
@ -1,73 +0,0 @@
|
||||
// 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, 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[(unsigned char)(__c)] & __m; }
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const
|
||||
{
|
||||
while (__low < __high)
|
||||
*__vec++ = _M_table[*__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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,79 +0,0 @@
|
||||
// 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, 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()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return ::toupper((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::toupper((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return ::tolower((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::tolower((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
// Specific definitions for NetBSD -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
#endif
|
@ -1,57 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001 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
|
||||
//
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
typedef unsigned short mask;
|
||||
|
||||
// Non-standard typedefs.
|
||||
typedef unsigned char * __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.
|
||||
static const mask space = __dj_ISSPACE; // Whitespace
|
||||
static const mask print = __dj_ISPRINT; // Printing
|
||||
static const mask cntrl = __dj_ISCNTRL; // Control character
|
||||
static const mask upper = __dj_ISUPPER; // UPPERCASE
|
||||
static const mask lower = __dj_ISLOWER; // lowercase
|
||||
static const mask alpha = __dj_ISALPHA; // Alphabetic
|
||||
static const mask digit = __dj_ISDIGIT; // Numeric
|
||||
static const mask punct = __dj_ISPUNCT; // Punctuation
|
||||
static const mask xdigit = __dj_ISXDIGIT; // Hexadecimal numeric
|
||||
static const mask alnum = __dj_ISALPHA; // Alphanumeric
|
||||
static const mask graph = __dj_ISGRAPH; // Graphical
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,67 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001 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 + 1)] & __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;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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 DJGPP <ctype.h>
|
||||
|
||||
const ctype_base::mask*
|
||||
ctype<char>::classic_table() throw()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
|
||||
_M_table(__table ? __table : __dj_ctype_flags)
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
|
||||
_M_table(__table ? __table : __dj_ctype_flags)
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return _M_toupper[static_cast<int>(__c)+1]; }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::toupper(static_cast<int> (*__low));
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return _M_tolower[static_cast<int>(__c)+1]; }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::tolower(static_cast<int> (*__low));
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
// Specific definitions for DJGPP -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
// FIXME: should there be '#undef POSIX_SOURCE'?
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,58 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999 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
|
||||
//
|
||||
|
||||
// Default information, may not be appropriate for specific host.
|
||||
|
||||
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 int mask;
|
||||
static const mask upper = 1 << 0;
|
||||
static const mask lower = 1 << 1;
|
||||
static const mask alpha = 1 << 2;
|
||||
static const mask digit = 1 << 3;
|
||||
static const mask xdigit = 1 << 4;
|
||||
static const mask space = 1 << 5;
|
||||
static const mask print = 1 << 6;
|
||||
static const mask graph = 1 << 7;
|
||||
static const mask cntrl = 1 << 8;
|
||||
static const mask punct = 1 << 9;
|
||||
static const mask alnum = 1 << 10;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,125 +0,0 @@
|
||||
// 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, 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
|
||||
|
||||
// The following definitions are portable, but insanely slow. If one
|
||||
// cares at all about performance, then specialized ctype
|
||||
// functionality should be added for the native os in question: see
|
||||
// the config/os/bits/ctype_*.h files.
|
||||
|
||||
bool
|
||||
ctype<char>::
|
||||
is(mask __m, char __c) const
|
||||
{
|
||||
bool __ret;
|
||||
switch (__m)
|
||||
{
|
||||
case space:
|
||||
__ret = isspace(__c);
|
||||
break;
|
||||
case print:
|
||||
__ret = isprint(__c);
|
||||
break;
|
||||
case cntrl:
|
||||
__ret = iscntrl(__c);
|
||||
break;
|
||||
case upper:
|
||||
__ret = isupper(__c);
|
||||
break;
|
||||
case lower:
|
||||
__ret = islower(__c);
|
||||
break;
|
||||
case alpha:
|
||||
__ret = isalpha(__c);
|
||||
break;
|
||||
case digit:
|
||||
__ret = isdigit(__c);
|
||||
break;
|
||||
case punct:
|
||||
__ret = ispunct(__c);
|
||||
break;
|
||||
case xdigit:
|
||||
__ret = isxdigit(__c);
|
||||
break;
|
||||
case alnum:
|
||||
__ret = isalnum(__c);
|
||||
break;
|
||||
case graph:
|
||||
__ret = isgraph(__c);
|
||||
break;
|
||||
default:
|
||||
__ret = false;
|
||||
break;
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const
|
||||
{
|
||||
const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
|
||||
for (;__low < __high; ++__vec, ++__low)
|
||||
{
|
||||
mask __m = 0;
|
||||
int __i = 0; // Lowest bitmask in ctype_base == 0
|
||||
for (;__i < __bitmasksize; ++__i)
|
||||
{
|
||||
mask __bit = static_cast<mask>(1 << __i);
|
||||
if (this->is(__bit, *__low))
|
||||
__m |= __bit;
|
||||
}
|
||||
*__vec = __m;
|
||||
}
|
||||
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;
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return ::toupper((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::toupper((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return ::tolower((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::tolower((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
// Specific definitions for generic platforms -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#endif
|
@ -1,55 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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 = _ISgraph;
|
||||
static const mask cntrl = _IScntrl;
|
||||
static const mask punct = _ISpunct;
|
||||
static const mask alnum = _ISalnum;
|
||||
};
|
@ -1,69 +0,0 @@
|
||||
// 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, 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;
|
||||
}
|
@ -1,152 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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
|
||||
|
||||
#if _GLIBCPP_C_LOCALE_GNU
|
||||
const ctype_base::mask*
|
||||
ctype<char>::classic_table() throw()
|
||||
{
|
||||
locale::classic();
|
||||
return _S_c_locale->__ctype_b;
|
||||
}
|
||||
#else
|
||||
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");
|
||||
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
|
||||
__ret = *__ctype_b_loc();
|
||||
#else
|
||||
__ret = __ctype_b;
|
||||
#endif
|
||||
setlocale(LC_CTYPE, __old);
|
||||
free(__old);
|
||||
return __ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _GLIBCPP_C_LOCALE_GNU
|
||||
ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
|
||||
{
|
||||
_M_c_locale_ctype = _S_clone_c_locale(__cloc);
|
||||
_M_toupper = _M_c_locale_ctype->__ctype_toupper;
|
||||
_M_tolower = _M_c_locale_ctype->__ctype_tolower;
|
||||
_M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
|
||||
}
|
||||
#else
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
|
||||
{
|
||||
char* __old=strdup(setlocale(LC_CTYPE, NULL));
|
||||
setlocale(LC_CTYPE, "C");
|
||||
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
|
||||
_M_toupper = *__ctype_toupper_loc();
|
||||
_M_tolower = *__ctype_tolower_loc();
|
||||
_M_table = __table ? __table : *__ctype_b_loc();
|
||||
#else
|
||||
_M_toupper = __ctype_toupper;
|
||||
_M_tolower = __ctype_tolower;
|
||||
_M_table = __table ? __table : __ctype_b;
|
||||
#endif
|
||||
setlocale(LC_CTYPE, __old);
|
||||
free(__old);
|
||||
_M_c_locale_ctype = _S_c_locale;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _GLIBCPP_C_LOCALE_GNU
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
|
||||
__ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
|
||||
{
|
||||
_M_c_locale_ctype = _S_c_locale;
|
||||
_M_toupper = _M_c_locale_ctype->__ctype_toupper;
|
||||
_M_tolower = _M_c_locale_ctype->__ctype_tolower;
|
||||
_M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
|
||||
}
|
||||
#else
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
|
||||
__ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
|
||||
{
|
||||
char* __old=strdup(setlocale(LC_CTYPE, NULL));
|
||||
setlocale(LC_CTYPE, "C");
|
||||
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
|
||||
_M_toupper = *__ctype_toupper_loc();
|
||||
_M_tolower = *__ctype_tolower_loc();
|
||||
_M_table = __table ? __table : *__ctype_b_loc();
|
||||
#else
|
||||
_M_toupper = __ctype_toupper;
|
||||
_M_tolower = __ctype_tolower;
|
||||
_M_table = __table ? __table : __ctype_b;
|
||||
#endif
|
||||
setlocale(LC_CTYPE, __old);
|
||||
free(__old);
|
||||
_M_c_locale_ctype = _S_c_locale;
|
||||
}
|
||||
#endif
|
||||
|
||||
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;
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
// Specific definitions for GNU/Linux -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2001 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
// This keeps isanum, et al from being propagated as macros.
|
||||
#define __NO_CTYPE 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+ 0 == 0)
|
||||
|
||||
// The types __off_t and __off64_t are not defined through <sys/types.h>
|
||||
// as _G_config assumes. For libc5 and glibc 2.0 instead use
|
||||
// <gnu/types.h> and the old name for __off64_t.
|
||||
#include <gnu/types.h>
|
||||
typedef __loff_t __off64_t;
|
||||
|
||||
// These systems have declarations mismatching those in libio.h by
|
||||
// omitting throw qualifiers. Cleanest way out is to not provide
|
||||
// throw-qualifiers at all. Defining it as empty here will make libio.h
|
||||
// not define it.
|
||||
#undef __THROW
|
||||
#define __THROW
|
||||
|
||||
// Tell Glibc not to try to provide its own inline versions of
|
||||
// some math functions. Those cause assembly-time clashes with
|
||||
// our definitions.
|
||||
#define __NO_MATH_INLINES
|
||||
|
||||
#endif
|
||||
|
||||
#if defined __GLIBC__ && __GLIBC__ >= 2
|
||||
// We must not see the optimized string functions GNU libc defines.
|
||||
#define __NO_STRING_INLINES
|
||||
#endif
|
||||
|
||||
#if (defined(__hppa__) && defined(__LP64__)) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__))
|
||||
#define __glibcpp_long_bits 64
|
||||
#endif
|
||||
|
||||
#if defined(__hppa__) || (defined(__sparc__) && !defined(__arch64__))
|
||||
#define __glibcpp_long_double_bits 64
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,35 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#ifdef __LP64__
|
||||
#define __glibcpp_long_bits 64
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,55 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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
|
||||
//
|
||||
|
||||
// Default information, may not be appropriate for specific host.
|
||||
|
||||
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 int 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 = _ISGRAPH;
|
||||
static const mask cntrl = _ISCNTRL;
|
||||
static const mask punct = _ISPUNCT;
|
||||
static const mask alnum = _ISALNUM;
|
||||
};
|
@ -1,79 +0,0 @@
|
||||
// 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, 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[(unsigned char)(__c)] & __m; }
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const
|
||||
{
|
||||
const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
|
||||
for (;__low < __high; ++__vec, ++__low)
|
||||
{
|
||||
mask __m = _M_table[*__low];
|
||||
int __i = 0; // Lowest bitmask in ctype_base == 0
|
||||
while (__i < __bitmasksize && !(__m & static_cast<mask>(1 << __i)))
|
||||
++__i;
|
||||
*__vec = static_cast<mask>(1 << __i);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,82 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : (const mask *) __SB_masks)
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : (const mask *) __SB_masks)
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return ::toupper((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::toupper((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return ::tolower((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::tolower((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
// Specific definitions for generic platforms -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
#define __glibcpp_wchar_t_is_signed false
|
||||
|
||||
// Use macro form of ctype functions to ensure __SB_masks is defined.
|
||||
#define _SB_CTYPE_MACROS 1
|
||||
|
||||
/* HP-UX, for reasons unknown choose to use a different name for
|
||||
the string to [unsigned] long long conversion routines.
|
||||
|
||||
Furthermore, instead of having the prototypes in stdlib.h like
|
||||
everyone else, they put them into a non-standard header
|
||||
<inttypes.h>. Ugh.
|
||||
|
||||
<inttypes.h> defines a variety of things, some of which we
|
||||
probably do not want. So we don't want to include it here.
|
||||
|
||||
Luckily we can just declare strtoll and strtoull with the
|
||||
__asm extension which effectively renames calls at the
|
||||
source level without namespace pollution.
|
||||
|
||||
Also note that the compiler defines _INCLUDE_LONGLONG for C++
|
||||
unconditionally, which makes intmax_t and uintmax_t long long
|
||||
types.
|
||||
|
||||
We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
|
||||
to bastardize configure to deal with this sillyness. */
|
||||
namespace std {
|
||||
#ifndef __LP64__
|
||||
__extension__ extern "C" long long strtoll (const char *, char **, int)
|
||||
__asm ("__strtoll");
|
||||
__extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
|
||||
__asm ("__strtoull");
|
||||
#else
|
||||
__extension__ extern "C" long long strtoll (const char *, char **, int)
|
||||
__asm ("strtol");
|
||||
__extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
|
||||
__asm ("strtoul");
|
||||
#endif
|
||||
}
|
||||
#define _GLIBCPP_USE_LONG_LONG 1
|
||||
#endif
|
@ -1,50 +0,0 @@
|
||||
// Low-level functions for atomic operations: IRIX version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
#include <mutex.h>
|
||||
|
||||
typedef long _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__exchange_and_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
__atomic_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
__exchange_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,55 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997-1999, 2001 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 on irix 5.2
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
// Non-standard typedefs.
|
||||
typedef unsigned 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 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;
|
||||
static const mask space = _S;
|
||||
static const mask print = _U | _L | _N | _P | _B;
|
||||
static const mask graph = _U | _L | _N | _P;
|
||||
static const mask cntrl = _C;
|
||||
static const mask punct = _P;
|
||||
static const mask alnum = _U | _L | _N;
|
||||
};
|
@ -1,67 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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 && ! 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))
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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()
|
||||
{ return __ctype + 1; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(!__table ? classic_table() : __table)
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(!__table ? classic_table() : __table)
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return _toupper(__c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = do_toupper(*__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return _tolower(__c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = do_tolower(*__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
@ -1,61 +0,0 @@
|
||||
// Specific definitions for IRIX -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
// We need large file support. There are two ways to turn it on: by
|
||||
// defining either _LARGEFILE64_SOURCE or _SGI_SOURCE. However, it
|
||||
// does not actually work to define only the former, as then
|
||||
// <sys/stat.h> is invalid: `st_blocks' is defined to be a macro, but
|
||||
// then used as a field name. So, we have to turn on _SGI_SOURCE.
|
||||
// That only works if _POSIX_SOURCE is turned off, so we have to
|
||||
// explicitly turn it off. (Some of the libio C files explicitly try
|
||||
// to turn it on.) _SGI_SOURCE is actually turned on implicitly via
|
||||
// the command-line.
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
// GCC does not use thunks on IRIX.
|
||||
#define _G_USING_THUNKS 0
|
||||
|
||||
#define __glibcpp_long_double_bits 64
|
||||
|
||||
#if __LONG_MAX__ > 2147483647
|
||||
#define __glibcpp_long_bits 64
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,50 +0,0 @@
|
||||
// Low-level functions for atomic operations: IRIX version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
|
||||
#define _BITS_ATOMICITY_H 1
|
||||
|
||||
#include <mutex.h>
|
||||
|
||||
typedef long _Atomic_word;
|
||||
|
||||
static inline _Atomic_word
|
||||
__exchange_and_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
__atomic_add (_Atomic_word* __mem, int __val)
|
||||
{
|
||||
__exchange_and_add (__mem, __val);
|
||||
}
|
||||
|
||||
#endif /* atomicity.h */
|
@ -1,55 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997-1999 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 on irix 6.5
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
// Non-standard typedefs.
|
||||
typedef 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 int 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 = _ISgraph;
|
||||
static const mask cntrl = _IScntrl;
|
||||
static const mask punct = _ISpunct;
|
||||
static const mask alnum = _ISalnum;
|
||||
};
|
@ -1,67 +0,0 @@
|
||||
// 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, 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 && ! 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))
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(!__table ?
|
||||
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(!__table ?
|
||||
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return _toupper(__c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = do_toupper(*__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return _tolower(__c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = do_tolower(*__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
@ -1,62 +0,0 @@
|
||||
// Specific definitions for IRIX -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
// We need large file support. There are two ways to turn it on: by
|
||||
// defining either _LARGEFILE64_SOURCE or _SGI_SOURCE. However, it
|
||||
// does not actually work to define only the former, as then
|
||||
// <sys/stat.h> is invalid: `st_blocks' is defined to be a macro, but
|
||||
// then used as a field name. So, we have to turn on _SGI_SOURCE.
|
||||
// That only works if _POSIX_SOURCE is turned off, so we have to
|
||||
// explicitly turn it off. (Some of the libio C files explicitly try
|
||||
// to turn it on.) _SGI_SOURCE is actually turned on implicitly via
|
||||
// the command-line.
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
// GCC does not use thunks on IRIX.
|
||||
#define _G_USING_THUNKS 0
|
||||
|
||||
#define __glibcpp_long_double_bits 64
|
||||
|
||||
#if __LONG_MAX__ > 2147483647
|
||||
#define __glibcpp_wchar_t_bits 64
|
||||
#define __glibcpp_long_bits 64
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,58 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999 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 /mingw32/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 = _UPPER;
|
||||
static const mask lower = _LOWER;
|
||||
static const mask alpha = _ALPHA;
|
||||
static const mask digit = _DIGIT;
|
||||
static const mask xdigit = _HEX;
|
||||
static const mask space = _SPACE;
|
||||
static const mask print = (_BLANK | _PUNCT| _ALPHA | _DIGIT);
|
||||
static const mask graph = (_PUNCT | _ALPHA | _DIGIT);
|
||||
static const mask cntrl = _CONTROL;
|
||||
static const mask punct = _PUNCT;
|
||||
static const mask alnum = (_ALPHA | _DIGIT);
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,71 +0,0 @@
|
||||
// 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, 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 && !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;
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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 /mingw32/include/ctype.h.
|
||||
|
||||
// This should be in mingw's ctype.h but isn't in older versions
|
||||
// Static classic C-locale table. _ctype[0] is EOF
|
||||
extern "C" unsigned short __declspec(dllimport) _ctype[];
|
||||
|
||||
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)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return (this->is(ctype_base::lower, __c) ? (__c - 'a' + 'A') : __c); }
|
||||
|
||||
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
|
||||
{ return (this->is(ctype_base::upper, __c) ? (__c - 'A' + 'a') : __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = this->do_tolower(*__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
// Specific definitions for generic platforms -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
# define _GLIBCPP_OS_DEFINES
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#endif
|
@ -1,57 +0,0 @@
|
||||
// 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, 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, 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;
|
||||
};
|
@ -1,67 +0,0 @@
|
||||
// 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, 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 && !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;
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
// 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, 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()
|
||||
{ return _ctype_ + 1; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
// Specific definitions for newlib -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#endif
|
@ -1,35 +0,0 @@
|
||||
// Copyright (C) 2001 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 _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_bits 64
|
||||
|
||||
#define __glibcpp_long_double_bits 128
|
||||
|
||||
#endif
|
@ -1,55 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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 unsigned char* __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 short mask;
|
||||
static const mask upper = _UP;
|
||||
static const mask lower = _LO;
|
||||
static const mask alpha = _LO | _UP | _XA;
|
||||
static const mask digit = _DI;
|
||||
static const mask xdigit = _XD;
|
||||
static const mask space = _CN | _SP | _XS;
|
||||
static const mask print = _DI | _LO | _PU | _SP | _UP | _XA;
|
||||
static const mask graph = _DI | _LO | _PU | _UP | _XA;
|
||||
static const mask cntrl = _BB;
|
||||
static const mask punct = _PU;
|
||||
static const mask alnum = _DI | _LO | _UP | _XA;
|
||||
};
|
@ -1,67 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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[(unsigned char)(__c)] & __m; }
|
||||
|
||||
const char*
|
||||
ctype<char>::
|
||||
is(const char* __low, const char* __high, mask* __vec) const
|
||||
{
|
||||
while (__low < __high)
|
||||
*__vec++ = _M_table[*__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;
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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()
|
||||
{ return 0; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype)
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype)
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return ::toupper((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_toupper(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::toupper((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
||||
|
||||
char
|
||||
ctype<char>::do_tolower(char __c) const
|
||||
{ return ::tolower((int) __c); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = ::tolower((int) *__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
// Specific definitions for QNX 6.1 -*- C++ -*-
|
||||
|
||||
// Copyright (C) 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
#endif
|
@ -1,55 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997-1999, 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, 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, for solaris2.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 unsigned char mask;
|
||||
static const mask upper = 01;
|
||||
static const mask lower = 02;
|
||||
static const mask alpha = 01 | 02;
|
||||
static const mask digit = 04;
|
||||
static const mask xdigit = 0200;
|
||||
static const mask space = 010;
|
||||
static const mask print = 020 | 01 | 02 | 04 | 0100;
|
||||
static const mask graph = 020 | 01 | 02 | 04;
|
||||
static const mask cntrl = 040;
|
||||
static const mask punct = 020;
|
||||
static const mask alnum = 01 | 02 | 04;
|
||||
};
|
@ -1,69 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997-1999, 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, 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 + 1)[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 + 1)[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 + 1)[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 + 1)[static_cast<unsigned char>(*__low)] & __m) != 0)
|
||||
++__low;
|
||||
return __low;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
// 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, 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()
|
||||
{ return __ctype; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(NULL), _M_tolower(NULL),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
char
|
||||
ctype<char>::do_toupper(char __c) const
|
||||
{ return ((_M_table + 258)[static_cast<unsigned char>(__c)]); }
|
||||
|
||||
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
|
||||
{ return ((_M_table + 258)[static_cast<unsigned char>(__c)]); }
|
||||
|
||||
const char*
|
||||
ctype<char>::do_tolower(char* __low, const char* __high) const
|
||||
{
|
||||
while (__low < __high)
|
||||
{
|
||||
*__low = this->do_tolower(*__low);
|
||||
++__low;
|
||||
}
|
||||
return __high;
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
// Specific definitions for Solaris 2.5 -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
// These are typedefs which libio assumes are already in place (because
|
||||
// they really are, under Linux).
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
#endif
|
@ -1,56 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997-1999, 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, 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. Looks like this
|
||||
// only works with solaris2.6.
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
// Non-standard typedefs.
|
||||
typedef long* __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 int 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 = _ISGRAPH;
|
||||
static const mask cntrl = _ISCNTRL;
|
||||
static const mask punct = _ISPUNCT;
|
||||
static const mask alnum = _ISALNUM;
|
||||
};
|
@ -1,76 +0,0 @@
|
||||
// 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, 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
|
||||
{
|
||||
const int __bitmasksize = sizeof(mask) * 8;
|
||||
for (;__low < __high; ++__vec, ++__low)
|
||||
{
|
||||
mask __m = _M_table[static_cast<unsigned char>(*__low)];
|
||||
int __i = 0; // Lowest bitmask value from ctype_base.
|
||||
while (__i < __bitmasksize && !(__m & static_cast<mask>(1 << __i)))
|
||||
++__i;
|
||||
*__vec = static_cast<mask>(1 << __i);
|
||||
}
|
||||
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;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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()
|
||||
{ return __ctype_mask; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
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;
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
// Specific definitions for Solaris 2.6 -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
// These are typedefs which libio assumes are already in place (because
|
||||
// they really are, under Linux).
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
#endif
|
@ -1,57 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997-1999, 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, 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. Looks like this
|
||||
// only works with solaris2.7 and solaris2.8. Thanks for not changing
|
||||
// things, sun engineers!
|
||||
|
||||
struct ctype_base
|
||||
{
|
||||
// Non-standard typedefs.
|
||||
typedef 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 int 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 = _ISGRAPH;
|
||||
static const mask cntrl = _ISCNTRL;
|
||||
static const mask punct = _ISPUNCT;
|
||||
static const mask alnum = _ISALNUM;
|
||||
};
|
@ -1,69 +0,0 @@
|
||||
// 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, 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;
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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()
|
||||
{ return __ctype_mask; }
|
||||
|
||||
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
|
||||
size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
|
||||
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
|
||||
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
|
||||
_M_table(__table ? __table : classic_table())
|
||||
{ }
|
||||
|
||||
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;
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// Specific definitions for Solaris 7,8 -*- 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, 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 _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
|
||||
// These are typedefs which libio assumes are already in place (because
|
||||
// they really are, under Linux).
|
||||
#define __off_t off_t
|
||||
#define __off64_t off64_t
|
||||
#define __ssize_t ssize_t
|
||||
|
||||
#if defined(__sparcv9) || defined(__arch64__)
|
||||
#define __glibcpp_long_bits 64
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,31 +0,0 @@
|
||||
# configure.host
|
||||
|
||||
# This shell script handles all host based configuration for libstdc++.
|
||||
# It sets various shell variables based on the the host and the
|
||||
# configuration options. You can modify this shell script without
|
||||
# needing to rerun autoconf.
|
||||
|
||||
# This shell script should be invoked as
|
||||
# . configure.host
|
||||
# If it encounters an error, it will exit with a message.
|
||||
|
||||
# It uses the following shell variables:
|
||||
# host The configuration host
|
||||
# host_cpu The configuration host CPU
|
||||
# target_optspace --enable-target-optspace ("yes", "no", "")
|
||||
|
||||
# It sets the following shell variables:
|
||||
|
||||
|
||||
AM_RUNTESTFLAGS=
|
||||
|
||||
# Set any host dependent compiler flags.
|
||||
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
||||
|
||||
|
||||
case "${host}" in
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
// Copyright (C) 2000 Free Software Foundation
|
||||
|
||||
// This file is part of GNU CC.
|
||||
//
|
||||
// GNU CC 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.
|
||||
//
|
||||
// GNU CC 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 GNU CC; 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 _CPP_BACKWARD_STRSTREAM_H
|
||||
#define _CPP_BACKWARD_STRSTREAM_H 1
|
||||
|
||||
#include "strstream"
|
||||
|
||||
using std::strstreambuf;
|
||||
using std::istrstream;
|
||||
using std::ostrstream;
|
||||
using std::strstream;
|
||||
|
||||
#endif
|
||||
|
@ -1,59 +0,0 @@
|
||||
// generic C header shadow file -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 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, 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.
|
||||
|
||||
// This file is included by all the standard C <foo.h> headers
|
||||
// after defining _SHADOW_NAME.
|
||||
|
||||
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
|
||||
// Get out of the "swamp."
|
||||
} // Close extern "C"
|
||||
} // Close namespace _C_legacy::
|
||||
|
||||
# undef _IN_C_LEGACY_
|
||||
# include _SHADOW_NAME
|
||||
|
||||
// Dive back into the "swamp."
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
|
||||
#else /* not _IN_C_LEGACY_: directly included by user program */
|
||||
|
||||
# include _SHADOW_NAME
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
|
||||
using namespace ::_C_legacy::_C_shadow;
|
||||
|
||||
#endif /* _IN_C_LEGACY_ */
|
||||
|
||||
|
||||
|
@ -1,85 +0,0 @@
|
||||
// The template and inlines for the -*- C++ -*- slice class.
|
||||
|
||||
// Copyright (C) 1997-1999, 2001 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.
|
||||
|
||||
// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
|
||||
|
||||
/** @file slice.h
|
||||
* This is an internal header file, included by other library headers.
|
||||
* You should not attempt to use it directly.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BITS_SLICE_H
|
||||
#define _CPP_BITS_SLICE_H 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
class slice
|
||||
{
|
||||
public:
|
||||
slice ();
|
||||
slice (size_t, size_t, size_t);
|
||||
|
||||
size_t start () const;
|
||||
size_t size () const;
|
||||
size_t stride () const;
|
||||
|
||||
private:
|
||||
size_t _M_off; // offset
|
||||
size_t _M_sz; // size
|
||||
size_t _M_st; // stride unit
|
||||
};
|
||||
|
||||
inline slice::slice () {}
|
||||
|
||||
inline slice::slice (size_t __o, size_t __d, size_t __s)
|
||||
: _M_off (__o), _M_sz (__d), _M_st (__s) {}
|
||||
|
||||
inline size_t
|
||||
slice::start () const
|
||||
{ return _M_off; }
|
||||
|
||||
inline size_t
|
||||
slice::size () const
|
||||
{ return _M_sz; }
|
||||
|
||||
inline size_t
|
||||
slice::stride () const
|
||||
{ return _M_st; }
|
||||
|
||||
} // std::
|
||||
|
||||
|
||||
#endif /* _CPP_BITS_SLICE_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// End:
|
@ -1,55 +0,0 @@
|
||||
// -*- C++ -*- header wrapper.
|
||||
|
||||
// Copyright (C) 1997-1999 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 _INCLUDED_CPP_ASSERT_H_
|
||||
# define _INCLUDED_CPP_ASSERT_H_ 1
|
||||
|
||||
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _ASSERT_NEED_C_LEGACY_
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
|
||||
#ifdef _ASSERT_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _ASSERT_NEED_C_LEGACY_
|
||||
#endif /* _ASSERT_NEED_C_LEGACY_ */
|
||||
#endif /* _INCLUDED_CPP_ASSERT_H_ */
|
||||
|
@ -1,61 +0,0 @@
|
||||
// -*- C++ -*- header wrapper.
|
||||
|
||||
// Copyright (C) 1997-1999, 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, 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: 19.2 Assertions
|
||||
//
|
||||
|
||||
// NB: This is assumed to be a conforming implementation.
|
||||
|
||||
// ISO/IEC 9899:1999 (E), section 7.2
|
||||
// assert.h
|
||||
// ..defines the assert macro...
|
||||
|
||||
// ISO 14882
|
||||
// 17.4.1.2 Headers
|
||||
// ... declarations and definitions (except for macros) are within
|
||||
// namespace scope of the namepace std...
|
||||
|
||||
|
||||
//#ifndef _CPP_CASSERT
|
||||
//#define _CPP_CASSERT 1
|
||||
|
||||
//namespace _C_legacy {
|
||||
extern "C" {
|
||||
//# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <assert.h>
|
||||
}
|
||||
//} // namespace _C_legacy
|
||||
|
||||
//#undef _IN_C_LEGACY_
|
||||
|
||||
//#endif
|
||||
|
||||
|
@ -1,145 +0,0 @@
|
||||
// -*- C++ -*- header wrapper.
|
||||
|
||||
// Copyright (C) 1997-1999, 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, 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
|
||||
//
|
||||
|
||||
#ifndef _CPP_CCTYPE
|
||||
#define _CPP_CCTYPE 1
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <ctype.h>
|
||||
}
|
||||
|
||||
inline int
|
||||
_CPP_isalnum_capture(int c) { return isalnum(c); }
|
||||
|
||||
inline int
|
||||
_CPP_isalpha_capture(int c) { return isalpha(c); }
|
||||
|
||||
inline int
|
||||
_CPP_iscntrl_capture(int c) { return iscntrl(c); }
|
||||
|
||||
inline int
|
||||
_CPP_isdigit_capture(int c) { return isdigit(c); }
|
||||
|
||||
inline int
|
||||
_CPP_isgraph_capture(int c) { return isgraph(c); }
|
||||
|
||||
inline int
|
||||
_CPP_islower_capture(int c) { return islower(c); }
|
||||
|
||||
inline int
|
||||
_CPP_isprint_capture(int c) { return isprint(c); }
|
||||
|
||||
inline int
|
||||
_CPP_ispunct_capture(int c) { return ispunct(c); }
|
||||
|
||||
inline int
|
||||
_CPP_isspace_capture(int c) { return isspace(c); }
|
||||
|
||||
inline int
|
||||
_CPP_isupper_capture(int c) { return isupper(c); }
|
||||
|
||||
inline int
|
||||
_CPP_isxdigit_capture(int c) { return isxdigit(c); }
|
||||
|
||||
inline int
|
||||
_CPP_tolower_capture(int c) { return tolower(c); }
|
||||
|
||||
inline int
|
||||
_CPP_toupper_capture(int c) { return toupper(c); }
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef isalnum
|
||||
# undef isalpha
|
||||
# undef iscntrl
|
||||
# undef isdigit
|
||||
# undef isgraph
|
||||
# undef islower
|
||||
# undef isprint
|
||||
# undef ispunct
|
||||
# undef isspace
|
||||
# undef isupper
|
||||
# undef isxdigit
|
||||
|
||||
# undef tolower
|
||||
# undef toupper
|
||||
|
||||
namespace std {
|
||||
inline int
|
||||
isalnum(int __c) { return _C_legacy::_CPP_isalnum_capture(__c); }
|
||||
|
||||
inline int
|
||||
isalpha(int __c) { return _C_legacy::_CPP_isalpha_capture(__c); }
|
||||
|
||||
inline int
|
||||
iscntrl(int __c) { return _C_legacy::_CPP_iscntrl_capture(__c); }
|
||||
|
||||
inline int
|
||||
isdigit(int __c) { return _C_legacy::_CPP_isdigit_capture(__c); }
|
||||
|
||||
inline int
|
||||
isgraph(int __c) { return _C_legacy::_CPP_isgraph_capture(__c); }
|
||||
|
||||
inline int
|
||||
islower(int __c) { return _C_legacy::_CPP_islower_capture(__c); }
|
||||
|
||||
inline int
|
||||
isprint(int __c) { return _C_legacy::_CPP_isprint_capture(__c); }
|
||||
|
||||
inline int
|
||||
ispunct(int __c) { return _C_legacy::_CPP_ispunct_capture(__c); }
|
||||
|
||||
inline int
|
||||
isspace(int __c) { return _C_legacy::_CPP_isspace_capture(__c); }
|
||||
|
||||
inline int
|
||||
isupper(int __c) { return _C_legacy::_CPP_isupper_capture(__c); }
|
||||
|
||||
inline int
|
||||
isxdigit(int __c) { return _C_legacy::_CPP_isxdigit_capture(__c); }
|
||||
|
||||
inline int
|
||||
tolower(int __c) { return _C_legacy::_CPP_tolower_capture(__c); }
|
||||
|
||||
inline int
|
||||
toupper(int __c) { return _C_legacy::_CPP_toupper_capture(__c); }
|
||||
} // namespace std
|
||||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -1,48 +0,0 @@
|
||||
// -*- C++ -*- header wrapper.
|
||||
|
||||
// Copyright (C) 1997-1999, 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, 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: 19.3 Error numbers
|
||||
//
|
||||
|
||||
#ifndef _CPP_CERRNO
|
||||
#define _CPP_CERRNO 1
|
||||
|
||||
//namespace _C_legacy {
|
||||
extern "C" {
|
||||
//# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <errno.h>
|
||||
}
|
||||
//} // namespace _C_legacy::
|
||||
|
||||
//# undef _IN_C_LEGACY_
|
||||
|
||||
#endif
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user