summaryrefslogtreecommitdiffstats
path: root/external/firebird/c++17.patch
blob: 4863b89bd8fdada9068be81accaceadb89543180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
--- src/common/DynamicStrings.cpp
+++ src/common/DynamicStrings.cpp
@@ -37,7 +37,7 @@
 
 namespace Firebird {
 
-unsigned makeDynamicStrings(unsigned length, ISC_STATUS* const dst, const ISC_STATUS* const src) throw(BadAlloc)
+unsigned makeDynamicStrings(unsigned length, ISC_STATUS* const dst, const ISC_STATUS* const src)
 {
 	const ISC_STATUS* end = &src[length];
 
--- src/common/DynamicStrings.h
+++ src/common/DynamicStrings.h
@@ -34,7 +34,7 @@
 
 namespace Firebird {
 
-unsigned makeDynamicStrings(unsigned len, ISC_STATUS* const dst, const ISC_STATUS* const src) throw(BadAlloc);
+unsigned makeDynamicStrings(unsigned len, ISC_STATUS* const dst, const ISC_STATUS* const src);
 char* findDynamicStrings(unsigned len, ISC_STATUS* ptr) throw();
 
 } // namespace Firebird
--- src/common/StatusArg.cpp
+++ src/common/StatusArg.cpp
@@ -53,7 +53,7 @@
 
 namespace Arg {
 
-Base::Base(ISC_STATUS k, ISC_STATUS c) throw(Firebird::BadAlloc) :
+Base::Base(ISC_STATUS k, ISC_STATUS c) :
 	implementation(FB_NEW_POOL(*getDefaultMemoryPool()) ImplBase(k, c))
 {
 }
@@ -94,28 +94,28 @@
 	assign(ex);
 }
 
-StatusVector::StatusVector(ISC_STATUS k, ISC_STATUS c) throw(Firebird::BadAlloc) :
+StatusVector::StatusVector(ISC_STATUS k, ISC_STATUS c) :
 	Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(k, c))
 {
 	operator<<(*(static_cast<Base*>(this)));
 }
 
-StatusVector::StatusVector(const ISC_STATUS* s) throw(Firebird::BadAlloc) :
+StatusVector::StatusVector(const ISC_STATUS* s) :
 	Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(s))
 {
 }
 
-StatusVector::StatusVector(const IStatus* s) throw(Firebird::BadAlloc) :
+StatusVector::StatusVector(const IStatus* s) :
 	Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(s))
 {
 }
 
-StatusVector::StatusVector(const Exception& ex) throw(Firebird::BadAlloc) :
+StatusVector::StatusVector(const Exception& ex) :
 	Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(ex))
 {
 }
 
-StatusVector::StatusVector() throw(Firebird::BadAlloc) :
+StatusVector::StatusVector() :
 	Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(0, 0))
 {
 }
--- src/common/StatusArg.h
+++ src/common/StatusArg.h
@@ -87,7 +87,7 @@
 		virtual ~ImplBase() { }
 	};
 
-	Base(ISC_STATUS k, ISC_STATUS c) throw(Firebird::BadAlloc);
+	Base(ISC_STATUS k, ISC_STATUS c);
 	explicit Base(ImplBase* i) throw() : implementation(i) { }
 	~Base() throw() { delete implementation; }
 
@@ -144,13 +144,13 @@
 		explicit ImplStatusVector(const Exception& ex) throw();
 	};
 
-	StatusVector(ISC_STATUS k, ISC_STATUS v) throw(Firebird::BadAlloc);
+	StatusVector(ISC_STATUS k, ISC_STATUS v);
 
 public:
-	explicit StatusVector(const ISC_STATUS* s) throw(Firebird::BadAlloc);
-	explicit StatusVector(const IStatus* s) throw(Firebird::BadAlloc);
-	explicit StatusVector(const Exception& ex) throw(Firebird::BadAlloc);
-	StatusVector() throw(Firebird::BadAlloc);
+	explicit StatusVector(const ISC_STATUS* s);
+	explicit StatusVector(const IStatus* s);
+	explicit StatusVector(const Exception& ex);
+	StatusVector();
 	~StatusVector() { }
 
 	const ISC_STATUS* value() const throw() { return implementation->value(); }
--- src/common/classes/alloc.cpp
+++ src/common/classes/alloc.cpp
@@ -1635,7 +1635,7 @@
 
 	~FreeObjects();
 
-	FreeObjPtr allocateBlock(MemPool* pool, size_t from, size_t& size) throw (OOM_EXCEPTION)
+	FreeObjPtr allocateBlock(MemPool* pool, size_t from, size_t& size)
 	{
 		size_t full_size = size + (from ? 0 : ListBuilder::MEM_OVERHEAD);
 		if (full_size > Limits::TOP_LIMIT)
@@ -1705,7 +1705,7 @@
 	ListBuilder listBuilder;
 	Extent* currentExtent;
 
-	MemBlock* newBlock(MemPool* pool, unsigned slot) throw (OOM_EXCEPTION);
+	MemBlock* newBlock(MemPool* pool, unsigned slot);
 };
 
 
@@ -1787,26 +1787,26 @@
	};
 #endif // VALIDATE_POOL
 
-	MemBlock* alloc(size_t from, size_t& length, bool flagRedirect) throw (OOM_EXCEPTION);
+	MemBlock* alloc(size_t from, size_t& length, bool flagRedirect);
	void releaseBlock(MemBlock *block, bool flagDecr) throw ();
 
 public:
-	void* allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION);
-	MemBlock* allocate2(size_t from, size_t& size ALLOC_PARAMS) throw (OOM_EXCEPTION);
+	void* allocate(size_t size ALLOC_PARAMS);
+	MemBlock* allocate2(size_t from, size_t& size ALLOC_PARAMS);
 
 private:
-	virtual void memoryIsExhausted(void) throw (OOM_EXCEPTION);
-	void* allocRaw(size_t length) throw (OOM_EXCEPTION);
+	virtual void memoryIsExhausted(void);
+	void* allocRaw(size_t length);
	static void releaseMemory(void* block, bool flagExtent) throw ();
	static void releaseRaw(bool destroying, void *block, size_t size, bool use_cache = true) throw ();
-	void* getExtent(size_t from, size_t& to) throw (OOM_EXCEPTION);
+	void* getExtent(size_t from, size_t& to);
 
 public:
 	static void releaseExtent(bool destroying, void *block, size_t size, MemPool* pool) throw ();
 
 	// pass desired size, return actual extent size
 	template <class Extent>
-	void newExtent(size_t& size, Extent** linkedList) throw (OOM_EXCEPTION);
+	void newExtent(size_t& size, Extent** linkedList);
 
 private:
 #ifdef USE_VALGRIND
@@ -1942,7 +1942,7 @@
 
 
 template <class ListBuilder, class Limits>
-MemBlock* FreeObjects<ListBuilder, Limits>::newBlock(MemPool* pool, unsigned slot) throw (OOM_EXCEPTION)
+MemBlock* FreeObjects<ListBuilder, Limits>::newBlock(MemPool* pool, unsigned slot)
 {
 	size_t size = Limits::getSize(slot);
 
@@ -2151,7 +2151,7 @@
 }
 
 template <class Extent>
-void MemPool::newExtent(size_t& size, Extent** linkedList) throw(OOM_EXCEPTION)
+void MemPool::newExtent(size_t& size, Extent** linkedList)
 {
 	// No large enough block found. We need to extend the pool
 	void* memory = NULL;
@@ -2216,7 +2216,7 @@
 	pool->setStatsGroup(newStats);
 }
 
-MemBlock* MemPool::alloc(size_t from, size_t& length, bool flagRedirect) throw (OOM_EXCEPTION)
+MemBlock* MemPool::alloc(size_t from, size_t& length, bool flagRedirect)
 {
	MutexEnsureUnlock guard(mutex, "MemPool::alloc");
 	guard.enter();
@@ -2275,7 +2275,7 @@
 #ifdef DEBUG_GDS_ALLOC
 	, const char* fileName, int line
 #endif
-) throw (OOM_EXCEPTION)
+)
 {
 	size_t length = from ? size : ROUNDUP(size + VALGRIND_REDZONE, roundingSize) + GUARD_BYTES;
 	MemBlock* memory = alloc(from, length, true);
@@ -2305,7 +2305,7 @@
 }
 
 
-void* MemPool::allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION)
+void* MemPool::allocate(size_t size ALLOC_PARAMS)
 {
 #ifdef VALIDATE_POOL
	MutexLockGuard guard(mutex, "MemPool::allocate");
@@ -2445,12 +2445,12 @@
 	releaseRaw(pool_destroying, hunk, hunk->length, false);
 }
 
-void MemPool::memoryIsExhausted(void) throw (OOM_EXCEPTION)
+void MemPool::memoryIsExhausted(void)
 {
 	Firebird::BadAlloc::raise();
 }
 
-void* MemPool::allocRaw(size_t size) throw (OOM_EXCEPTION)
+void* MemPool::allocRaw(size_t size)
 {
 #ifndef USE_VALGRIND
 	if (size == DEFAULT_ALLOCATION)
@@ -2530,7 +2530,7 @@
 }
 
 
-void* MemPool::getExtent(size_t from, size_t& to) throw(OOM_EXCEPTION)		// pass desired minimum size, return actual extent size
+void* MemPool::getExtent(size_t from, size_t& to)		// pass desired minimum size, return actual extent size
 {
 #ifdef VALIDATE_POOL
	MutexLockGuard guard(mutex, "MemPool::getExtent");
@@ -2653,7 +2653,7 @@
 	deallocate(block);
 }
 
-void* MemoryPool::calloc(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION)
+void* MemoryPool::calloc(size_t size ALLOC_PARAMS)
 {
 	void* block = allocate(size ALLOC_PASS_ARGS);
 	memset(block, 0, size);
@@ -2800,7 +2800,7 @@
 }

 #ifdef LIBC_CALLS_NEW
-void* MemoryPool::globalAlloc(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
+void* MemoryPool::globalAlloc(size_t s ALLOC_PARAMS)
 {
	if (!defaultMemoryManager)
	{
@@ -2818,7 +2818,7 @@
 	MemPool::globalFree(block);
 }
 
-void* MemoryPool::allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION)
+void* MemoryPool::allocate(size_t size ALLOC_PARAMS)
 {
 	return pool->allocate(size ALLOC_PASS_ARGS);
 }
@@ -2876,11 +2876,11 @@
 // in a case when we actually need "new" only with file/line information
 // this version should be also present as a pair for "delete".
 #ifdef DEBUG_GDS_ALLOC
-void* operator new(size_t s) throw (OOM_EXCEPTION)
+void* operator new(size_t s)
 {
 	return MemoryPool::globalAlloc(s ALLOC_ARGS);
 }
-void* operator new[](size_t s) throw (OOM_EXCEPTION)
+void* operator new[](size_t s)
 {
 	return MemoryPool::globalAlloc(s ALLOC_ARGS);
 }
--- src/common/classes/alloc.h
+++ src/common/classes/alloc.h
@@ -186,18 +186,18 @@
 #define ALLOC_PASS_ARGS
 #endif // DEBUG_GDS_ALLOC
 
-	void* calloc(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION);
+	void* calloc(size_t size ALLOC_PARAMS);
 
 #ifdef LIBC_CALLS_NEW
-	static void* globalAlloc(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION);
+	static void* globalAlloc(size_t s ALLOC_PARAMS);
 #else
-	static void* globalAlloc(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
+	static void* globalAlloc(size_t s ALLOC_PARAMS)
 	{
 		return defaultMemoryManager->allocate(s ALLOC_PASS_ARGS);
 	}
 #endif // LIBC_CALLS_NEW
 
-	void* allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION);
+	void* allocate(size_t size ALLOC_PARAMS);
 
 	static void globalFree(void* mem) throw ();
 	void deallocate(void* mem) throw ();
@@ -289,20 +289,20 @@
 
 // operators new and delete
 
-inline void* operator new(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
+inline void* operator new(size_t s ALLOC_PARAMS)
 {
 	return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
 }
-inline void* operator new[](size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
+inline void* operator new[](size_t s ALLOC_PARAMS)
 {
 	return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
 }
 
-inline void* operator new(size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) throw (OOM_EXCEPTION)
+inline void* operator new(size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS)
 {
 	return pool.allocate(s ALLOC_PASS_ARGS);
 }
-inline void* operator new[](size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) throw (OOM_EXCEPTION)
+inline void* operator new[](size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS)
 {
 	return pool.allocate(s ALLOC_PASS_ARGS);
 }