Commit 9d6a24bd by Phil Edwards

std_bitset.h: Use GLIBCPP in multiple-inclusion guard.

2001-12-06  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/std_bitset.h:  Use GLIBCPP in multiple-inclusion guard.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_bvector.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_function.h:  Likewise.
	* include/bits/stl_iterator.h:  Likewise.
	* include/bits/stl_iterator_base_funcs.h:  Likewise.
	* include/bits/stl_iterator_base_types.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_pair.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_tempbuf.h:  Likewise.
	* include/bits/stl_tree.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.

	* include/bits/stl_alloc.h:  Use our own multiple inclusion guards.
	Doxygenate more comments.  Correct historical artifacts in comments.
	(alloc, single_alloc):  Uglify non-standard names.
	(__default_alloc_template::_NFREELISTS):  Calculate from other
	parameters.
	(__default_alloc_template::_S_free_list):  Remove SunPro workaround.
	(__default_alloc_template::_Lock):  Mark as "unused".
	* include/backward/alloc.h:  Update.
	* include/bits/stl_bvector.h:  Likewise.
	* include/ext/ropeimpl.h:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.

From-SVN: r47729
parent a5eb2838
2001-12-06 Phil Edwards <pme@gcc.gnu.org>
* include/bits/std_bitset.h: Use GLIBCPP in multiple-inclusion guard.
* include/bits/stl_algo.h: Likewise.
* include/bits/stl_algobase.h: Likewise.
* include/bits/stl_bvector.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_function.h: Likewise.
* include/bits/stl_iterator.h: Likewise.
* include/bits/stl_iterator_base_funcs.h: Likewise.
* include/bits/stl_iterator_base_types.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_pair.h: Likewise.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_set.h: Likewise.
* include/bits/stl_stack.h: Likewise.
* include/bits/stl_tempbuf.h: Likewise.
* include/bits/stl_tree.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/bits/stl_alloc.h: Use our own multiple inclusion guards.
Doxygenate more comments. Correct historical artifacts in comments.
(alloc, single_alloc): Uglify non-standard names.
(__default_alloc_template::_NFREELISTS): Calculate from other
parameters.
(__default_alloc_template::_S_free_list): Remove SunPro workaround.
(__default_alloc_template::_Lock): Mark as "unused".
* include/backward/alloc.h: Update.
* include/bits/stl_bvector.h: Likewise.
* include/ext/ropeimpl.h: Likewise.
* include/ext/stl_hashtable.h: Likewise.
2001-12-05 Benjamin Kosnik <bkoz@redhat.com>
DR/282
......
......@@ -50,8 +50,8 @@
using std::__malloc_alloc_template;
using std::__simple_alloc;
using std::__debug_alloc;
using std::alloc;
using std::single_client_alloc;
using std::__alloc;
using std::__single_client_alloc;
using std::allocator;
#ifdef __USE_MALLOC
using std::malloc_alloc;
......
......@@ -45,8 +45,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_BITSET
#define __SGI_STL_BITSET
#ifndef __GLIBCPP_BITSET
#define __GLIBCPP_BITSET
#pragma GCC system_header
......@@ -805,7 +805,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x)
#undef __BITSET_WORDS
#endif /* __SGI_STL_BITSET */
#endif /* __GLIBCPP_BITSET */
// Local Variables:
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_ALGO_H
#define __SGI_STL_INTERNAL_ALGO_H
#ifndef __GLIBCPP_INTERNAL_ALGO_H
#define __GLIBCPP_INTERNAL_ALGO_H
#include <bits/stl_heap.h>
......@@ -3601,7 +3601,7 @@ __result, __binary_pred, _IterType());
} // namespace std
#endif /* __SGI_STL_INTERNAL_ALGO_H */
#endif /* __GLIBCPP_INTERNAL_ALGO_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_ALGOBASE_H
#define __SGI_STL_INTERNAL_ALGOBASE_H
#ifndef __GLIBCPP_INTERNAL_ALGOBASE_H
#define __GLIBCPP_INTERNAL_ALGOBASE_H
#include <bits/c++config.h>
#include <bits/stl_pair.h>
......@@ -950,7 +950,7 @@ namespace std
} // namespace std
#endif /* __SGI_STL_INTERNAL_ALGOBASE_H */
#endif /* __GLIBCPP_INTERNAL_ALGOBASE_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_BVECTOR_H
#define __SGI_STL_INTERNAL_BVECTOR_H
#ifndef __GLIBCPP_INTERNAL_BVECTOR_H
#define __GLIBCPP_INTERNAL_BVECTOR_H
namespace std
{
......@@ -717,11 +717,11 @@ template <typename _Alloc>
};
// This typedef is non-standard. It is provided for backward compatibility.
typedef vector<bool, alloc> bit_vector;
typedef vector<bool, __alloc> bit_vector;
} // namespace std
#endif /* __SGI_STL_INTERNAL_BVECTOR_H */
#endif /* __GLIBCPP_INTERNAL_BVECTOR_H */
// Local Variables:
// mode:C++
......
......@@ -62,8 +62,8 @@
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
#ifndef __SGI_STL_INTERNAL_DEQUE_H
#define __SGI_STL_INTERNAL_DEQUE_H
#ifndef __GLIBCPP_INTERNAL_DEQUE_H
#define __GLIBCPP_INTERNAL_DEQUE_H
/* Class invariants:
* For any nonsingular iterator i:
......@@ -1447,7 +1447,7 @@ inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) {
} // namespace std
#endif /* __SGI_STL_INTERNAL_DEQUE_H */
#endif /* __GLIBCPP_INTERNAL_DEQUE_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_FUNCTION_H
#define __SGI_STL_INTERNAL_FUNCTION_H
#ifndef __GLIBCPP_INTERNAL_FUNCTION_H
#define __GLIBCPP_INTERNAL_FUNCTION_H
namespace std
{
......@@ -1046,7 +1046,7 @@ mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const)
} // namespace std
#endif /* __SGI_STL_INTERNAL_FUNCTION_H */
#endif /* __GLIBCPP_INTERNAL_FUNCTION_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_ITERATOR_H
#define __SGI_STL_INTERNAL_ITERATOR_H
#ifndef __GLIBCPP_INTERNAL_ITERATOR_H
#define __GLIBCPP_INTERNAL_ITERATOR_H
namespace std
{
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H
#define __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H
#ifndef __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H
#define __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H
// This file contains all of the general iterator-related utility
// functions, such as distance() and advance().
......@@ -176,7 +176,7 @@ namespace std
} // namespace std
#endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H */
#endif /* __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H */
// Local Variables:
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H
#define __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H
#ifndef __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H
#define __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H
// This file contains all of the general iterator-related utility
// types, such as iterator_traits and struct iterator.
......@@ -173,7 +173,7 @@ namespace std
} // namespace std
#endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H */
#endif /* __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H */
// Local Variables:
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_LIST_H
#define __SGI_STL_INTERNAL_LIST_H
#ifndef __GLIBCPP_INTERNAL_LIST_H
#define __GLIBCPP_INTERNAL_LIST_H
#include <bits/concept_check.h>
......@@ -969,7 +969,7 @@ namespace std
} // namespace std
#endif /* __SGI_STL_INTERNAL_LIST_H */
#endif /* __GLIBCPP_INTERNAL_LIST_H */
// vi:set ts=2 sw=2:
// Local Variables:
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_MULTIMAP_H
#define __SGI_STL_INTERNAL_MULTIMAP_H
#ifndef __GLIBCPP_INTERNAL_MULTIMAP_H
#define __GLIBCPP_INTERNAL_MULTIMAP_H
#include <bits/concept_check.h>
......@@ -258,7 +258,7 @@ inline void swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x,
} // namespace std
#endif /* __SGI_STL_INTERNAL_MULTIMAP_H */
#endif /* __GLIBCPP_INTERNAL_MULTIMAP_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_MULTISET_H
#define __SGI_STL_INTERNAL_MULTISET_H
#ifndef __GLIBCPP_INTERNAL_MULTISET_H
#define __GLIBCPP_INTERNAL_MULTISET_H
#include <bits/concept_check.h>
......@@ -270,7 +270,7 @@ inline void swap(multiset<_Key,_Compare,_Alloc>& __x,
} // namespace std
#endif /* __SGI_STL_INTERNAL_MULTISET_H */
#endif /* __GLIBCPP_INTERNAL_MULTISET_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_PAIR_H
#define __SGI_STL_INTERNAL_PAIR_H
#ifndef __GLIBCPP_INTERNAL_PAIR_H
#define __GLIBCPP_INTERNAL_PAIR_H
namespace std
{
......@@ -150,7 +150,7 @@ inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y)
} // namespace std
#endif /* __SGI_STL_INTERNAL_PAIR_H */
#endif /* __GLIBCPP_INTERNAL_PAIR_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_QUEUE_H
#define __SGI_STL_INTERNAL_QUEUE_H
#ifndef __GLIBCPP_INTERNAL_QUEUE_H
#define __GLIBCPP_INTERNAL_QUEUE_H
#include <bits/concept_check.h>
......@@ -237,7 +237,7 @@ public:
} // namespace std
#endif /* __SGI_STL_INTERNAL_QUEUE_H */
#endif /* __GLIBCPP_INTERNAL_QUEUE_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_SET_H
#define __SGI_STL_INTERNAL_SET_H
#ifndef __GLIBCPP_INTERNAL_SET_H
#define __GLIBCPP_INTERNAL_SET_H
#include <bits/concept_check.h>
......@@ -267,7 +267,7 @@ inline void swap(set<_Key,_Compare,_Alloc>& __x,
} // namespace std
#endif /* __SGI_STL_INTERNAL_SET_H */
#endif /* __GLIBCPP_INTERNAL_SET_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_STACK_H
#define __SGI_STL_INTERNAL_STACK_H
#ifndef __GLIBCPP_INTERNAL_STACK_H
#define __GLIBCPP_INTERNAL_STACK_H
#include <bits/concept_check.h>
......@@ -153,7 +153,7 @@ bool operator>=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
} // namespace std
#endif /* __SGI_STL_INTERNAL_STACK_H */
#endif /* __GLIBCPP_INTERNAL_STACK_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_TEMPBUF_H
#define __SGI_STL_INTERNAL_TEMPBUF_H
#ifndef __GLIBCPP_INTERNAL_TEMPBUF_H
#define __GLIBCPP_INTERNAL_TEMPBUF_H
namespace std
{
......@@ -181,7 +181,7 @@ struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
} // namespace std
#endif /* __SGI_STL_INTERNAL_TEMPBUF_H */
#endif /* __GLIBCPP_INTERNAL_TEMPBUF_H */
// Local Variables:
// mode:C++
......
......@@ -60,8 +60,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_TREE_H
#define __SGI_STL_INTERNAL_TREE_H
#ifndef __GLIBCPP_INTERNAL_TREE_H
#define __GLIBCPP_INTERNAL_TREE_H
/*
......@@ -1309,7 +1309,7 @@ struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
} // namespace std
#endif /* __SGI_STL_INTERNAL_TREE_H */
#endif /* __GLIBCPP_INTERNAL_TREE_H */
// Local Variables:
// mode:C++
......
......@@ -58,8 +58,8 @@
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_VECTOR_H
#define __SGI_STL_INTERNAL_VECTOR_H
#ifndef __GLIBCPP_INTERNAL_VECTOR_H
#define __GLIBCPP_INTERNAL_VECTOR_H
#include <bits/stl_iterator_base_funcs.h>
#include <bits/functexcept.h>
......@@ -802,7 +802,7 @@ vector<_Tp, _Alloc>::_M_range_insert(iterator __position,
} // namespace std
#endif /* __SGI_STL_INTERNAL_VECTOR_H */
#endif /* __GLIBCPP_INTERNAL_VECTOR_H */
// Local Variables:
// mode:C++
......
......@@ -863,15 +863,15 @@ bool rope<_CharT, _Alloc>::_S_apply_to_pieces(
size_t __len = __end - __begin;
bool __result;
_CharT* __buffer =
(_CharT*)alloc::allocate(__len * sizeof(_CharT));
(_CharT*)__alloc::allocate(__len * sizeof(_CharT));
try {
(*(__f->_M_fn))(__begin, __len, __buffer);
__result = __c(__buffer, __len);
alloc::deallocate(__buffer, __len * sizeof(_CharT));
__alloc::deallocate(__buffer, __len * sizeof(_CharT));
}
catch(...)
{
alloc::deallocate(__buffer, __len * sizeof(_CharT));
__alloc::deallocate(__buffer, __len * sizeof(_CharT));
__throw_exception_again;
}
return __result;
......
......@@ -85,7 +85,7 @@ struct _Hashtable_node
};
template <class _Val, class _Key, class _HashFcn,
class _ExtractKey, class _EqualKey, class _Alloc = alloc>
class _ExtractKey, class _EqualKey, class _Alloc = __alloc>
class hashtable;
template <class _Val, class _Key, class _HashFcn,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment