]>
Commit | Line | Data |
---|---|---|
5472bf2d JB |
1 | --- firebird-1.5.4.4910/src/common/classes/alloc.h.orig 2006-11-05 15:37:52.000000000 +0100 |
2 | +++ firebird-1.5.4.4910/src/common/classes/alloc.h 2007-02-17 23:15:18.116389037 +0100 | |
3 | @@ -241,7 +241,7 @@ | |
4 | ||
5 | void operator delete[](void* mem) throw(); | |
6 | ||
7 | -#ifdef AIX | |
8 | +#if defined(AIX) || __GNUC__ >= 4 | |
9 | #define FB_STATIC_INLINE_NEW inline | |
10 | #else | |
11 | #define FB_STATIC_INLINE_NEW static inline | |
12 | --- firebird-1.5.4.4910/src/burp/burp.cpp.orig 2006-11-05 15:37:49.000000000 +0100 | |
13 | +++ firebird-1.5.4.4910/src/burp/burp.cpp 2007-02-17 23:46:15.538237476 +0100 | |
14 | @@ -1596,7 +1596,7 @@ | |
14c8a3f8 AM |
15 | #ifndef WIN_NT |
16 | signal(SIGPIPE, SIG_IGN); | |
17 | #endif | |
18 | - fil->fil_fd = reinterpret_cast<DESC>(GBAK_STDOUT_DESC); | |
5472bf2d | 19 | + fil->fil_fd = static_cast<DESC>(GBAK_STDOUT_DESC); |
14c8a3f8 AM |
20 | break; |
21 | } | |
22 | else | |
5472bf2d | 23 | @@ -1714,7 +1714,7 @@ |
14c8a3f8 AM |
24 | |
25 | tdgbl->action->act_action = ACT_restore; | |
26 | if (!strcmp(fil->fil_name, "stdin")) { | |
27 | - fil->fil_fd = reinterpret_cast<DESC>(GBAK_STDIN_DESC); | |
5472bf2d | 28 | + fil->fil_fd = static_cast<DESC>(GBAK_STDIN_DESC); |
14c8a3f8 AM |
29 | tdgbl->file_desc = fil->fil_fd; |
30 | tdgbl->gbl_sw_files = fil->fil_next; | |
31 | } | |
a6bbc5c1 AM |
32 | --- Firebird/src/common/config/config.cpp.org 2007-02-27 23:26:11.922623000 +0100 |
33 | +++ Firebird/src/common/config/config.cpp 2007-02-27 23:28:52.958623000 +0100 | |
34 | @@ -261,12 +261,12 @@ | |
35 | ||
36 | int Config::getSortMemBlockSize() | |
37 | { | |
38 | - return (int) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE]; | |
39 | + return (int)(IPTR) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE]; | |
40 | } | |
41 | ||
42 | int Config::getSortMemUpperLimit() | |
43 | { | |
44 | - return (int) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT]; | |
45 | + return (int)(IPTR) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT]; | |
46 | } | |
47 | ||
48 | bool Config::getRemoteFileOpenAbility() | |
49 | @@ -276,12 +276,12 @@ | |
50 | ||
51 | int Config::getGuardianOption() | |
52 | { | |
53 | - return (int) sysConfig.values[KEY_GUARDIAN_OPTION]; | |
54 | + return (int)(IPTR) sysConfig.values[KEY_GUARDIAN_OPTION]; | |
55 | } | |
56 | ||
57 | int Config::getCpuAffinityMask() | |
58 | { | |
59 | - return (int) sysConfig.values[KEY_CPU_AFFINITY_MASK]; | |
60 | + return (int)(IPTR) sysConfig.values[KEY_CPU_AFFINITY_MASK]; | |
61 | } | |
62 | ||
63 | bool Config::getOldParameterOrdering() | |
64 | @@ -291,7 +291,7 @@ | |
65 | ||
66 | int Config::getTcpRemoteBufferSize() | |
67 | { | |
68 | - return (int) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE]; | |
69 | + return (int)(IPTR) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE]; | |
70 | } | |
71 | ||
72 | bool Config::getTcpNoNagle() | |
73 | @@ -301,37 +301,37 @@ | |
74 | ||
75 | int Config::getIpcMapSize() | |
76 | { | |
77 | - return (int) sysConfig.values[KEY_IPC_MAP_SIZE]; | |
78 | + return (int)(IPTR) sysConfig.values[KEY_IPC_MAP_SIZE]; | |
79 | } | |
80 | ||
81 | int Config::getDefaultDbCachePages() | |
82 | { | |
83 | - return (int) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES]; | |
84 | + return (int)(IPTR) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES]; | |
85 | } | |
86 | ||
87 | int Config::getConnectionTimeout() | |
88 | { | |
89 | - return (int) sysConfig.values[KEY_CONNECTION_TIMEOUT]; | |
90 | + return (int)(IPTR) sysConfig.values[KEY_CONNECTION_TIMEOUT]; | |
91 | } | |
92 | ||
93 | int Config::getDummyPacketInterval() | |
94 | { | |
95 | - return (int) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL]; | |
96 | + return (int)(IPTR) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL]; | |
97 | } | |
98 | ||
99 | int Config::getLockMemSize() | |
100 | { | |
101 | - return (int) sysConfig.values[KEY_LOCK_MEM_SIZE]; | |
102 | + return (int)(IPTR) sysConfig.values[KEY_LOCK_MEM_SIZE]; | |
103 | } | |
104 | ||
105 | int Config::getLockSemCount() | |
106 | { | |
107 | - return (int) sysConfig.values[KEY_LOCK_SEM_COUNT]; | |
108 | + return (int)(IPTR) sysConfig.values[KEY_LOCK_SEM_COUNT]; | |
109 | } | |
110 | ||
111 | int Config::getLockSignal() | |
112 | { | |
113 | - return (int) sysConfig.values[KEY_LOCK_SIGNAL]; | |
114 | + return (int)(IPTR) sysConfig.values[KEY_LOCK_SIGNAL]; | |
115 | } | |
116 | ||
117 | bool Config::getLockGrantOrder() | |
118 | @@ -341,27 +341,27 @@ | |
119 | ||
120 | int Config::getLockHashSlots() | |
121 | { | |
122 | - return (int) sysConfig.values[KEY_LOCK_HASH_SLOTS]; | |
123 | + return (int)(IPTR) sysConfig.values[KEY_LOCK_HASH_SLOTS]; | |
124 | } | |
125 | ||
126 | int Config::getLockAcquireSpins() | |
127 | { | |
128 | - return (int) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS]; | |
129 | + return (int)(IPTR) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS]; | |
130 | } | |
131 | ||
132 | int Config::getEventMemSize() | |
133 | { | |
134 | - return (int) sysConfig.values[KEY_EVENT_MEM_SIZE]; | |
135 | + return (int)(IPTR) sysConfig.values[KEY_EVENT_MEM_SIZE]; | |
136 | } | |
137 | ||
138 | int Config::getDeadlockTimeout() | |
139 | { | |
140 | - return (int) sysConfig.values[KEY_DEADLOCK_TIMEOUT]; | |
141 | + return (int)(IPTR) sysConfig.values[KEY_DEADLOCK_TIMEOUT]; | |
142 | } | |
143 | ||
144 | int Config::getSolarisStallValue() | |
145 | { | |
146 | - return (int) sysConfig.values[KEY_SOLARIS_STALL_VALUE]; | |
147 | + return (int)(IPTR) sysConfig.values[KEY_SOLARIS_STALL_VALUE]; | |
148 | } | |
149 | ||
150 | bool Config::getTraceMemoryPools() | |
151 | @@ -371,7 +371,7 @@ | |
152 | ||
153 | int Config::getPrioritySwitchDelay() | |
154 | { | |
155 | - int rc = (int) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY]; | |
156 | + int rc = (int) (IPTR) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY]; | |
157 | if (rc < 1) | |
158 | rc = 1; | |
159 | return rc; | |
160 | @@ -379,7 +379,7 @@ | |
161 | ||
162 | int Config::getDeadThreadsCollection() | |
163 | { | |
164 | - int rc = (int) sysConfig.values[KEY_DEAD_THREADS_COLLECTION]; | |
165 | + int rc = (int) (IPTR) sysConfig.values[KEY_DEAD_THREADS_COLLECTION]; | |
166 | if (rc < 1) | |
167 | rc = 1; | |
168 | return rc; | |
169 | @@ -387,7 +387,7 @@ | |
170 | ||
171 | int Config::getPriorityBoost() | |
172 | { | |
173 | - int rc = (int) sysConfig.values[KEY_PRIORITY_BOOST]; | |
174 | + int rc = (int) (IPTR) sysConfig.values[KEY_PRIORITY_BOOST]; | |
175 | if (rc < 1) | |
176 | rc = 1; | |
177 | if (rc > 1000) | |
178 | @@ -402,7 +402,7 @@ | |
179 | ||
180 | int Config::getRemoteServicePort() | |
181 | { | |
182 | - return (int) sysConfig.values[KEY_REMOTE_SERVICE_PORT]; | |
183 | + return (int)(IPTR) sysConfig.values[KEY_REMOTE_SERVICE_PORT]; | |
184 | } | |
185 | ||
186 | const char *Config::getRemotePipeName() | |
187 | @@ -417,17 +417,17 @@ | |
188 | ||
189 | int Config::getMaxUnflushedWrites() | |
190 | { | |
191 | - return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES]; | |
192 | + return (int)(IPTR) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES]; | |
193 | } | |
194 | ||
195 | int Config::getMaxUnflushedWriteTime() | |
196 | { | |
197 | - return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME]; | |
198 | + return (int)(IPTR) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME]; | |
199 | } | |
200 | ||
201 | int Config::getProcessPriorityLevel() | |
202 | { | |
203 | - return (int) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL]; | |
204 | + return (int)(IPTR) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL]; | |
205 | } | |
206 | ||
207 | bool Config::getCreateInternalWindow() | |
208 | @@ -443,7 +443,7 @@ | |
209 | int Config::getRemoteAuxPort() | |
210 | { | |
211 | #ifdef SUPERSERVER | |
212 | - return (int) sysConfig.values[KEY_REMOTE_AUX_PORT]; | |
213 | + return (int)(IPTR) sysConfig.values[KEY_REMOTE_AUX_PORT]; | |
214 | #else | |
215 | return 0; | |
216 | #endif | |
217 | --- Firebird/src/jrd/common.h.org 2007-02-27 23:37:36.050623000 +0100 | |
218 | +++ Firebird/src/jrd/common.h 2007-02-27 23:38:29.062623000 +0100 | |
219 | @@ -874,8 +874,8 @@ | |
220 | ||
221 | #define JRD_BUGCHK 15 /* facility code for bugcheck messages */ | |
222 | #ifndef OFFSET | |
223 | -#define OFFSET(struct,fld) ((int) &((struct) 0)->fld) | |
224 | -#define OFFSETA(struct,fld) ((int) ((struct) 0)->fld) | |
225 | +#define OFFSET(struct,fld) ((int)(IPTR) &((struct) 0)->fld) | |
226 | +#define OFFSETA(struct,fld) ((int)(IPTR) ((struct) 0)->fld) | |
227 | #endif | |
228 | ||
229 | #ifndef ODS_ALIGNMENT | |
230 | --- Firebird/src/jrd/gds.cpp.org 2007-02-27 23:31:23.778623000 +0100 | |
231 | +++ Firebird/src/jrd/gds.cpp 2007-02-27 23:39:16.538623000 +0100 | |
232 | @@ -2287,7 +2287,7 @@ | |
233 | return result; | |
234 | ||
235 | if (stdio_flag) | |
236 | - if (!(result = ib_fdopen((int) result, "w+"))) | |
237 | + if (!(result = ib_fdopen((int)(IPTR) result, "w+"))) | |
238 | return (void *)-1; | |
239 | ||
240 | if (expanded_string) | |
241 | --- Firebird/src/gpre/cme.cpp.org 2007-02-27 23:39:38.878623000 +0100 | |
242 | +++ Firebird/src/gpre/cme.cpp 2007-02-27 23:40:09.686623000 +0100 | |
243 | @@ -251,7 +251,7 @@ | |
244 | // ** Begin date/time/timestamp support * | |
245 | case nod_extract: | |
246 | STUFF(blr_extract); | |
247 | - switch ((KWWORDS) (int) node->nod_arg[0]) | |
248 | + switch ((KWWORDS) (int)(IPTR) node->nod_arg[0]) | |
249 | { | |
250 | case KW_YEAR: | |
251 | STUFF(blr_extract_year); | |
252 | @@ -478,7 +478,7 @@ | |
253 | // ** Begin date/time/timestamp support * | |
254 | case nod_extract: | |
255 | { | |
256 | - KWWORDS kw_word = (KWWORDS) (int) node->nod_arg[0]; | |
257 | + KWWORDS kw_word = (KWWORDS) (int)(IPTR) node->nod_arg[0]; | |
258 | CME_get_dtype(node->nod_arg[1], f); | |
259 | switch (f->fld_dtype) | |
260 | { | |
261 | --- Firebird/src/gpre/c_cxx.cpp.org 2007-02-27 23:40:26.886623000 +0100 | |
262 | +++ Firebird/src/gpre/c_cxx.cpp 2007-02-27 23:41:05.806623000 +0100 | |
263 | @@ -2184,7 +2184,7 @@ | |
264 | ||
265 | args.pat_database = (DBB) init->nod_arg[3]; | |
266 | args.pat_vector1 = status_vector(action); | |
267 | - args.pat_long1 = (int) init->nod_arg[2]; | |
268 | + args.pat_long1 = (int)(IPTR) init->nod_arg[2]; | |
269 | args.pat_value2 = (int) event_list->nod_count; | |
270 | ||
271 | // generate call to dynamically generate event blocks | |
272 | @@ -2255,7 +2255,7 @@ | |
273 | event_init = (GPRE_NOD) event_action->act_object; | |
274 | stack_name = (SYM) event_init->nod_arg[0]; | |
275 | if (!strcmp(event_name->sym_string, stack_name->sym_string)) { | |
276 | - ident = (int) event_init->nod_arg[2]; | |
277 | + ident = (int)(IPTR) event_init->nod_arg[2]; | |
278 | database = (DBB) event_init->nod_arg[3]; | |
279 | } | |
280 | } | |
281 | --- Firebird/src/jrd/sdl.cpp.org 2007-02-27 23:41:38.546623000 +0100 | |
282 | +++ Firebird/src/jrd/sdl.cpp 2007-02-27 23:41:48.982623000 +0100 | |
283 | @@ -701,7 +701,7 @@ | |
284 | } | |
285 | element_desc = array_desc->ads_rpt[value].ads_desc; | |
286 | element_desc.dsc_address = (BLOB_PTR *) arg->sdl_arg_array + | |
287 | - (SLONG) element_desc.dsc_address + | |
288 | + (SLONG)(IPTR) element_desc.dsc_address + | |
289 | (array_desc->ads_element_length * subscript); | |
290 | ||
291 | /* Is this element within the array bounds? */ | |
292 | --- Firebird/src/jrd/blb.cpp.org 2007-02-27 23:45:22.954623000 +0100 | |
293 | +++ Firebird/src/jrd/blb.cpp 2007-02-27 23:45:34.610623000 +0100 | |
294 | @@ -861,7 +861,7 @@ | |
295 | source = (BID) from_desc->dsc_address; | |
296 | destination = (BID) to_desc->dsc_address; | |
297 | id = (USHORT) (IPTR) field->nod_arg[e_fld_id]; | |
298 | - rpb = &request->req_rpb[(int) field->nod_arg[e_fld_stream]]; | |
299 | + rpb = &request->req_rpb[(int) (IPTR) field->nod_arg[e_fld_stream]]; | |
300 | relation = rpb->rpb_relation; | |
301 | record = rpb->rpb_record; | |
302 | ||
303 | --- Firebird/src/jrd/cmp.cpp.org 2007-02-27 23:45:52.962623000 +0100 | |
304 | +++ Firebird/src/jrd/cmp.cpp 2007-02-27 23:46:14.266623000 +0100 | |
305 | @@ -1661,7 +1661,7 @@ | |
306 | return; | |
307 | ||
308 | case nod_extract: | |
309 | - if ((ULONG) node->nod_arg[e_extract_part] == blr_extract_second) { | |
310 | + if ((ULONG) (IPTR) node->nod_arg[e_extract_part] == blr_extract_second) { | |
311 | /* QUADDATE - SECOND returns a float, or scaled! */ | |
312 | desc->dsc_dtype = dtype_long; | |
313 | desc->dsc_length = sizeof(ULONG); | |
314 | @@ -1720,7 +1720,7 @@ | |
315 | ||
316 | message = node->nod_arg[e_arg_message]; | |
317 | format = (FMT) message->nod_arg[e_msg_format]; | |
318 | - *desc = format->fmt_desc[(int) node->nod_arg[e_arg_number]]; | |
319 | + *desc = format->fmt_desc[(int) (IPTR) node->nod_arg[e_arg_number]]; | |
320 | return; | |
321 | } | |
322 | ||
323 | --- Firebird/src/jrd/evl.cpp.org 2007-02-27 23:46:46.350623000 +0100 | |
324 | +++ Firebird/src/jrd/evl.cpp 2007-02-27 23:49:01.206623000 +0100 | |
325 | @@ -248,7 +248,7 @@ | |
326 | arg_number = (int)(IPTR)node->nod_arg[e_arg_number]; | |
327 | desc = &format->fmt_desc[arg_number]; | |
328 | impure->vlu_desc.dsc_address = | |
329 | - (UCHAR *) request + message->nod_impure + (int) desc->dsc_address; | |
330 | + (UCHAR *) request + message->nod_impure + (int) (IPTR) desc->dsc_address; | |
331 | impure->vlu_desc.dsc_dtype = desc->dsc_dtype; | |
332 | impure->vlu_desc.dsc_length = desc->dsc_length; | |
333 | impure->vlu_desc.dsc_scale = desc->dsc_scale; | |
334 | @@ -288,7 +288,7 @@ | |
335 | // may happen. I checked triggers and insert/update statements. | |
336 | // All seem to work fine. | |
337 | record = | |
338 | - request->req_rpb[(int) node->nod_arg[e_fld_stream]].rpb_record; | |
339 | + request->req_rpb[(int) (IPTR) node->nod_arg[e_fld_stream]].rpb_record; | |
340 | EVL_field(0, record, (USHORT) (IPTR) node->nod_arg[e_fld_id], | |
341 | &impure->vlu_desc); | |
342 | if (!impure->vlu_desc.dsc_address) | |
343 | @@ -828,10 +828,10 @@ | |
344 | } | |
345 | message = node->nod_arg[e_arg_message]; | |
346 | format = (FMT) message->nod_arg[e_msg_format]; | |
347 | - desc = &format->fmt_desc[(int) node->nod_arg[e_arg_number]]; | |
348 | + desc = &format->fmt_desc[(int) (IPTR) node->nod_arg[e_arg_number]]; | |
349 | ||
350 | impure->vlu_desc.dsc_address = (UCHAR *) request + | |
351 | - message->nod_impure + (int) desc->dsc_address; | |
352 | + message->nod_impure + (int) (IPTR) desc->dsc_address; | |
353 | impure->vlu_desc.dsc_dtype = desc->dsc_dtype; | |
354 | impure->vlu_desc.dsc_length = desc->dsc_length; | |
355 | impure->vlu_desc.dsc_scale = desc->dsc_scale; | |
356 | @@ -851,7 +851,7 @@ | |
357 | case nod_field: | |
358 | { | |
359 | REC record = | |
360 | - request->req_rpb[(int)node->nod_arg[e_fld_stream]].rpb_record; | |
361 | + request->req_rpb[(int)(IPTR)node->nod_arg[e_fld_stream]].rpb_record; | |
362 | /* In order to "map a null to a default" value (in EVL_field()), | |
363 | * the relation block is referenced. | |
364 | * Reference: Bug 10116, 10424 | |
365 | @@ -997,7 +997,7 @@ | |
366 | ULONG extract_part; | |
367 | ||
368 | impure = (VLU) ((SCHAR *) request + node->nod_impure); | |
369 | - extract_part = (ULONG) node->nod_arg[e_extract_part]; | |
370 | + extract_part = (ULONG) (IPTR) node->nod_arg[e_extract_part]; | |
371 | value = EVL_expr(tdbb, node->nod_arg[e_extract_value]); | |
372 | ||
373 | impure->vlu_desc.dsc_dtype = dtype_short; | |
374 | @@ -1174,7 +1174,7 @@ | |
375 | switch (node->nod_type) { | |
376 | case nod_gen_id: /* return a 32-bit generator value */ | |
377 | impure->vlu_misc.vlu_long = (SLONG) DPM_gen_id(tdbb, | |
378 | - (SLONG) | |
379 | + (SLONG) (IPTR) | |
380 | node->nod_arg | |
381 | [e_gen_id], 0, | |
382 | MOV_get_int64 | |
383 | @@ -1189,7 +1189,7 @@ | |
384 | ||
385 | case nod_gen_id2: | |
386 | impure->vlu_misc.vlu_int64 = DPM_gen_id(tdbb, | |
387 | - (SLONG) | |
388 | + (SLONG) (IPTR) | |
389 | node->nod_arg[e_gen_id], | |
390 | 0, | |
391 | MOV_get_int64(values[0], | |
392 | @@ -1383,7 +1383,7 @@ | |
393 | return FALSE; | |
394 | } | |
395 | ||
396 | - desc->dsc_address = record->rec_data + (int) desc->dsc_address; | |
397 | + desc->dsc_address = record->rec_data + (int) (IPTR) desc->dsc_address; | |
398 | ||
399 | if (TEST_NULL(record, id)) { | |
400 | desc->dsc_flags |= DSC_null; | |
401 | @@ -1727,7 +1727,7 @@ | |
402 | field = (*ptr)->nod_arg[e_asgn_to]; | |
403 | id = (USHORT) (IPTR) field->nod_arg[e_fld_id]; | |
404 | record = | |
405 | - request->req_rpb[(int) field->nod_arg[e_fld_stream]].rpb_record; | |
406 | + request->req_rpb[(int) (IPTR) field->nod_arg[e_fld_stream]].rpb_record; | |
407 | impure = (VLUX) ((SCHAR *) request + from->nod_impure); | |
408 | switch (from->nod_type) | |
409 | { | |
410 | @@ -3395,7 +3395,7 @@ | |
411 | ||
412 | request = tdbb->tdbb_request; | |
413 | impure = (VLU) ((SCHAR *) request + node->nod_impure); | |
414 | - rpb = &request->req_rpb[(int) node->nod_arg[0]]; | |
415 | + rpb = &request->req_rpb[(int)(IPTR) node->nod_arg[0]]; | |
416 | relation = rpb->rpb_relation; | |
417 | ||
418 | /* Format dbkey as vector of relation id, record number */ | |
419 | @@ -4487,7 +4487,7 @@ | |
420 | ||
421 | request = tdbb->tdbb_request; | |
422 | impure = (VLU) ((SCHAR *) request + node->nod_impure); | |
423 | - rpb = &request->req_rpb[(int) node->nod_arg[0]]; | |
424 | + rpb = &request->req_rpb[(int)(IPTR) node->nod_arg[0]]; | |
425 | ||
426 | /* If the current transaction has updated the record, the record version | |
427 | * coming in from DSQL will have the original transaction # (or current | |
428 | --- Firebird/src/jrd/exe.cpp.org 2007-02-27 23:49:26.026623000 +0100 | |
429 | +++ Firebird/src/jrd/exe.cpp 2007-02-27 23:50:30.090623000 +0100 | |
430 | @@ -376,7 +376,7 @@ | |
431 | if (to->nod_type == nod_field) | |
432 | { | |
433 | SSHORT id = (USHORT) (IPTR) to->nod_arg[e_fld_id]; | |
434 | - REC record = request->req_rpb[(int) to->nod_arg[e_fld_stream]].rpb_record; | |
435 | + REC record = request->req_rpb[(int)(IPTR) to->nod_arg[e_fld_stream]].rpb_record; | |
436 | if (null) { | |
437 | SET_NULL(record, id); | |
438 | } else { | |
439 | @@ -1049,7 +1049,7 @@ | |
440 | desc = &format->fmt_desc[n]; | |
441 | if (!desc->dsc_address) | |
442 | continue; | |
443 | - p = record->rec_data + (SLONG) desc->dsc_address; | |
444 | + p = record->rec_data + (SLONG)(IPTR) desc->dsc_address; | |
445 | if (TEST_NULL(record, n)) | |
446 | { | |
447 | if (length = desc->dsc_length) | |
448 | @@ -1134,7 +1134,7 @@ | |
449 | ||
450 | request = tdbb->tdbb_request; | |
451 | transaction = request->req_transaction; | |
452 | - rpb = &request->req_rpb[(int) node->nod_arg[e_erase_stream]]; | |
453 | + rpb = &request->req_rpb[(int)(IPTR) node->nod_arg[e_erase_stream]]; | |
454 | relation = rpb->rpb_relation; | |
455 | ||
456 | #ifdef PC_ENGINE | |
457 | @@ -2652,7 +2652,7 @@ | |
458 | DSC *desc; | |
459 | ||
460 | desc = EVL_expr(tdbb, node->nod_arg[e_gen_value]); | |
461 | - (void) DPM_gen_id(tdbb, (SLONG) node->nod_arg[e_gen_id], 1, | |
462 | + (void) DPM_gen_id(tdbb, (SLONG)(IPTR) node->nod_arg[e_gen_id], 1, | |
463 | MOV_get_int64(desc, 0)); | |
464 | request->req_operation = jrd_req::req_return; | |
465 | } | |
466 | @@ -2664,7 +2664,7 @@ | |
467 | DSC *desc; | |
468 | ||
469 | desc = EVL_expr(tdbb, node->nod_arg[e_gen_value]); | |
470 | - (void) DPM_gen_id(tdbb, (SLONG) node->nod_arg[e_gen_id], 1, | |
471 | + (void) DPM_gen_id(tdbb, (SLONG)(IPTR) node->nod_arg[e_gen_id], 1, | |
472 | MOV_get_int64(desc, 0)); | |
473 | request->req_operation = jrd_req::req_return; | |
474 | } | |
475 | --- Firebird/src/jrd/ext.cpp.org 2007-02-27 23:50:53.198623000 +0100 | |
476 | +++ Firebird/src/jrd/ext.cpp 2007-02-27 23:51:19.166623000 +0100 | |
477 | @@ -299,7 +299,7 @@ | |
478 | continue; | |
479 | if ( (literal = (LIT) field->fld_missing_value) ) { | |
480 | desc = *desc_ptr; | |
481 | - desc.dsc_address = record->rec_data + (int) desc.dsc_address; | |
482 | + desc.dsc_address = record->rec_data + (int) (IPTR) desc.dsc_address; | |
483 | if (!MOV_compare(&literal->lit_desc, &desc)) | |
484 | continue; | |
485 | } | |
486 | @@ -512,7 +512,7 @@ | |
487 | desc_ptr->dsc_length && | |
488 | TEST_NULL(record, i)) | |
489 | { | |
490 | - p = record->rec_data + (int) desc_ptr->dsc_address; | |
491 | + p = record->rec_data + (int) (IPTR) desc_ptr->dsc_address; | |
492 | if ( (literal = (LIT) field->fld_missing_value) ) { | |
493 | desc = *desc_ptr; | |
494 | desc.dsc_address = p; | |
495 | --- Firebird/src/jrd/idx.cpp.org 2007-02-27 23:51:42.758623000 +0100 | |
496 | +++ Firebird/src/jrd/idx.cpp 2007-02-27 23:51:52.130623000 +0100 | |
497 | @@ -1058,7 +1058,7 @@ | |
498 | (UCHAR) (IPTR) (*idx->idx_foreign_primaries)[index_number]) continue; | |
499 | partner_relation = | |
500 | MET_relation(tdbb, | |
501 | - (int) (*idx->idx_foreign_relations)[index_number]); | |
502 | + (int) (IPTR) (*idx->idx_foreign_relations)[index_number]); | |
503 | index_id = | |
504 | (USHORT) (IPTR) (*idx->idx_foreign_indexes)[index_number]; | |
505 | if ( (result = | |
506 | --- Firebird/src/jrd/inf.cpp.org 2007-02-27 23:52:13.402623000 +0100 | |
507 | +++ Firebird/src/jrd/inf.cpp 2007-02-27 23:52:25.830623000 +0100 | |
508 | @@ -973,7 +973,7 @@ | |
509 | node = request->req_message; | |
510 | if (item == gds_info_message_number) | |
511 | length = | |
512 | - INF_convert((SLONG) node->nod_arg[e_msg_number], | |
513 | + INF_convert((SLONG)(IPTR) node->nod_arg[e_msg_number], | |
514 | buffer_ptr); | |
515 | else { | |
516 | format = (FMT) node->nod_arg[e_msg_format]; | |
517 | --- Firebird/src/jrd/jrd.cpp.org 2007-02-27 23:52:47.034623000 +0100 | |
518 | +++ Firebird/src/jrd/jrd.cpp 2007-02-27 23:53:44.414623000 +0100 | |
519 | @@ -3877,9 +3877,9 @@ | |
520 | { | |
521 | if ( (node = csb->csb_rpt[i].csb_message) ) | |
522 | { | |
523 | - if ((int) node->nod_arg[e_msg_number] == 0) { | |
524 | + if ((int)(IPTR) node->nod_arg[e_msg_number] == 0) { | |
525 | in_message = node; | |
526 | - } else if ((int) node->nod_arg[e_msg_number] == 1) { | |
527 | + } else if ((int)(IPTR) node->nod_arg[e_msg_number] == 1) { | |
528 | out_message = node; | |
529 | } | |
530 | } | |
531 | --- Firebird/src/jrd/jrd.h.org 2007-02-27 23:54:08.442623000 +0100 | |
532 | +++ Firebird/src/jrd/jrd.h 2007-02-27 23:54:30.994623000 +0100 | |
533 | @@ -1050,8 +1050,10 @@ | |
534 | ||
535 | #if !defined(REQUESTER) | |
536 | ||
537 | +extern "C" { | |
538 | extern int debug; | |
539 | extern IHNDL internal_db_handles; | |
540 | +} | |
541 | ||
542 | #endif /* REQUESTER */ | |
543 | ||
544 | --- Firebird/src/jrd/jrn.cpp.org 2007-02-27 23:55:28.466623000 +0100 | |
545 | +++ Firebird/src/jrd/jrn.cpp 2007-02-27 23:57:02.762623000 +0100 | |
546 | @@ -836,7 +836,7 @@ | |
547 | for (loop = 0; loop < 20; loop++) { | |
548 | for (;;) { | |
549 | journal->jrn_channel = (int *) socket(AF_INET, SOCK_STREAM, 0); | |
550 | - if ((int) journal->jrn_channel != -1) | |
551 | + if ((int) (IPTR)journal->jrn_channel != -1) | |
552 | break; | |
553 | if (!SYSCALL_INTERRUPTED(errno)) { | |
554 | error(status_vector, journal, errno, "socket"); | |
555 | @@ -859,18 +859,18 @@ | |
556 | return ret_val; | |
557 | } | |
558 | ||
559 | - if (!connect((int) journal->jrn_channel, (sockaddr*)&address, sizeof(address))) | |
560 | + if (!connect((int)(IPTR) journal->jrn_channel, (sockaddr*)&address, sizeof(address))) | |
561 | break; | |
562 | ||
563 | sleep(3); | |
564 | ||
565 | if (loop < 16) { | |
566 | - close((int) journal->jrn_channel); | |
567 | + close((int)(IPTR) journal->jrn_channel); | |
568 | continue; | |
569 | } | |
570 | if (!SYSCALL_INTERRUPTED(errno)) { | |
571 | if (retry) { | |
572 | - close((int) journal->jrn_channel); | |
573 | + close((int)(IPTR) journal->jrn_channel); | |
574 | gds__free(journal); | |
575 | *ret_jrn = (JRN) NULL; | |
576 | return FB_SUCCESS; | |
577 | @@ -879,7 +879,7 @@ | |
578 | gds__free(journal); | |
579 | return FB_FAILURE; | |
580 | } | |
581 | - close((int) journal->jrn_channel); | |
582 | + close((int)(IPTR) journal->jrn_channel); | |
583 | } | |
584 | #endif | |
585 | ||
586 | @@ -939,7 +939,7 @@ | |
587 | if (retry) | |
588 | { | |
589 | #ifdef BSD_SOCKETS | |
590 | - close((int) journal->jrn_channel); | |
591 | + close((int)(IPTR) journal->jrn_channel); | |
592 | #endif | |
593 | ||
594 | #ifdef WIN_NT | |
595 | @@ -1056,7 +1056,7 @@ | |
596 | with us, so keep trying until successful. */ | |
597 | ||
598 | do { | |
599 | - l = recv((int) journal->jrn_channel, (char *) reply, sizeof(struct jrnr), 0); | |
600 | + l = recv((int)(IPTR) journal->jrn_channel, (char *) reply, sizeof(struct jrnr), 0); | |
601 | } while (l < 0 && SYSCALL_INTERRUPTED(errno)); | |
602 | ||
603 | if (l < 0) { | |
604 | @@ -1095,7 +1095,7 @@ | |
605 | **************************************/ | |
606 | ||
607 | #ifdef BSD_SOCKETS | |
608 | - if (close((int) journal->jrn_channel) < 0) { | |
609 | + if (close((int)(IPTR) journal->jrn_channel) < 0) { | |
610 | error(status_vector, journal, errno, "close"); | |
611 | return FB_FAILURE; | |
612 | } | |
613 | @@ -1166,7 +1166,7 @@ | |
614 | with us, so keep trying until successful. */ | |
615 | ||
616 | do { | |
617 | - l = send((int) journal->jrn_channel, (char *) buffer, (int) length, 0); | |
618 | + l = send((int)(IPTR) journal->jrn_channel, (char *) buffer, (int) length, 0); | |
619 | } while (l < 0 && SYSCALL_INTERRUPTED(errno)); | |
620 | ||
621 | if (l < 0) { | |
622 | --- Firebird/src/jrd/nav.cpp.org 2007-02-27 23:57:33.730623000 +0100 | |
623 | +++ Firebird/src/jrd/nav.cpp 2007-02-27 23:59:12.262623000 +0100 | |
624 | @@ -487,7 +487,7 @@ | |
625 | ||
626 | init_fetch(impure); | |
627 | idx = | |
628 | - (IDX *) ((SCHAR *) impure + (SLONG) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
629 | + (IDX *) ((SCHAR *) impure + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
630 | ||
631 | /* The bitmap is only valid when we are continuing on in one | |
632 | direction. It is of no help when we change direction, | |
633 | @@ -521,12 +521,12 @@ | |
634 | #ifdef SCROLLABLE_CURSORS | |
635 | MOVE_FAST( | |
636 | (impure->irsb_nav_data + | |
637 | - (2 * (SLONG) rsb->rsb_arg[RSB_NAV_key_length])), | |
638 | + (2 * (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_key_length])), | |
639 | upper.key_data, upper.key_length); | |
640 | #else | |
641 | MOVE_FAST( | |
642 | (impure->irsb_nav_data + | |
643 | - (SLONG) rsb->rsb_arg[RSB_NAV_key_length]), upper.key_data, | |
644 | + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_key_length]), upper.key_data, | |
645 | upper.key_length); | |
646 | #endif | |
647 | } | |
648 | @@ -534,7 +534,7 @@ | |
649 | lower.key_length = impure->irsb_nav_lower_length; | |
650 | MOVE_FAST( | |
651 | (impure->irsb_nav_data + | |
652 | - (SLONG) rsb->rsb_arg[RSB_NAV_key_length]), lower.key_data, | |
653 | + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_key_length]), lower.key_data, | |
654 | lower.key_length); | |
655 | } | |
656 | ||
657 | @@ -1404,7 +1404,7 @@ | |
658 | tdbb = GET_THREAD_DATA; | |
659 | ||
660 | idx = | |
661 | - (IDX *) ((SCHAR *) impure + (SLONG) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
662 | + (IDX *) ((SCHAR *) impure + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
663 | page = (BTR) CCH_FETCH(tdbb, window, LCK_read, pag_index); | |
664 | ||
665 | /* the outer loop goes through all the sibling pages | |
666 | @@ -1619,7 +1619,7 @@ | |
667 | tdbb = GET_THREAD_DATA; | |
668 | request = tdbb->tdbb_request; | |
669 | idx = | |
670 | - (IDX *) ((SCHAR *) impure + (SLONG) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
671 | + (IDX *) ((SCHAR *) impure + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
672 | ||
673 | BOOLEAN result; | |
674 | ||
675 | @@ -1656,7 +1656,7 @@ | |
676 | rpb->rpb_record, | |
677 | reinterpret_cast < | |
678 | struct idx *>((SCHAR *) impure + | |
679 | - (SLONG) rsb->rsb_arg[RSB_NAV_idx_offset]), | |
680 | + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_idx_offset]), | |
681 | &value, | |
682 | 0); | |
683 | if (compare_keys(idx, key->key_data, key->key_length, &value, FALSE)) { | |
684 | @@ -1757,7 +1757,7 @@ | |
685 | retrieval_node = (JRD_NOD) rsb->rsb_arg[RSB_NAV_index]; | |
686 | retrieval = (IRB) retrieval_node->nod_arg[e_idx_retrieval]; | |
687 | idx = | |
688 | - (IDX *) ((SCHAR *) impure + (SLONG) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
689 | + (IDX *) ((SCHAR *) impure + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_idx_offset]); | |
690 | page = | |
691 | BTR_find_page(tdbb, retrieval, window, idx, &lower, &upper, | |
692 | (direction == RSE_get_backward)); | |
693 | @@ -1770,7 +1770,7 @@ | |
694 | impure->irsb_nav_lower_length = lower.key_length; | |
695 | MOVE_FAST(lower.key_data, | |
696 | (impure->irsb_nav_data + | |
697 | - (SLONG) rsb->rsb_arg[RSB_NAV_key_length]), | |
698 | + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_key_length]), | |
699 | lower.key_length); | |
700 | } | |
701 | ||
702 | @@ -1778,7 +1778,7 @@ | |
703 | impure->irsb_nav_upper_length = upper.key_length; | |
704 | MOVE_FAST(upper.key_data, | |
705 | (impure->irsb_nav_data + | |
706 | - (2 * (SLONG) rsb->rsb_arg[RSB_NAV_key_length])), | |
707 | + (2 * (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_key_length])), | |
708 | upper.key_length); | |
709 | } | |
710 | ||
711 | @@ -1802,7 +1802,7 @@ | |
712 | impure->irsb_nav_upper_length = upper.key_length; | |
713 | MOVE_FAST(upper.key_data, | |
714 | (impure->irsb_nav_data + | |
715 | - (SLONG) rsb->rsb_arg[RSB_NAV_key_length]), | |
716 | + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_key_length]), | |
717 | upper.key_length); | |
718 | } | |
719 | if (retrieval->irb_lower_count) | |
720 | @@ -1813,7 +1813,7 @@ | |
721 | impure->irsb_nav_lower_length = lower.key_length; | |
722 | MOVE_FAST(lower.key_data, | |
723 | (impure->irsb_nav_data + | |
724 | - (SLONG) rsb->rsb_arg[RSB_NAV_key_length]), | |
725 | + (SLONG)(IPTR) rsb->rsb_arg[RSB_NAV_key_length]), | |
726 | lower.key_length); | |
727 | } | |
728 | if (retrieval->irb_upper_count) | |
729 | --- Firebird/src/jrd/rse.cpp.org 2007-02-28 00:00:03.858623000 +0100 | |
730 | +++ Firebird/src/jrd/rse.cpp 2007-02-28 00:01:21.818623000 +0100 | |
731 | @@ -2151,7 +2151,7 @@ | |
732 | } | |
733 | ||
734 | desc = msg_format->fmt_desc[msg_format->fmt_count - 1]; | |
735 | - desc.dsc_address = (UCHAR *) (om + (int) desc.dsc_address); | |
736 | + desc.dsc_address = (UCHAR *) (om + (int)(IPTR) desc.dsc_address); | |
737 | eos_desc.dsc_dtype = dtype_short; | |
738 | eos_desc.dsc_scale = 0; | |
739 | eos_desc.dsc_length = sizeof(SSHORT); | |
740 | @@ -2959,7 +2959,7 @@ | |
741 | for (item = map->smb_rpt; item < end_item; item++) { | |
742 | flag = *(data + item->smb_flag_offset); | |
743 | from = item->smb_desc; | |
744 | - from.dsc_address = data + (ULONG) from.dsc_address; | |
745 | + from.dsc_address = data + (ULONG)(IPTR) from.dsc_address; | |
746 | if ((node = item->smb_node) && node->nod_type != nod_field) | |
747 | continue; | |
748 | ||
749 | @@ -3211,7 +3211,7 @@ | |
750 | end_item = map->smb_rpt + map->smb_count; | |
751 | for (item = map->smb_rpt; item < end_item; item++) { | |
752 | to = item->smb_desc; | |
753 | - to.dsc_address = data + (ULONG) to.dsc_address; | |
754 | + to.dsc_address = data + (ULONG)(IPTR) to.dsc_address; | |
755 | flag = FALSE; | |
756 | if (item->smb_node) { | |
757 | from = EVL_expr(tdbb, item->smb_node); | |
758 | @@ -3301,12 +3301,12 @@ | |
759 | desc2.dsc_flags = 0; | |
760 | desc2.dsc_address = (UCHAR *) & indicator; | |
761 | desc1 = *flag_desc; | |
762 | - desc1.dsc_address = msg + (int) flag_desc->dsc_address; | |
763 | + desc1.dsc_address = msg + (int)(IPTR) flag_desc->dsc_address; | |
764 | MOV_move(&desc1, &desc2); | |
765 | if (indicator) { | |
766 | SET_NULL(record, to_id); | |
767 | l = to_desc->dsc_length; | |
768 | - p = record->rec_data + (int) to_desc->dsc_address; | |
769 | + p = record->rec_data + (int)(IPTR) to_desc->dsc_address; | |
770 | switch (to_desc->dsc_dtype) { | |
771 | case dtype_text: | |
772 | /* YYY - not necessarily the right thing to do */ | |
773 | @@ -3336,9 +3336,9 @@ | |
774 | else { | |
775 | CLEAR_NULL(record, to_id); | |
776 | desc1 = *from_desc; | |
777 | - desc1.dsc_address = msg + (int) desc1.dsc_address; | |
778 | + desc1.dsc_address = msg + (int)(IPTR) desc1.dsc_address; | |
779 | desc2 = *to_desc; | |
780 | - desc2.dsc_address = record->rec_data + (int) desc2.dsc_address; | |
781 | + desc2.dsc_address = record->rec_data + (int)(IPTR) desc2.dsc_address; | |
782 | if (!DSC_EQUIV((&desc1), (&desc2))) | |
783 | MOV_move(&desc1, &desc2); | |
784 | ||
785 | @@ -3817,7 +3817,7 @@ | |
786 | if (!sfb_->sfb_file_name) { | |
787 | TEXT file_name[128]; | |
788 | ||
789 | - sfb_->sfb_file = (int) gds__temp_file(FALSE, SCRATCH, file_name); | |
790 | + sfb_->sfb_file = (int)(IPTR) gds__temp_file(FALSE, SCRATCH, file_name); | |
791 | if (sfb_->sfb_file == -1) | |
792 | SORT_error(tdbb->tdbb_status_vector, sfb_, "open", isc_io_error, | |
793 | errno); | |
794 | --- Firebird/src/jrd/sort.cpp.org 2007-02-28 00:01:47.478623000 +0100 | |
795 | +++ Firebird/src/jrd/sort.cpp 2007-02-28 00:02:06.390623000 +0100 | |
796 | @@ -1787,7 +1787,7 @@ | |
797 | /* Create a scratch file */ | |
798 | ||
799 | sfb->sfb_file = | |
800 | - (int) gds__temp_file(FALSE, SCRATCH, file_name, | |
801 | + (int)(IPTR) gds__temp_file(FALSE, SCRATCH, file_name, | |
802 | sfb->sfb_dls->dls_directory, TRUE); | |
803 | ||
804 | /* allocate the file name even if the file is not open, | |
805 | --- Firebird/src/dsql/ddl.cpp.org 2007-02-28 00:02:23.650623000 +0100 | |
806 | +++ Firebird/src/dsql/ddl.cpp 2007-02-28 00:04:37.514623000 +0100 | |
807 | @@ -1126,12 +1126,12 @@ | |
808 | if (constant) | |
809 | { | |
810 | request->append_number(gds_dyn_trg_sequence, | |
811 | - (SSHORT)(SLONG) (constant ? constant->nod_arg[0] : 0)); | |
812 | + (SSHORT)(SLONG)(IPTR) (constant ? constant->nod_arg[0] : 0)); | |
813 | } | |
814 | ||
815 | if ((constant = node->nod_arg[e_cnstr_type]) != NULL) | |
816 | { | |
817 | - const SSHORT type = (SSHORT)(SLONG) constant->nod_arg[0]; | |
818 | + const SSHORT type = (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]; | |
819 | request->append_number(gds_dyn_trg_type, type); | |
820 | } | |
821 | ||
822 | @@ -1270,7 +1270,7 @@ | |
823 | ||
824 | switch (element->nod_type) { | |
825 | case nod_file_length: | |
826 | - start = (SLONG) (element->nod_arg[0]) + 1; | |
827 | + start = (SLONG)(IPTR) (element->nod_arg[0]) + 1; | |
828 | break; | |
829 | ||
830 | default: | |
831 | @@ -1336,25 +1336,25 @@ | |
832 | ||
833 | case nod_group_commit_wait: | |
834 | request->append_uchar(gds_dyn_log_group_commit_wait); | |
835 | - temp_long = (SLONG) (element->nod_arg[0]); | |
836 | + temp_long = (SLONG)(IPTR) (element->nod_arg[0]); | |
837 | request->append_ulong_with_length(temp_long); | |
838 | break; | |
839 | ||
840 | case nod_check_point_len: | |
841 | request->append_uchar(gds_dyn_log_check_point_length); | |
842 | - temp_long = (SLONG) (element->nod_arg[0]); | |
843 | + temp_long = (SLONG)(IPTR) (element->nod_arg[0]); | |
844 | request->append_ulong_with_length(temp_long); | |
845 | break; | |
846 | ||
847 | case nod_num_log_buffers: | |
848 | request->append_uchar(gds_dyn_log_num_of_buffers); | |
849 | - temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); | |
850 | + temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]); | |
851 | request->append_ushort_with_length(temp_short); | |
852 | break; | |
853 | ||
854 | case nod_log_buffer_size: | |
855 | request->append_uchar(gds_dyn_log_buffer_size); | |
856 | - temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); | |
857 | + temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]); | |
858 | request->append_ushort_with_length(temp_short); | |
859 | break; | |
860 | ||
861 | @@ -1637,11 +1637,11 @@ | |
862 | request->append_number(gds_dyn_def_dimension, position); | |
863 | DSQL_NOD element = *ptr++; | |
864 | request->append_uchar(gds_dyn_dim_lower); | |
865 | - SLONG lrange = (SLONG) (element->nod_arg[0]); | |
866 | + SLONG lrange = (SLONG)(IPTR) (element->nod_arg[0]); | |
867 | request->append_ulong_with_length(lrange); | |
868 | element = *ptr; | |
869 | request->append_uchar(gds_dyn_dim_upper); | |
870 | - SLONG hrange = (SLONG) (element->nod_arg[0]); | |
871 | + SLONG hrange = (SLONG)(IPTR) (element->nod_arg[0]); | |
872 | request->append_ulong_with_length(hrange); | |
873 | request->append_uchar(gds_dyn_end); | |
874 | if (lrange >= hrange) | |
875 | @@ -2062,9 +2062,9 @@ | |
876 | request->append_cstring(gds_dyn_def_filter, | |
877 | ((STR) (ptr[e_filter_name]))->str_data); | |
878 | request->append_number(gds_dyn_filter_in_subtype, | |
879 | - (SSHORT)(SLONG) ((ptr[e_filter_in_type])->nod_arg[0])); | |
880 | + (SSHORT)(SLONG)(IPTR) ((ptr[e_filter_in_type])->nod_arg[0])); | |
881 | request->append_number(gds_dyn_filter_out_subtype, | |
882 | - (SSHORT)(SLONG) ((ptr[e_filter_out_type])->nod_arg[0])); | |
883 | + (SSHORT)(SLONG)(IPTR) ((ptr[e_filter_out_type])->nod_arg[0])); | |
884 | request->append_cstring(gds_dyn_func_entry_point, | |
885 | ((STR) (ptr[e_filter_entry_pt]))->str_data); | |
886 | request->append_cstring(gds_dyn_func_module_name, | |
887 | @@ -2670,16 +2670,16 @@ | |
888 | gds_arg_gds, gds_dsql_shadow_number_err, 0); | |
889 | } | |
890 | ||
891 | - request->append_number(gds_dyn_def_shadow, (SSHORT)(SLONG) (ptr[e_shadow_number])); | |
892 | + request->append_number(gds_dyn_def_shadow, (SSHORT)(SLONG)(IPTR) (ptr[e_shadow_number])); | |
893 | request->append_cstring(gds_dyn_def_file, ((STR) (ptr[e_shadow_name]))->str_data); | |
894 | request->append_number(gds_dyn_shadow_man_auto, | |
895 | - (SSHORT)(SLONG) ((ptr[e_shadow_man_auto])->nod_arg[0])); | |
896 | + (SSHORT)(SLONG)(IPTR) ((ptr[e_shadow_man_auto])->nod_arg[0])); | |
897 | request->append_number(gds_dyn_shadow_conditional, | |
898 | - (SSHORT)(SLONG) ((ptr[e_shadow_conditional])->nod_arg[0])); | |
899 | + (SSHORT)(SLONG)(IPTR) ((ptr[e_shadow_conditional])->nod_arg[0])); | |
900 | ||
901 | request->append_file_start(0); | |
902 | ||
903 | - SLONG length = (SLONG) ptr[e_shadow_length]; | |
904 | + SLONG length = (SLONG)(IPTR) ptr[e_shadow_length]; | |
905 | request->append_file_length(length); | |
906 | ||
907 | request->append_uchar(gds_dyn_end); | |
908 | @@ -2806,15 +2806,15 @@ | |
909 | ||
910 | if (constant = node->nod_arg[e_trg_active]) | |
911 | request->append_number(gds_dyn_trg_inactive, | |
912 | - (SSHORT)(SLONG) constant->nod_arg[0]); | |
913 | + (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]); | |
914 | ||
915 | if (constant = node->nod_arg[e_trg_position]) | |
916 | request->append_number(gds_dyn_trg_sequence, | |
917 | - (SSHORT)(SLONG) constant->nod_arg[0]); | |
918 | + (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]); | |
919 | ||
920 | if (constant = node->nod_arg[e_trg_type]) { | |
921 | - request->append_number(gds_dyn_trg_type, (SSHORT)(SLONG) constant->nod_arg[0]); | |
922 | - trig_type = (USHORT)(ULONG) constant->nod_arg[0]; | |
923 | + request->append_number(gds_dyn_trg_type, (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]); | |
924 | + trig_type = (USHORT)(ULONG)(IPTR) constant->nod_arg[0]; | |
925 | } | |
926 | else { | |
927 | assert(node->nod_type == nod_mod_trigger); | |
928 | @@ -2893,7 +2893,7 @@ | |
929 | for (DSQL_NOD* ptr = temp->nod_arg; ptr < end; ++ptr) | |
930 | { | |
931 | DSQL_NOD message = *ptr; | |
932 | - SSHORT number = (SSHORT)(SLONG) message->nod_arg[e_msg_number]; | |
933 | + SSHORT number = (SSHORT)(SLONG)(IPTR) message->nod_arg[e_msg_number]; | |
934 | if (message->nod_type == nod_del_trigger_msg) | |
935 | { | |
936 | request->append_number(gds_dyn_delete_trigger_msg, number); | |
937 | @@ -2954,7 +2954,7 @@ | |
938 | // CVC: This is case of "returns <type> [by value|reference]" | |
939 | /* Some data types can not be returned as value */ | |
940 | ||
941 | - if (((int)(SLONG) (ret_val_ptr[1]->nod_arg[0]) == FUN_value) && | |
942 | + if (((int)(SLONG)(IPTR) (ret_val_ptr[1]->nod_arg[0]) == FUN_value) && | |
943 | (field->fld_dtype == dtype_text || | |
944 | field->fld_dtype == dtype_varying || | |
945 | field->fld_dtype == dtype_cstring || | |
946 | @@ -2998,7 +2998,7 @@ | |
947 | // CVC: This is case of "returns parameter <N>" | |
948 | ||
949 | ||
950 | - position = (SSHORT)(SLONG) (ret_val_ptr[1]->nod_arg[0]); | |
951 | + position = (SSHORT)(SLONG)(IPTR) (ret_val_ptr[1]->nod_arg[0]); | |
952 | /* Function modifies an argument whose value is the function return value */ | |
953 | ||
954 | if (!arguments || position > arguments->nod_count || position < 1) { | |
955 | @@ -3024,10 +3024,10 @@ | |
956 | if (field->fld_dtype == dtype_blob) | |
957 | { | |
958 | /* CVC: I need to test returning blobs by descriptor before allowing the change there. For now, I ignore the return type specification. */ | |
959 | - BOOLEAN free_it = ((SSHORT)(SLONG) ret_val_ptr[1]->nod_arg[0] < 0); | |
960 | + BOOLEAN free_it = ((SSHORT)(SLONG)(IPTR) ret_val_ptr[1]->nod_arg[0] < 0); | |
961 | request->append_number(gds_dyn_def_function_arg, blob_position); | |
962 | request->append_number(gds_dyn_func_mechanism, | |
963 | - (SSHORT)(SLONG) ((free_it ? -1 : 1) * FUN_blob_struct)); | |
964 | + (SSHORT)(SLONG)(IPTR) ((free_it ? -1 : 1) * FUN_blob_struct)); | |
965 | /* if we have the free_it set then the blob has | |
966 | to be freed on return */ | |
967 | } | |
968 | @@ -3035,7 +3035,7 @@ | |
969 | { | |
970 | request->append_number(gds_dyn_def_function_arg, (SSHORT) 0); | |
971 | request->append_number(gds_dyn_func_mechanism, | |
972 | - (SSHORT)(SLONG) (ret_val_ptr[1]->nod_arg[0])); | |
973 | + (SSHORT)(SLONG)(IPTR) (ret_val_ptr[1]->nod_arg[0])); | |
974 | } | |
975 | ||
976 | request->append_cstring(gds_dyn_function_name, udf_name); | |
977 | @@ -3070,7 +3070,7 @@ | |
978 | request->append_number(gds_dyn_def_function_arg, (SSHORT) position); | |
979 | ||
980 | if (param_node [e_udf_param_type]) { | |
981 | - SSHORT arg_mechanism = (SSHORT)(SLONG) (param_node [e_udf_param_type]->nod_arg [0]); | |
982 | + SSHORT arg_mechanism = (SSHORT)(SLONG)(IPTR) (param_node [e_udf_param_type]->nod_arg [0]); | |
983 | request->append_number(gds_dyn_func_mechanism, arg_mechanism); | |
984 | } | |
985 | else if (field->fld_dtype == dtype_blob) { | |
986 | @@ -3677,13 +3677,13 @@ | |
987 | if (constant) | |
988 | { | |
989 | request->append_number(gds_dyn_trg_sequence, | |
990 | - (SSHORT)(SLONG) (constant ? constant->nod_arg[0] : 0)); | |
991 | + (SSHORT)(SLONG)(IPTR) (constant ? constant->nod_arg[0] : 0)); | |
992 | } | |
993 | ||
994 | constant = node->nod_arg[e_cnstr_type]; | |
995 | if (constant) | |
996 | { | |
997 | - trig_type = (USHORT)(ULONG) constant->nod_arg[0]; | |
998 | + trig_type = (USHORT)(ULONG)(IPTR) constant->nod_arg[0]; | |
999 | request->append_number(gds_dyn_trg_type, trig_type); | |
1000 | } | |
1001 | else | |
1002 | @@ -4173,7 +4173,7 @@ | |
1003 | ||
1004 | case nod_del_shadow: | |
1005 | request->append_number(gds_dyn_delete_shadow, | |
1006 | - (SSHORT)(SLONG) (node->nod_arg[0])); | |
1007 | + (SSHORT)(SLONG)(IPTR) (node->nod_arg[0])); | |
1008 | request->append_uchar(gds_dyn_end); | |
1009 | break; | |
1010 | ||
1011 | @@ -4611,25 +4611,25 @@ | |
1012 | ||
1013 | case nod_group_commit_wait: | |
1014 | request->append_uchar(gds_dyn_log_group_commit_wait); | |
1015 | - temp_long = (SLONG) (element->nod_arg[0]); | |
1016 | + temp_long = (SLONG)(IPTR) (element->nod_arg[0]); | |
1017 | request->append_ulong_with_length(temp_long); | |
1018 | break; | |
1019 | ||
1020 | case nod_check_point_len: | |
1021 | request->append_uchar(gds_dyn_log_check_point_length); | |
1022 | - temp_long = (SLONG) (element->nod_arg[0]); | |
1023 | + temp_long = (SLONG)(IPTR) (element->nod_arg[0]); | |
1024 | request->append_ulong_with_length(temp_long); | |
1025 | break; | |
1026 | ||
1027 | case nod_num_log_buffers: | |
1028 | request->append_uchar(gds_dyn_log_num_of_buffers); | |
1029 | - temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); | |
1030 | + temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]); | |
1031 | request->append_ushort_with_length(temp_short); | |
1032 | break; | |
1033 | ||
1034 | case nod_log_buffer_size: | |
1035 | request->append_uchar(gds_dyn_log_buffer_size); | |
1036 | - temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); | |
1037 | + temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]); | |
1038 | request->append_ushort_with_length(temp_short); | |
1039 | break; | |
1040 | case nod_drop_log: | |
1041 | @@ -5095,7 +5095,7 @@ | |
1042 | const_node = element->nod_arg[e_mod_fld_pos_new_position]; | |
1043 | ||
1044 | /* CVC: Since now the parser accepts pos=1..N, let's subtract one here. */ | |
1045 | - constant = (SSHORT)(SLONG) const_node->nod_arg [0] - 1; | |
1046 | + constant = (SSHORT)(SLONG)(IPTR) const_node->nod_arg [0] - 1; | |
1047 | ||
1048 | request->append_cstring(gds_dyn_rel_name, | |
1049 | relation_name->str_data); | |
1050 | --- Firebird/src/dsql/dsql.cpp.org 2007-02-28 00:04:57.930623000 +0100 | |
1051 | +++ Firebird/src/dsql/dsql.cpp 2007-02-28 00:06:17.478623000 +0100 | |
1052 | @@ -1136,8 +1136,8 @@ | |
1053 | parameter = request->req_blob->blb_segment; | |
1054 | PAR null = parameter->par_null; | |
1055 | USHORT* ret_length = | |
1056 | - (USHORT *) (dsql_msg + (SLONG) null->par_user_desc.dsc_address); | |
1057 | - UCHAR* buffer = dsql_msg + (SLONG) parameter->par_user_desc.dsc_address; | |
1058 | + (USHORT *) (dsql_msg + (SLONG)(IPTR) null->par_user_desc.dsc_address); | |
1059 | + UCHAR* buffer = dsql_msg + (SLONG)(IPTR) parameter->par_user_desc.dsc_address; | |
1060 | THREAD_EXIT; | |
1061 | s = isc_get_segment(tdsql->tsql_status, | |
1062 | GDS_REF(request->req_handle), | |
1063 | @@ -1314,7 +1314,7 @@ | |
1064 | parameter = request->req_blob->blb_segment; | |
1065 | buffer = | |
1066 | reinterpret_cast<SCHAR*>( | |
1067 | - dsql_msg + (SLONG) parameter->par_user_desc.dsc_address); | |
1068 | + dsql_msg + (SLONG)(IPTR) parameter->par_user_desc.dsc_address); | |
1069 | THREAD_EXIT; | |
1070 | s = isc_put_segment(tdsql->tsql_status, | |
1071 | GDS_REF(request->req_handle), | |
1072 | @@ -3210,7 +3210,7 @@ | |
1073 | PAR parameter, null; | |
1074 | ||
1075 | if (node->nod_type == nod_constant) | |
1076 | - return (SSHORT)(SLONG) node->nod_arg[0]; | |
1077 | + return (SSHORT)(SLONG)(IPTR) node->nod_arg[0]; | |
1078 | ||
1079 | parameter = (PAR) node->nod_arg[e_par_parameter]; | |
1080 | if (null = parameter->par_null) | |
1081 | @@ -3976,7 +3976,7 @@ | |
1082 | /* Make sure the message given to us is long enough */ | |
1083 | ||
1084 | DSC desc = parameter->par_user_desc; | |
1085 | - USHORT length = (SLONG) desc.dsc_address + desc.dsc_length; | |
1086 | + USHORT length = (SLONG)(IPTR) desc.dsc_address + desc.dsc_length; | |
1087 | if (length > msg_length) | |
1088 | break; | |
1089 | if (!desc.dsc_dtype) | |
1090 | @@ -3985,7 +3985,7 @@ | |
1091 | flag = NULL; | |
1092 | if ((null = parameter->par_null) != NULL) | |
1093 | { | |
1094 | - USHORT null_offset = (USHORT)(ULONG) (null->par_user_desc.dsc_address); | |
1095 | + USHORT null_offset = (USHORT)(ULONG)(IPTR) (null->par_user_desc.dsc_address); | |
1096 | length = null_offset + sizeof(SSHORT); | |
1097 | if (length > msg_length) | |
1098 | break; | |
1099 | @@ -4000,7 +4000,7 @@ | |
1100 | } | |
1101 | } | |
1102 | ||
1103 | - desc.dsc_address = dsql_msg + (SLONG) desc.dsc_address; | |
1104 | + desc.dsc_address = dsql_msg + (SLONG)(IPTR) desc.dsc_address; | |
1105 | if (!request) | |
1106 | MOVD_move(¶meter->par_desc, &desc); | |
1107 | else if (!flag || *flag >= 0) | |
1108 | --- Firebird/src/dsql/gen.cpp.org 2007-02-28 00:06:39.246623000 +0100 | |
1109 | +++ Firebird/src/dsql/gen.cpp 2007-02-28 00:08:32.954623000 +0100 | |
1110 | @@ -636,7 +636,7 @@ | |
1111 | for (parameter = message->msg_parameters; parameter; | |
1112 | parameter = parameter->par_next) | |
1113 | parameter->par_desc.dsc_address = | |
1114 | - message->msg_buffer + (SLONG) parameter->par_desc.dsc_address; | |
1115 | + message->msg_buffer + (SLONG)(IPTR) parameter->par_desc.dsc_address; | |
1116 | } | |
1117 | ||
1118 | ||
1119 | @@ -1021,7 +1021,7 @@ | |
1120 | case nod_exec_into: | |
1121 | if (node->nod_arg[e_exec_into_block]) { | |
1122 | STUFF(blr_label); | |
1123 | - STUFF((int)(SLONG) node->nod_arg[e_exec_into_number]); | |
1124 | + STUFF((int)(SLONG)(IPTR) node->nod_arg[e_exec_into_number]); | |
1125 | } | |
1126 | STUFF(blr_exec_into); | |
1127 | temp = node->nod_arg[e_exec_into_list]; | |
1128 | @@ -1049,12 +1049,12 @@ | |
1129 | ||
1130 | case nod_label: | |
1131 | STUFF(blr_label); | |
1132 | - STUFF((int)(SLONG) node->nod_arg[e_label_number]); | |
1133 | + STUFF((int)(SLONG)(IPTR) node->nod_arg[e_label_number]); | |
1134 | return; | |
1135 | ||
1136 | case nod_breakleave: | |
1137 | STUFF(blr_leave); | |
1138 | - STUFF((int)(SLONG) node->nod_arg[e_breakleave_number]); | |
1139 | + STUFF((int)(SLONG)(IPTR) node->nod_arg[e_breakleave_number]); | |
1140 | return; | |
1141 | ||
1142 | case nod_store: | |
1143 | @@ -1069,7 +1069,7 @@ | |
1144 | ||
1145 | case nod_abort: | |
1146 | STUFF(blr_leave); | |
1147 | - STUFF((int)(SLONG) node->nod_arg[e_abrt_number]); | |
1148 | + STUFF((int)(SLONG)(IPTR) node->nod_arg[e_abrt_number]); | |
1149 | return; | |
1150 | ||
1151 | case nod_start_savepoint: | |
1152 | @@ -1149,14 +1149,14 @@ | |
1153 | ||
1154 | case nod_while: | |
1155 | STUFF(blr_label); | |
1156 | - STUFF((int)(SLONG) node->nod_arg[e_while_number]); | |
1157 | + STUFF((int)(SLONG)(IPTR) node->nod_arg[e_while_number]); | |
1158 | STUFF(blr_loop); | |
1159 | STUFF(blr_begin); | |
1160 | STUFF(blr_if); | |
1161 | GEN_expr(request, node->nod_arg[e_while_cond]); | |
1162 | GEN_statement(request, node->nod_arg[e_while_action]); | |
1163 | STUFF(blr_leave); | |
1164 | - STUFF((int)(SLONG) node->nod_arg[e_while_number]); | |
1165 | + STUFF((int)(SLONG)(IPTR) node->nod_arg[e_while_number]); | |
1166 | STUFF(blr_end); | |
1167 | return; | |
1168 | ||
1169 | @@ -1556,7 +1556,7 @@ | |
1170 | switch (node->nod_type) { | |
1171 | case nod_sqlcode: | |
1172 | STUFF(blr_sql_code); | |
1173 | - STUFF_WORD((USHORT)(ULONG) node->nod_arg[0]); | |
1174 | + STUFF_WORD((USHORT)(ULONG)(IPTR) node->nod_arg[0]); | |
1175 | return; | |
1176 | ||
1177 | case nod_gdscode: | |
1178 | @@ -1667,7 +1667,7 @@ | |
1179 | what loop is the user trying to abandon? */ | |
1180 | if (for_select->nod_arg [e_flp_action]) { | |
1181 | STUFF (blr_label); | |
1182 | - STUFF ((int) for_select->nod_arg [e_flp_number]); | |
1183 | + STUFF ((int)(IPTR) for_select->nod_arg [e_flp_number]); | |
1184 | } | |
1185 | ||
1186 | /* Generate FOR loop */ | |
1187 | @@ -2546,7 +2546,7 @@ | |
1188 | for (ptr = list->nod_arg, end = ptr + list->nod_count; ptr < end; ptr++) { | |
1189 | dsql_nod* nulls_placement = (*ptr)->nod_arg[e_order_nulls]; | |
1190 | if (nulls_placement) { | |
1191 | - switch ((SLONG)nulls_placement->nod_arg[0]) { | |
1192 | + switch ((SLONG)(IPTR)nulls_placement->nod_arg[0]) { | |
1193 | case NOD_NULLS_FIRST: | |
1194 | STUFF(blr_nullsfirst); | |
1195 | break; | |
1196 | --- Firebird/src/dsql/parse.y.org 2007-02-28 00:09:38.346623000 +0100 | |
1197 | +++ Firebird/src/dsql/parse.y 2007-02-28 00:15:32.978623000 +0100 | |
1198 | @@ -551,7 +551,7 @@ | |
1199 | | set | |
1200 | | update | |
1201 | | KW_DEBUG signed_short_integer | |
1202 | - { prepare_console_debug ((int) $2, &yydebug); | |
1203 | + { prepare_console_debug ((int)(IPTR) $2, &yydebug); | |
1204 | $$ = make_node (nod_null, (int) 0, NULL); } | |
1205 | ; | |
1206 | ||
1207 | @@ -1158,7 +1158,7 @@ | |
1208 | ; | |
1209 | ||
1210 | logfile_attr : KW_SIZE equals long_integer | |
1211 | - { lex.g_file->fil_length = (SLONG) $3; } | |
1212 | + { lex.g_file->fil_length = (SLONG)(IPTR) $3; } | |
1213 | /* | |
1214 | | RAW_PARTITIONS equals pos_short_integer | |
1215 | { lex.g_file->fil_partitions = (SSHORT) (IPTR) $3; | |
1216 | @@ -1178,9 +1178,9 @@ | |
1217 | ; | |
1218 | ||
1219 | file_clause : STARTING file_clause_noise long_integer | |
1220 | - { lex.g_file->fil_start = (SLONG) $3;} | |
1221 | + { lex.g_file->fil_start = (SLONG)(IPTR) $3;} | |
1222 | | LENGTH equals long_integer page_noise | |
1223 | - { lex.g_file->fil_length = (SLONG) $3;} | |
1224 | + { lex.g_file->fil_length = (SLONG)(IPTR) $3;} | |
1225 | ; | |
1226 | ||
1227 | file_clause_noise : | |
1228 | @@ -2186,7 +2186,7 @@ | |
1229 | ; | |
1230 | ||
1231 | array_range : signed_long_integer | |
1232 | - { if ((SLONG) $1 < 1) | |
1233 | + { if ((SLONG)(IPTR) $1 < 1) | |
1234 | $$ = make_node (nod_list, (int) 2, | |
1235 | MAKE_constant ((STR) $1, CONSTANT_SLONG), | |
1236 | MAKE_constant ((STR) 1, CONSTANT_SLONG)); | |
1237 | @@ -2429,10 +2429,10 @@ | |
1238 | } | |
1239 | | '(' signed_long_integer ')' | |
1240 | { | |
1241 | - if ( ((SLONG) $2 < 1) || ((SLONG) $2 > 18) ) | |
1242 | + if ( ((SLONG)(IPTR) $2 < 1) || ((SLONG)(IPTR) $2 > 18) ) | |
1243 | yyabandon (-842, isc_precision_err); | |
1244 | /* Precision most be between 1 and 18. */ | |
1245 | - if ((SLONG) $2 > 9) | |
1246 | + if ((SLONG)(IPTR) $2 > 9) | |
1247 | { | |
1248 | if ( ( (client_dialect <= SQL_DIALECT_V5) && | |
1249 | (db_dialect > SQL_DIALECT_V5) ) || | |
1250 | @@ -2469,7 +2469,7 @@ | |
1251 | } | |
1252 | } | |
1253 | else | |
1254 | - if ((SLONG) $2 < 5) | |
1255 | + if ((SLONG)(IPTR) $2 < 5) | |
1256 | { | |
1257 | lex.g_field->fld_dtype = dtype_short; | |
1258 | lex.g_field->fld_length = sizeof (SSHORT); | |
1259 | @@ -2483,13 +2483,13 @@ | |
1260 | } | |
1261 | | '(' signed_long_integer ',' signed_long_integer ')' | |
1262 | { | |
1263 | - if ( ((SLONG) $2 < 1) || ((SLONG) $2 > 18) ) | |
1264 | + if ( ((SLONG)(IPTR) $2 < 1) || ((SLONG)(IPTR) $2 > 18) ) | |
1265 | yyabandon (-842, isc_precision_err); | |
1266 | /* Precision should be between 1 and 18 */ | |
1267 | - if (((SLONG) $4 > (SLONG) $2) || ((SLONG) $4 < 0)) | |
1268 | + if (((SLONG)(IPTR) $4 > (SLONG)(IPTR) $2) || ((SLONG)(IPTR) $4 < 0)) | |
1269 | yyabandon (-842, isc_scale_nogt); | |
1270 | /* Scale must be between 0 and precision */ | |
1271 | - if ((SLONG) $2 > 9) | |
1272 | + if ((SLONG)(IPTR) $2 > 9) | |
1273 | { | |
1274 | if ( ( (client_dialect <= SQL_DIALECT_V5) && | |
1275 | (db_dialect > SQL_DIALECT_V5) ) || | |
1276 | @@ -2527,7 +2527,7 @@ | |
1277 | } | |
1278 | else | |
1279 | { | |
1280 | - if ((SLONG) $2 < 5) | |
1281 | + if ((SLONG)(IPTR) $2 < 5) | |
1282 | { | |
1283 | lex.g_field->fld_dtype = dtype_short; | |
1284 | lex.g_field->fld_length = sizeof (SSHORT); | |
1285 | @@ -2553,7 +2553,7 @@ | |
1286 | ||
1287 | float_type : KW_FLOAT precision_opt | |
1288 | { | |
1289 | - if ((SLONG) $2 > 7) | |
1290 | + if ((SLONG)(IPTR) $2 > 7) | |
1291 | { | |
1292 | lex.g_field->fld_dtype = dtype_double; | |
1293 | lex.g_field->fld_length = sizeof (double); | |
1294 | @@ -3706,32 +3706,32 @@ | |
1295 | ||
1296 | signed_short_integer : nonneg_short_integer | |
1297 | | '-' neg_short_integer | |
1298 | - { $$ = (DSQL_NOD) - (SLONG) $2; } | |
1299 | + { $$ = (DSQL_NOD) - (SLONG)(IPTR) $2; } | |
1300 | ; | |
1301 | ||
1302 | nonneg_short_integer : NUMBER | |
1303 | - { if ((SLONG) $1 > SHRT_POS_MAX) | |
1304 | + { if ((SLONG)(IPTR) $1 > SHRT_POS_MAX) | |
1305 | yyabandon (-842, isc_expec_short); | |
1306 | /* Short integer expected */ | |
1307 | $$ = $1;} | |
1308 | ; | |
1309 | ||
1310 | neg_short_integer : NUMBER | |
1311 | - { if ((SLONG) $1 > SHRT_NEG_MAX) | |
1312 | + { if ((SLONG)(IPTR) $1 > SHRT_NEG_MAX) | |
1313 | yyabandon (-842, isc_expec_short); | |
1314 | /* Short integer expected */ | |
1315 | $$ = $1;} | |
1316 | ; | |
1317 | ||
1318 | pos_short_integer : nonneg_short_integer | |
1319 | - { if ((SLONG) $1 == 0) | |
1320 | + { if ((SLONG)(IPTR) $1 == 0) | |
1321 | yyabandon (-842, isc_expec_positive); | |
1322 | /* Positive number expected */ | |
1323 | $$ = $1;} | |
1324 | ; | |
1325 | ||
1326 | unsigned_short_integer : NUMBER | |
1327 | - { if ((SLONG) $1 > SHRT_UNSIGNED_MAX) | |
1328 | + { if ((SLONG)(IPTR) $1 > SHRT_UNSIGNED_MAX) | |
1329 | yyabandon (-842, isc_expec_ushort); | |
1330 | /* Unsigned short integer expected */ | |
1331 | $$ = $1;} | |
1332 | @@ -3739,7 +3739,7 @@ | |
1333 | ||
1334 | signed_long_integer : long_integer | |
1335 | | '-' long_integer | |
1336 | - { $$ = (DSQL_NOD) - (SLONG) $2; } | |
1337 | + { $$ = (DSQL_NOD) - (SLONG)(IPTR) $2; } | |
1338 | ; | |
1339 | ||
1340 | long_integer : NUMBER | |
1341 | @@ -3820,14 +3820,14 @@ | |
1342 | ||
1343 | string_value_function : SUBSTRING '(' value FROM pos_short_integer ')' | |
1344 | { $$ = make_node (nod_substr, e_substr_count, $3, | |
1345 | - MAKE_constant ((STR) ((SLONG)($5) - 1), CONSTANT_SLONG), | |
1346 | + MAKE_constant ((STR) ((SLONG)(IPTR)($5) - 1), CONSTANT_SLONG), | |
1347 | MAKE_constant ((STR) SHRT_POS_MAX, CONSTANT_SLONG)); } | |
1348 | /* CVC: It was easier to provide a constant with maximum value if the | |
1349 | third parameter -length- is ommitted than to chase and fix the functions | |
1350 | that treat nod_substr as an aggregate and do not expect NULL arguments. */ | |
1351 | | SUBSTRING '(' value FROM pos_short_integer FOR nonneg_short_integer ')' | |
1352 | { $$ = make_node (nod_substr, e_substr_count, $3, | |
1353 | - MAKE_constant ((STR) ((SLONG)($5) - 1), CONSTANT_SLONG), | |
1354 | + MAKE_constant ((STR) ((SLONG)(IPTR)($5) - 1), CONSTANT_SLONG), | |
1355 | MAKE_constant ((STR) ($7), CONSTANT_SLONG)); } | |
1356 | | KW_UPPER '(' value ')' | |
1357 | { $$ = make_node (nod_upcase, 1, $3); } | |
1358 | --- Firebird/src/remote/interface.cpp.org 2007-02-28 00:17:46.438623000 +0100 | |
1359 | +++ Firebird/src/remote/interface.cpp 2007-02-28 00:18:18.002623000 +0100 | |
1360 | @@ -3230,7 +3230,7 @@ | |
1361 | // Nickolay Samofatov: We pass this value to the server (as 32-bit value) | |
1362 | // then it returns it to us and we do not use it. Maybe pass zero here | |
1363 | // to avoid client-side security risks? | |
1364 | - event->p_event_ast = (SLONG) ast; | |
1365 | + event->p_event_ast = (SLONG)(IPTR) ast; | |
1366 | event->p_event_arg = (SLONG)(IPTR) arg; | |
1367 | ||
1368 | event->p_event_rid = rem_event->rvnt_id; | |
1369 | @@ -6225,8 +6225,8 @@ | |
1370 | for (; to_desc < end_desc; from_desc++, to_desc++) { | |
1371 | from = *from_desc; | |
1372 | to = *to_desc; | |
1373 | - from.dsc_address = from_msg + (SLONG) from.dsc_address; | |
1374 | - to.dsc_address = to_msg + (SLONG) to.dsc_address; | |
1375 | + from.dsc_address = from_msg + (SLONG)(IPTR) from.dsc_address; | |
1376 | + to.dsc_address = to_msg + (SLONG)(IPTR) to.dsc_address; | |
1377 | CVT_move(&from, &to, (FPTR_VOID) move_error); | |
1378 | } | |
1379 | ||
1380 | --- Firebird/src/remote/protocol.cpp.org 2007-02-28 00:18:40.858623000 +0100 | |
1381 | +++ Firebird/src/remote/protocol.cpp 2007-02-28 00:19:05.766623000 +0100 | |
1382 | @@ -984,7 +984,7 @@ | |
1383 | BLOB_PTR *p; | |
1384 | SSHORT n; | |
1385 | ||
1386 | - p = buffer + (ULONG) desc->dsc_address; | |
1387 | + p = buffer + (ULONG)(IPTR) desc->dsc_address; | |
1388 | ||
1389 | switch (desc->dsc_dtype) { | |
1390 | case dtype_text: | |
1391 | --- Firebird/src/dsql/pass1.cpp 2005-06-16 11:44:39.000000000 +0200 | |
1392 | +++ Firebird/src/dsql/pass1.cpp 2007-02-28 00:17:34.114623000 +0100 | |
1393 | @@ -642,7 +642,7 @@ | |
1394 | TRUE, TRUE, | |
1395 | /* Pass 0 here to restore older parameter | |
1396 | ordering behavior */ | |
1397 | - (USHORT)(ULONG) input->nod_arg[0]); | |
1398 | + (USHORT)(ULONG)(IPTR) input->nod_arg[0]); | |
1399 | return node; | |
1400 | ||
1401 | case nod_udf: | |
1402 | @@ -1561,7 +1561,7 @@ | |
1403 | } | |
1404 | else { | |
1405 | // we have Count(*) | |
1406 | - if (request->req_scope_level == (ULONG) node->nod_arg[1]) { | |
1407 | + if (request->req_scope_level == (ULONG)(IPTR) node->nod_arg[1]) { | |
1408 | aggregate = TRUE; | |
1409 | } | |
1410 | } | |
1411 | @@ -4426,7 +4426,7 @@ | |
1412 | (slist_node->nod_type == nod_list)) | |
1413 | { | |
1414 | /* an select list is there */ | |
1415 | - position = (ULONG) sub->nod_arg[0]; | |
1416 | + position = (ULONG)(IPTR) sub->nod_arg[0]; | |
1417 | if ((position < 1) || (position > (ULONG) slist_node->nod_count)) | |
1418 | { | |
1419 | ERRD_post(gds_sqlerr, gds_arg_number, (SLONG) - 104, | |
1420 | @@ -4819,9 +4819,9 @@ | |
1421 | } | |
1422 | ||
1423 | if (node1->nod_type == nod_constant && node1->nod_desc.dsc_dtype == dtype_long) { | |
1424 | - position = (ULONG) (node1->nod_arg[0]); | |
1425 | + position = (ULONG)(IPTR) (node1->nod_arg[0]); | |
1426 | if ((position < 1) || !s_list || | |
1427 | - (position > (ULONG) s_list->nod_count)) { | |
1428 | + (position > (ULONG)(IPTR) s_list->nod_count)) { | |
1429 | ERRD_post(gds_sqlerr, gds_arg_number, (SLONG) - 104, | |
1430 | gds_arg_gds, gds_dsql_column_pos_err, | |
1431 | gds_arg_string, "ORDER BY", 0); | |
1432 | @@ -5082,7 +5082,7 @@ | |
1433 | ERRD_post(gds_sqlerr, gds_arg_number, (SLONG) - 104, | |
1434 | gds_arg_gds, gds_dsql_command_err, gds_arg_gds, gds_order_by_err, /* invalid ORDER BY clause */ | |
1435 | 0); | |
1436 | - number = (SLONG) position->nod_arg[0]; | |
1437 | + number = (SLONG)(IPTR) position->nod_arg[0]; | |
1438 | if (number < 1 || number > union_items->nod_count) | |
1439 | ERRD_post(gds_sqlerr, gds_arg_number, (SLONG) - 104, | |
1440 | gds_arg_gds, gds_dsql_command_err, gds_arg_gds, gds_order_by_err, /* invalid ORDER BY clause */ | |
1441 | --- Firebird/src/jrd/dpm.epp.org 2007-02-28 00:25:04.202623000 +0100 | |
1442 | +++ Firebird/src/jrd/dpm.epp 2007-02-28 00:27:43.810623000 +0100 | |
1443 | @@ -2124,7 +2124,7 @@ | |
1444 | CCH_precedence(tdbb, &rpb->rpb_window, -rpb->rpb_transaction); | |
1445 | CCH_MARK(tdbb, &rpb->rpb_window); | |
1446 | page = (DPG) rpb->rpb_window.win_buffer; | |
1447 | - size = SQZ_length(tdbb, (SCHAR*) rpb->rpb_address, (int) rpb->rpb_length, &dcc); | |
1448 | + size = SQZ_length(tdbb, (SCHAR*) rpb->rpb_address, (int)(IPTR) rpb->rpb_length, &dcc); | |
1449 | ||
1450 | /* It is critical that the record be padded, if necessary, to the length of | |
1451 | a fragmented record header. Compute the amount of fill required. */ | |
1452 | @@ -2753,7 +2753,7 @@ | |
1453 | rpb->rpb_page = rpb->rpb_window.win_page; | |
1454 | rpb->rpb_line = slot; | |
1455 | rpb->rpb_number = | |
1456 | - (SLONG) page->dpg_sequence * dbb->dbb_max_records + slot; | |
1457 | + (SLONG)(IPTR) page->dpg_sequence * dbb->dbb_max_records + slot; | |
1458 | ||
1459 | if (record) | |
1460 | LLS_PUSH((BLK) rpb->rpb_page, &record->rec_precedence); |