diff options
Diffstat (limited to 'libstdc++-v3/config')
-rw-r--r-- | libstdc++-v3/config/allocator/bitmap_allocator_base.h | 37 | ||||
-rw-r--r-- | libstdc++-v3/config/allocator/malloc_allocator_base.h | 37 | ||||
-rw-r--r-- | libstdc++-v3/config/allocator/mt_allocator_base.h | 37 | ||||
-rw-r--r-- | libstdc++-v3/config/allocator/new_allocator_base.h | 37 | ||||
-rw-r--r-- | libstdc++-v3/config/os/bsd/darwin/ctype_base.h | 77 | ||||
-rw-r--r-- | libstdc++-v3/config/os/bsd/darwin/ctype_inline.h | 95 | ||||
-rw-r--r-- | libstdc++-v3/config/os/bsd/darwin/ctype_noninline.h | 82 | ||||
-rw-r--r-- | libstdc++-v3/config/os/bsd/darwin/os_defines.h | 161 |
8 files changed, 415 insertions, 148 deletions
diff --git a/libstdc++-v3/config/allocator/bitmap_allocator_base.h b/libstdc++-v3/config/allocator/bitmap_allocator_base.h deleted file mode 100644 index bf84ae06d7f..00000000000 --- a/libstdc++-v3/config/allocator/bitmap_allocator_base.h +++ /dev/null @@ -1,37 +0,0 @@ -// Base to std::allocator -*- C++ -*- - -// Copyright (C) 2004 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#ifndef _CXX_ALLOCATOR_H -#define _CXX_ALLOCATOR_H 1 - -// Define bitmap_allocator as the base class to std::allocator. -#include <ext/bitmap_allocator.h> -#define ___glibcxx_base_allocator __gnu_cxx::bitmap_allocator - -#endif diff --git a/libstdc++-v3/config/allocator/malloc_allocator_base.h b/libstdc++-v3/config/allocator/malloc_allocator_base.h deleted file mode 100644 index 4a82ec362c5..00000000000 --- a/libstdc++-v3/config/allocator/malloc_allocator_base.h +++ /dev/null @@ -1,37 +0,0 @@ -// Base to std::allocator -*- C++ -*- - -// Copyright (C) 2004 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#ifndef _CXX_ALLOCATOR_H -#define _CXX_ALLOCATOR_H 1 - -// Define new_allocator as the base class to std::allocator. -#include <ext/malloc_allocator.h> -#define ___glibcxx_base_allocator __gnu_cxx::malloc_allocator - -#endif diff --git a/libstdc++-v3/config/allocator/mt_allocator_base.h b/libstdc++-v3/config/allocator/mt_allocator_base.h deleted file mode 100644 index 52b4421a439..00000000000 --- a/libstdc++-v3/config/allocator/mt_allocator_base.h +++ /dev/null @@ -1,37 +0,0 @@ -// Base to std::allocator -*- C++ -*- - -// Copyright (C) 2004 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#ifndef _CXX_ALLOCATOR_H -#define _CXX_ALLOCATOR_H 1 - -// Define mt_allocator as the base class to std::allocator. -#include <ext/mt_allocator.h> -#define ___glibcxx_base_allocator __gnu_cxx::__mt_alloc - -#endif diff --git a/libstdc++-v3/config/allocator/new_allocator_base.h b/libstdc++-v3/config/allocator/new_allocator_base.h deleted file mode 100644 index 442f89cc535..00000000000 --- a/libstdc++-v3/config/allocator/new_allocator_base.h +++ /dev/null @@ -1,37 +0,0 @@ -// Base to std::allocator -*- C++ -*- - -// Copyright (C) 2004 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#ifndef _CXX_ALLOCATOR_H -#define _CXX_ALLOCATOR_H 1 - -// Define new_allocator as the base class to std::allocator. -#include <ext/new_allocator.h> -#define ___glibcxx_base_allocator __gnu_cxx::new_allocator - -#endif diff --git a/libstdc++-v3/config/os/bsd/darwin/ctype_base.h b/libstdc++-v3/config/os/bsd/darwin/ctype_base.h new file mode 100644 index 00000000000..66f59010649 --- /dev/null +++ b/libstdc++-v3/config/os/bsd/darwin/ctype_base.h @@ -0,0 +1,77 @@ +// APPLE LOCAL file darwin-specific headers +// 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 + }; + + + diff --git a/libstdc++-v3/config/os/bsd/darwin/ctype_inline.h b/libstdc++-v3/config/os/bsd/darwin/ctype_inline.h new file mode 100644 index 00000000000..ea8e93539f3 --- /dev/null +++ b/libstdc++-v3/config/os/bsd/darwin/ctype_inline.h @@ -0,0 +1,95 @@ +// APPLE LOCAL file darwin-specific headers +// 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; + } + + + + + diff --git a/libstdc++-v3/config/os/bsd/darwin/ctype_noninline.h b/libstdc++-v3/config/os/bsd/darwin/ctype_noninline.h new file mode 100644 index 00000000000..34bbe5cb2c7 --- /dev/null +++ b/libstdc++-v3/config/os/bsd/darwin/ctype_noninline.h @@ -0,0 +1,82 @@ +// APPLE LOCAL file darwin-specific headers +// 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; + } diff --git a/libstdc++-v3/config/os/bsd/darwin/os_defines.h b/libstdc++-v3/config/os/bsd/darwin/os_defines.h new file mode 100644 index 00000000000..6a006e30217 --- /dev/null +++ b/libstdc++-v3/config/os/bsd/darwin/os_defines.h @@ -0,0 +1,161 @@ +// APPLE LOCAL file darwin-specific headers +// 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 + +#define _GLIBCPP_AVOID_FSEEK 1 + +/* APPLE LOCAL begin keymgr */ +/* Copyright (C) 1989, 92-97, 1998, Free Software Foundation, Inc. + +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. */ + + +/* + * This file added by Apple Computer Inc. for its OS X + * environment. + */ + +#ifndef __KEYMGR_H +#define __KEYMGR_H + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* + * keymgr - Create and maintain process-wide global data known to + * all threads across all dynamic libraries. + * + */ + +typedef enum node_kinds { + NODE_THREAD_SPECIFIC_DATA=1, + NODE_PROCESSWIDE_PTR=2, + NODE_LAST_KIND + } TnodeKind ; + +/* + * These enum members are bits or combination of bits. + */ + +typedef enum node_mode { + NM_ALLOW_RECURSION=1, + NM_RECURSION_ILLEGAL=2, + NM_ENHANCED_LOCKING=3, + NM_LOCKED=4 + } TnodeMode ; + + + +extern void * _keymgr_get_per_thread_data(unsigned int key) ; +extern void _keymgr_set_per_thread_data(unsigned int key, void *keydata) ; +extern void *_keymgr_get_and_lock_processwide_ptr(unsigned int key) ; +extern void _keymgr_set_and_unlock_processwide_ptr(unsigned int key, void *ptr) ; +extern void _keymgr_unlock_processwide_ptr(unsigned int key) ; +extern void _keymgr_set_lockmode_processwide_ptr(unsigned int key, unsigned int mode) ; +extern unsigned int _keymgr_get_lockmode_processwide_ptr(unsigned int key) ; +extern int _keymgr_get_lock_count_processwide_ptr(unsigned int key) ; + +#ifndef NULL +#define NULL (0) +#endif + +/* + * Keys currently in use: + */ + +#define KEYMGR_EH_CONTEXT_KEY 1 /*stores handle for root pointer of exception context node.*/ + +#define KEYMGR_NEW_HANLDER_KEY 2 /*store handle for new handler pointer.*/ + +#define KEYMGR_UNEXPECTED_HANDLER_KEY 3 /*store handle for unexpected exception pointer.*/ + +#define KEYMGR_TERMINATE_HANDLER_KEY 4 /*store handle for terminate handler pointer. */ + +#define KEYMGR_MODE_BITS 5 /*stores handle for runtime mode bits.*/ + +#define KEYMGR_IO_LIST 6 /*Root pointer to the list of open streams.*/ + +#define KEYMGR_IO_STDIN 7 /*GNU stdin.*/ + +#define KEYMGR_IO_STDOUT 8 /*GNU stdout.*/ + +#define KEYMGR_IO_STDERR 9 /*GNU stderr.*/ + +#define KEYMGR_IO_REFCNT 10 /*How many plugins/main program currently using streams.*/ + +#define KEYMGR_IO_MODE_BITS 11 /*Flags controlling the behavior of C++ I/O.*/ + +#define KEYMGR_ZOE_IMAGE_LIST 12 /*Head pointer for list of per image dwarf2 unwind sections.*/ + + + +/* + * Other important data. + */ + +#define KEYMGR_API_REV_MAJOR 2 /*Major revision number of the keymgr API.*/ +#define KEYMGR_API_REV_MINOR 1 /*Minor revision number of the keymgr API.*/ + + + +#ifdef __cplusplus +} +#endif + +#endif /* __KEYMGR_H */ +/* APPLE LOCAL end keymgr */ + +#endif /* _GLIBCPP_OS_DEFINES */ |