Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright notice,
10 * this list of conditions and the following disclaimer in the documentation
11 * and/or other materials provided with the distribution.
12 * Neither the name of Nokia Corporation nor the names of its contributors
13 * may be used to endorse or promote products derived from this software
14 * without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef _STLP_NEW_H_HEADER
32 # define _STLP_NEW_H_HEADER
34 # ifdef _STLP_NO_BAD_ALLOC
35 # ifndef _STLP_NEW_DONT_THROW
36 # define _STLP_NEW_DONT_THROW 1
37 # endif /* _STLP_NEW_DONT_THROW */
44 #if defined(__SYMBIAN32__) && defined( __WINSCW__)
45 // already defined symcpp.h included from rvct2_2.h
50 # ifdef _STLP_OWN_IOSTREAMS
52 extern _STLP_DECLSPEC const nothrow_t nothrow;
54 extern IMPORT_C const nothrow_t& GetNoThrowObj();
55 #define nothrow GetNoThrowObj()
58 # define nothrow nothrow_t()
60 #ifndef _STLP_EXCEPTION_BASE
61 # define _STLP_EXCEPTION_BASE exception
64 class bad_alloc : public _STLP_EXCEPTION_BASE {
66 bad_alloc () _STLP_NOTHROW_INHERENTLY { }
67 bad_alloc(const bad_alloc&) _STLP_NOTHROW_INHERENTLY { }
68 bad_alloc& operator=(const bad_alloc&) _STLP_NOTHROW_INHERENTLY {return *this;}
69 ~bad_alloc () _STLP_NOTHROW_INHERENTLY { }
70 const char* what() const _STLP_NOTHROW_INHERENTLY { return "bad alloc"; }
75 #endif /* _STLP_NO_BAD_ALLOC */
77 #if defined (_STLP_WINCE)
80 inline void* _STLP_CALL __stl_new(size_t __n) {
84 inline void _STLP_CALL __stl_delete(void* __p) {
94 #else /* _STLP_WINCE */
98 # ifndef _STLP_NO_BAD_ALLOC
99 # ifdef _STLP_USE_OWN_NAMESPACE
101 _STLP_BEGIN_NAMESPACE
102 using _STLP_VENDOR_EXCEPT_STD::bad_alloc;
103 using _STLP_VENDOR_EXCEPT_STD::nothrow_t;
104 using _STLP_VENDOR_EXCEPT_STD::nothrow;
106 # if defined (_STLP_GLOBAL_NEW_HANDLER)
108 using ::set_new_handler;
110 using _STLP_VENDOR_EXCEPT_STD::new_handler;
111 using _STLP_VENDOR_EXCEPT_STD::set_new_handler;
116 # endif /* _STLP_OWN_NAMESPACE */
118 # endif /* _STLP_NO_BAD_ALLOC */
120 # if defined (_STLP_NO_NEW_NEW_HEADER) || defined (_STLP_NEW_DONT_THROW) || defined (__SYMBIAN32__) \
121 || defined (__WINS__) && ! defined (_STLP_CHECK_NULL_ALLOC)
122 # define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x;if (__y == 0){_STLP_THROW(bad_alloc());}return __y
123 # if defined (__SYMBIAN32__)
124 //# define _STLP_NEW operator new
125 #define _STLP_NEW ::malloc
128 # elif defined (__SYMBIAN32__) || defined (__WINS__)
129 # ifndef _STLP_USE_TRAP_LEAVE
130 # define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x;if (__y == 0){abort();}return __y
132 # define _STLP_NEW(x) :: operator new (x, ELeave)
133 # define _STLP_CHECK_NULL_ALLOC(__x) return __x
137 # define _STLP_CHECK_NULL_ALLOC(__x) return __x
141 # define _STLP_NEW ::operator new
143 # define _STLP_PLACEMENT_NEW ::new
145 _STLP_BEGIN_NAMESPACE
149 typedef void(*new_handler)();
151 _STLP_DECLSPEC new_handler set_new_handler(new_handler pnew) throw();
155 #if (( defined(__IBMCPP__)|| defined(__OS400__) || defined (__xlC__) || defined (qTidyHeap)) && defined(__DEBUG_ALLOC__) )
156 inline void* _STLP_CALL __stl_new(size_t __n) { _STLP_CHECK_NULL_ALLOC(_STLP_NEW(__n, __FILE__, __LINE__)); }
157 inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p, __FILE__, __LINE__); }
159 inline void* _STLP_CALL __stl_new(size_t __n) { return ::operator new(__n); }
160 inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p); }
165 # endif /* _STLP_WINCE */
167 #if defined(__SYMBIAN32__) && !defined(__GCCE__)
168 _STLP_DECLSPEC void *operator new(unsigned int aSize);
170 _STLP_DECLSPEC void *operator new[](unsigned int aSize);
173 _STLP_DECLSPEC void operator delete(void* aPtr) throw();
175 _STLP_DECLSPEC void operator delete[](void* aPtr) throw();
177 _STLP_DECLSPEC void* operator new(unsigned int aSize, const std::nothrow_t& /*aNoThrow*/) throw();
179 _STLP_DECLSPEC void* operator new[](unsigned int aSize, const std::nothrow_t& aNoThrow) throw();
181 _STLP_DECLSPEC void operator delete(void* aPtr, const std::nothrow_t& /*aNoThrow*/) throw();
183 _STLP_DECLSPEC void operator delete[](void* aPtr, const std::nothrow_t& /*aNoThrow*/) throw();
187 #ifndef __PLACEMENT_VEC_NEW_INLINE
188 #define __PLACEMENT_VEC_NEW_INLINE
189 inline void* operator new[](unsigned int /*aSize*/, void* aBase) throw()
191 inline void operator delete[](void* /*aPtr*/, void* /*aBase*/) throw()
197 #ifndef __PLACEMENT_NEW_INLINE
198 #define __PLACEMENT_NEW_INLINE
199 inline void* operator new(unsigned int /*aSize*/, void* aBase) throw()
202 // Global placement operator delete
203 inline void operator delete(void* /*aPtr*/, void* /*aBase*/) throw()
205 #endif //__PLACEMENT_NEW_INLINE
208 #endif /* _STLP_NEW_H_HEADER */