]>
Commit | Line | Data |
---|---|---|
3ee364da MM |
1 | --- firebird-1.5.2.4731/src/common/classes/alloc.h~ 2004-09-17 20:34:27.000000000 +0000 |
2 | +++ firebird-1.5.2.4731/src/common/classes/alloc.h 2005-05-02 23:30:18.351312952 +0000 | |
3 | @@ -253,11 +253,11 @@ | |
4 | #define FB_NEW(pool) new(pool,__FILE__,__LINE__) | |
5 | #define FB_NEW_RPT(pool,count) new(pool,count,__FILE__,__LINE__) | |
6 | #else | |
7 | -static inline void* operator new(size_t s, Firebird::MemoryPool& pool) { | |
8 | +inline void* operator new(size_t s, Firebird::MemoryPool& pool) { | |
9 | return pool.allocate(s); | |
10 | // return pool.calloc(s); | |
11 | } | |
12 | -static inline void* operator new[](size_t s, Firebird::MemoryPool& pool) { | |
13 | +inline void* operator new[](size_t s, Firebird::MemoryPool& pool) { | |
14 | return pool.allocate(s); | |
15 | // return pool.calloc(s); | |
16 | } | |
17 | --- firebird-1.5.2.4731/src/common/config/config.h.orig 2005-05-02 23:33:31.284982576 +0000 | |
18 | +++ firebird-1.5.2.4731/src/common/config/config.h 2005-05-02 23:36:57.674606584 +0000 | |
19 | @@ -118,12 +118,12 @@ | |
20 | /* | |
21 | Block size for the sorting manager | |
22 | */ | |
23 | - static int getSortMemBlockSize(); | |
24 | + static size_t getSortMemBlockSize(); | |
25 | ||
26 | /* | |
27 | Memory usage limit for the sorting manager | |
28 | */ | |
29 | - static int getSortMemUpperLimit(); | |
30 | + static size_t getSortMemUpperLimit(); | |
31 | ||
32 | /* | |
33 | Whether remote (NFS) files can be opened | |
34 | @@ -133,12 +133,12 @@ | |
35 | /* | |
36 | Startup option for the guardian | |
37 | */ | |
38 | - static int getGuardianOption(); | |
39 | + static size_t getGuardianOption(); | |
40 | ||
41 | /* | |
42 | CPU affinity mask | |
43 | */ | |
44 | - static int getCpuAffinityMask(); | |
45 | + static size_t getCpuAffinityMask(); | |
46 | ||
47 | /* | |
48 | Old parameter ordering for backward compatibility with FB1/IB6.X | |
49 | @@ -148,7 +148,7 @@ | |
50 | /* | |
51 | XDR buffer size | |
52 | */ | |
53 | - static int getTcpRemoteBufferSize(); | |
54 | + static size_t getTcpRemoteBufferSize(); | |
55 | ||
56 | /* | |
57 | Disable Nagle algorithm | |
58 | @@ -158,37 +158,37 @@ | |
59 | /* | |
60 | IPC client mapping | |
61 | */ | |
62 | - static int getIpcMapSize(); | |
63 | + static size_t getIpcMapSize(); | |
64 | ||
65 | /* | |
66 | Default database cache size | |
67 | */ | |
68 | - static int getDefaultDbCachePages(); | |
69 | + static size_t getDefaultDbCachePages(); | |
70 | ||
71 | /* | |
72 | Connection timeout | |
73 | */ | |
74 | - static int getConnectionTimeout(); | |
75 | + static size_t getConnectionTimeout(); | |
76 | ||
77 | /* | |
78 | Dummy packet interval | |
79 | */ | |
80 | - static int getDummyPacketInterval(); | |
81 | + static size_t getDummyPacketInterval(); | |
82 | ||
83 | /* | |
84 | Lock manager memory size | |
85 | */ | |
86 | - static int getLockMemSize(); | |
87 | + static size_t getLockMemSize(); | |
88 | ||
89 | /* | |
90 | Lock manager semaphore count | |
91 | */ | |
92 | - static int getLockSemCount(); | |
93 | + static size_t getLockSemCount(); | |
94 | ||
95 | /* | |
96 | Lock manager signal number | |
97 | */ | |
98 | - static int getLockSignal(); | |
99 | + static size_t getLockSignal(); | |
100 | ||
101 | /* | |
102 | Lock manager grant order | |
103 | @@ -198,27 +198,27 @@ | |
104 | /* | |
105 | Lock manager hash slots | |
106 | */ | |
107 | - static int getLockHashSlots(); | |
108 | + static size_t getLockHashSlots(); | |
109 | ||
110 | /* | |
111 | Lock manager acquire spins | |
112 | */ | |
113 | - static int getLockAcquireSpins(); | |
114 | + static size_t getLockAcquireSpins(); | |
115 | ||
116 | /* | |
117 | Event manager memory size | |
118 | */ | |
119 | - static int getEventMemSize(); | |
120 | + static size_t getEventMemSize(); | |
121 | ||
122 | /* | |
123 | Deadlock timeout | |
124 | */ | |
125 | - static int getDeadlockTimeout(); | |
126 | + static size_t getDeadlockTimeout(); | |
127 | ||
128 | /* | |
129 | Solaris stall value | |
130 | */ | |
131 | - static int getSolarisStallValue(); | |
132 | + static size_t getSolarisStallValue(); | |
133 | ||
134 | /* | |
135 | Trace memory pools | |
136 | @@ -228,17 +228,17 @@ | |
137 | /* | |
138 | Priority switch delay | |
139 | */ | |
140 | - static int getPrioritySwitchDelay(); | |
141 | + static size_t getPrioritySwitchDelay(); | |
142 | ||
143 | /* | |
144 | Dead threads collection | |
145 | */ | |
146 | - static int getDeadThreadsCollection(); | |
147 | + static size_t getDeadThreadsCollection(); | |
148 | ||
149 | /* | |
150 | Priority boost | |
151 | */ | |
152 | - static int getPriorityBoost(); | |
153 | + static size_t getPriorityBoost(); | |
154 | ||
155 | /* | |
156 | Service name for remote protocols | |
157 | @@ -248,7 +248,7 @@ | |
158 | /* | |
159 | Service port for INET | |
160 | */ | |
161 | - static int getRemoteServicePort(); | |
162 | + static size_t getRemoteServicePort(); | |
163 | ||
164 | /* | |
165 | Pipe name for WNET | |
166 | @@ -263,17 +263,17 @@ | |
167 | /* | |
168 | Unflushed writes number | |
169 | */ | |
170 | - static int getMaxUnflushedWrites(); | |
171 | + static size_t getMaxUnflushedWrites(); | |
172 | ||
173 | /* | |
174 | Unflushed write time | |
175 | */ | |
176 | - static int getMaxUnflushedWriteTime(); | |
177 | + static size_t getMaxUnflushedWriteTime(); | |
178 | ||
179 | /* | |
180 | Process priority level | |
181 | */ | |
182 | - static int getProcessPriorityLevel(); | |
183 | + static size_t getProcessPriorityLevel(); | |
184 | ||
185 | /* | |
186 | Create window for IPC stuff | |
187 | @@ -288,7 +288,7 @@ | |
188 | /* | |
189 | Port for event processing | |
190 | */ | |
191 | - static int getRemoteAuxPort(); | |
192 | + static size_t getRemoteAuxPort(); | |
193 | ||
194 | /* | |
195 | Server binding NIC address | |
196 | --- firebird-1.5.2.4731/src/common/config/config.cpp.orig 2005-05-02 23:33:35.531337032 +0000 | |
197 | +++ firebird-1.5.2.4731/src/common/config/config.cpp 2005-05-02 23:36:03.720808808 +0000 | |
198 | @@ -257,14 +257,14 @@ | |
199 | return result ? result : sysConfig.root_dir; | |
200 | } | |
201 | ||
202 | -int Config::getSortMemBlockSize() | |
203 | +size_t Config::getSortMemBlockSize() | |
204 | { | |
205 | - return (int) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE]; | |
206 | + return (size_t) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE]; | |
207 | } | |
208 | ||
209 | -int Config::getSortMemUpperLimit() | |
210 | +size_t Config::getSortMemUpperLimit() | |
211 | { | |
212 | - return (int) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT]; | |
213 | + return (size_t) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT]; | |
214 | } | |
215 | ||
216 | bool Config::getRemoteFileOpenAbility() | |
217 | @@ -272,14 +272,14 @@ | |
218 | return (bool) sysConfig.values[KEY_REMOTE_FILE_OPEN_ABILITY]; | |
219 | } | |
220 | ||
221 | -int Config::getGuardianOption() | |
222 | +size_t Config::getGuardianOption() | |
223 | { | |
224 | - return (int) sysConfig.values[KEY_GUARDIAN_OPTION]; | |
225 | + return (size_t) sysConfig.values[KEY_GUARDIAN_OPTION]; | |
226 | } | |
227 | ||
228 | -int Config::getCpuAffinityMask() | |
229 | +size_t Config::getCpuAffinityMask() | |
230 | { | |
231 | - return (int) sysConfig.values[KEY_CPU_AFFINITY_MASK]; | |
232 | + return (size_t) sysConfig.values[KEY_CPU_AFFINITY_MASK]; | |
233 | } | |
234 | ||
235 | bool Config::getOldParameterOrdering() | |
236 | @@ -287,9 +287,9 @@ | |
237 | return (bool) sysConfig.values[KEY_OLD_PARAMETER_ORDERING]; | |
238 | } | |
239 | ||
240 | -int Config::getTcpRemoteBufferSize() | |
241 | +size_t Config::getTcpRemoteBufferSize() | |
242 | { | |
243 | - return (int) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE]; | |
244 | + return (size_t) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE]; | |
245 | } | |
246 | ||
247 | bool Config::getTcpNoNagle() | |
248 | @@ -297,39 +297,39 @@ | |
249 | return (bool) sysConfig.values[KEY_TCP_NO_NAGLE]; | |
250 | } | |
251 | ||
252 | -int Config::getIpcMapSize() | |
253 | +size_t Config::getIpcMapSize() | |
254 | { | |
255 | - return (int) sysConfig.values[KEY_IPC_MAP_SIZE]; | |
256 | + return (size_t) sysConfig.values[KEY_IPC_MAP_SIZE]; | |
257 | } | |
258 | ||
259 | -int Config::getDefaultDbCachePages() | |
260 | +size_t Config::getDefaultDbCachePages() | |
261 | { | |
262 | - return (int) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES]; | |
263 | + return (size_t) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES]; | |
264 | } | |
265 | ||
266 | -int Config::getConnectionTimeout() | |
267 | +size_t Config::getConnectionTimeout() | |
268 | { | |
269 | - return (int) sysConfig.values[KEY_CONNECTION_TIMEOUT]; | |
270 | + return (size_t) sysConfig.values[KEY_CONNECTION_TIMEOUT]; | |
271 | } | |
272 | ||
273 | -int Config::getDummyPacketInterval() | |
274 | +size_t Config::getDummyPacketInterval() | |
275 | { | |
276 | - return (int) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL]; | |
277 | + return (size_t) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL]; | |
278 | } | |
279 | ||
280 | -int Config::getLockMemSize() | |
281 | +size_t Config::getLockMemSize() | |
282 | { | |
283 | - return (int) sysConfig.values[KEY_LOCK_MEM_SIZE]; | |
284 | + return (size_t) sysConfig.values[KEY_LOCK_MEM_SIZE]; | |
285 | } | |
286 | ||
287 | -int Config::getLockSemCount() | |
288 | +size_t Config::getLockSemCount() | |
289 | { | |
290 | - return (int) sysConfig.values[KEY_LOCK_SEM_COUNT]; | |
291 | + return (size_t) sysConfig.values[KEY_LOCK_SEM_COUNT]; | |
292 | } | |
293 | ||
294 | -int Config::getLockSignal() | |
295 | +size_t Config::getLockSignal() | |
296 | { | |
297 | - return (int) sysConfig.values[KEY_LOCK_SIGNAL]; | |
298 | + return (size_t) sysConfig.values[KEY_LOCK_SIGNAL]; | |
299 | } | |
300 | ||
301 | bool Config::getLockGrantOrder() | |
302 | @@ -337,29 +337,29 @@ | |
303 | return (bool) sysConfig.values[KEY_LOCK_GRANT_ORDER]; | |
304 | } | |
305 | ||
306 | -int Config::getLockHashSlots() | |
307 | +size_t Config::getLockHashSlots() | |
308 | { | |
309 | - return (int) sysConfig.values[KEY_LOCK_HASH_SLOTS]; | |
310 | + return (size_t) sysConfig.values[KEY_LOCK_HASH_SLOTS]; | |
311 | } | |
312 | ||
313 | -int Config::getLockAcquireSpins() | |
314 | +size_t Config::getLockAcquireSpins() | |
315 | { | |
316 | - return (int) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS]; | |
317 | + return (size_t) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS]; | |
318 | } | |
319 | ||
320 | -int Config::getEventMemSize() | |
321 | +size_t Config::getEventMemSize() | |
322 | { | |
323 | - return (int) sysConfig.values[KEY_EVENT_MEM_SIZE]; | |
324 | + return (size_t) sysConfig.values[KEY_EVENT_MEM_SIZE]; | |
325 | } | |
326 | ||
327 | -int Config::getDeadlockTimeout() | |
328 | +size_t Config::getDeadlockTimeout() | |
329 | { | |
330 | - return (int) sysConfig.values[KEY_DEADLOCK_TIMEOUT]; | |
331 | + return (size_t) sysConfig.values[KEY_DEADLOCK_TIMEOUT]; | |
332 | } | |
333 | ||
334 | -int Config::getSolarisStallValue() | |
335 | +size_t Config::getSolarisStallValue() | |
336 | { | |
337 | - return (int) sysConfig.values[KEY_SOLARIS_STALL_VALUE]; | |
338 | + return (size_t) sysConfig.values[KEY_SOLARIS_STALL_VALUE]; | |
339 | } | |
340 | ||
341 | bool Config::getTraceMemoryPools() | |
342 | @@ -367,25 +367,25 @@ | |
343 | return (bool) sysConfig.values[KEY_TRACE_MEMORY_POOLS]; | |
344 | } | |
345 | ||
346 | -int Config::getPrioritySwitchDelay() | |
347 | +size_t Config::getPrioritySwitchDelay() | |
348 | { | |
349 | - int rc = (int) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY]; | |
350 | + size_t rc = (size_t) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY]; | |
351 | if (rc < 1) | |
352 | rc = 1; | |
353 | return rc; | |
354 | } | |
355 | ||
356 | -int Config::getDeadThreadsCollection() | |
357 | +size_t Config::getDeadThreadsCollection() | |
358 | { | |
359 | - int rc = (int) sysConfig.values[KEY_DEAD_THREADS_COLLECTION]; | |
360 | + size_t rc = (size_t) sysConfig.values[KEY_DEAD_THREADS_COLLECTION]; | |
361 | if (rc < 1) | |
362 | rc = 1; | |
363 | return rc; | |
364 | } | |
365 | ||
366 | -int Config::getPriorityBoost() | |
367 | +size_t Config::getPriorityBoost() | |
368 | { | |
369 | - int rc = (int) sysConfig.values[KEY_PRIORITY_BOOST]; | |
370 | + size_t rc = (size_t) sysConfig.values[KEY_PRIORITY_BOOST]; | |
371 | if (rc < 1) | |
372 | rc = 1; | |
373 | if (rc > 1000) | |
374 | @@ -398,9 +398,9 @@ | |
375 | return (const char*) sysConfig.values[KEY_REMOTE_SERVICE_NAME]; | |
376 | } | |
377 | ||
378 | -int Config::getRemoteServicePort() | |
379 | +size_t Config::getRemoteServicePort() | |
380 | { | |
381 | - return (int) sysConfig.values[KEY_REMOTE_SERVICE_PORT]; | |
382 | + return (size_t) sysConfig.values[KEY_REMOTE_SERVICE_PORT]; | |
383 | } | |
384 | ||
385 | const char *Config::getRemotePipeName() | |
386 | @@ -413,19 +413,19 @@ | |
387 | return (const char*) sysConfig.values[KEY_IPC_NAME]; | |
388 | } | |
389 | ||
390 | -int Config::getMaxUnflushedWrites() | |
391 | +size_t Config::getMaxUnflushedWrites() | |
392 | { | |
393 | - return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES]; | |
394 | + return (size_t) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES]; | |
395 | } | |
396 | ||
397 | -int Config::getMaxUnflushedWriteTime() | |
398 | +size_t Config::getMaxUnflushedWriteTime() | |
399 | { | |
400 | - return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME]; | |
401 | + return (size_t) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME]; | |
402 | } | |
403 | ||
404 | -int Config::getProcessPriorityLevel() | |
405 | +size_t Config::getProcessPriorityLevel() | |
406 | { | |
407 | - return (int) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL]; | |
408 | + return (size_t) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL]; | |
409 | } | |
410 | ||
411 | bool Config::getCreateInternalWindow() | |
412 | @@ -438,10 +438,10 @@ | |
413 | return (bool) sysConfig.values[KEY_COMPLETE_BOOLEAN_EVALUATION]; | |
414 | } | |
415 | ||
416 | -int Config::getRemoteAuxPort() | |
417 | +size_t Config::getRemoteAuxPort() | |
418 | { | |
419 | #ifdef SUPERSERVER | |
420 | - return (int) sysConfig.values[KEY_REMOTE_AUX_PORT]; | |
421 | + return (size_t) sysConfig.values[KEY_REMOTE_AUX_PORT]; | |
422 | #else | |
423 | return 0; | |
424 | #endif | |
425 | --- firebird-1.5.2.4731/src/jrd/common.h.orig 2005-05-02 23:26:45.000000000 +0000 | |
426 | +++ firebird-1.5.2.4731/src/jrd/common.h 2005-05-02 23:50:08.873326096 +0000 | |
427 | @@ -864,8 +864,8 @@ | |
428 | ||
429 | #define JRD_BUGCHK 15 /* facility code for bugcheck messages */ | |
430 | #ifndef OFFSET | |
431 | -#define OFFSET(struct,fld) ((int) &((struct) 0)->fld) | |
432 | -#define OFFSETA(struct,fld) ((int) ((struct) 0)->fld) | |
433 | +#define OFFSET(struct,fld) ((size_t) &((struct) 0)->fld) | |
434 | +#define OFFSETA(struct,fld) ((size_t) ((struct) 0)->fld) | |
435 | #endif | |
436 | ||
437 | #ifndef ODS_ALIGNMENT | |
438 | --- firebird-1.5.2.4731/src/jrd/gds.cpp.orig 2005-05-02 23:39:56.000000000 +0000 | |
439 | +++ firebird-1.5.2.4731/src/jrd/gds.cpp 2005-05-02 23:51:13.128557816 +0000 | |
440 | @@ -2356,7 +2356,7 @@ | |
441 | return result; | |
442 | ||
443 | if (stdio_flag) | |
444 | - if (!(result = ib_fdopen((int) result, "w+"))) | |
445 | + if (!(result = ib_fdopen((size_t) result, "w+"))) | |
446 | return (void *)-1; | |
447 | ||
448 | if (expanded_string) |