packages (FIREBIRD_1_5): Firebird/Firebird-gcc4.patch - fix for 1.5.6
marcus
marcus at pld-linux.org
Sat Apr 14 23:13:01 CEST 2012
Author: marcus Date: Sat Apr 14 21:13:01 2012 GMT
Module: packages Tag: FIREBIRD_1_5
---- Log message:
- fix for 1.5.6
---- Files affected:
packages/Firebird:
Firebird-gcc4.patch (1.10 -> 1.10.2.1)
---- Diffs:
================================================================
Index: packages/Firebird/Firebird-gcc4.patch
diff -u packages/Firebird/Firebird-gcc4.patch:1.10 packages/Firebird/Firebird-gcc4.patch:1.10.2.1
--- packages/Firebird/Firebird-gcc4.patch:1.10 Wed Feb 28 13:17:41 2007
+++ packages/Firebird/Firebird-gcc4.patch Sat Apr 14 23:12:56 2012
@@ -1,21 +1,11 @@
---- firebird-1.5.4.4910/src/common/classes/alloc.h.orig 2006-11-05 15:37:52.000000000 +0100
-+++ firebird-1.5.4.4910/src/common/classes/alloc.h 2007-02-17 23:15:18.116389037 +0100
-@@ -241,7 +241,7 @@
-
- void operator delete[](void* mem) throw();
-
--#ifdef AIX
-+#if defined(AIX) || __GNUC__ >= 4
- #define FB_STATIC_INLINE_NEW inline
- #else
- #define FB_STATIC_INLINE_NEW static inline
---- firebird-1.5.4.4910/src/burp/burp.cpp.orig 2006-11-05 15:37:49.000000000 +0100
-+++ firebird-1.5.4.4910/src/burp/burp.cpp 2007-02-17 23:46:15.538237476 +0100
+diff -uNr firebird-1.5.6.5026.orig/src/burp/burp.cpp firebird-1.5.6.5026/src/burp/burp.cpp
+--- firebird-1.5.6.5026.orig/src/burp/burp.cpp 2008-03-27 14:42:48.000000000 +0100
++++ firebird-1.5.6.5026/src/burp/burp.cpp 2012-04-14 23:05:20.324666123 +0200
@@ -1596,7 +1596,7 @@
#ifndef WIN_NT
signal(SIGPIPE, SIG_IGN);
#endif
-- fil->fil_fd = reinterpret_cast<DESC>(GBAK_STDOUT_DESC);
+- fil->fil_fd = (DESC)(GBAK_STDOUT_DESC);
+ fil->fil_fd = static_cast<DESC>(GBAK_STDOUT_DESC);
break;
}
@@ -24,13 +14,38 @@
tdgbl->action->act_action = ACT_restore;
if (!strcmp(fil->fil_name, "stdin")) {
-- fil->fil_fd = reinterpret_cast<DESC>(GBAK_STDIN_DESC);
+- fil->fil_fd = GBAK_STDIN_DESC;
+ fil->fil_fd = static_cast<DESC>(GBAK_STDIN_DESC);
tdgbl->file_desc = fil->fil_fd;
tdgbl->gbl_sw_files = fil->fil_next;
}
---- Firebird/src/common/config/config.cpp.org 2007-02-27 23:26:11.922623000 +0100
-+++ Firebird/src/common/config/config.cpp 2007-02-27 23:28:52.958623000 +0100
+diff -uNr firebird-1.5.6.5026.orig/src/burp/canonical.cpp firebird-1.5.6.5026/src/burp/canonical.cpp
+--- firebird-1.5.6.5026.orig/src/burp/canonical.cpp 2007-01-22 13:27:47.000000000 +0100
++++ firebird-1.5.6.5026/src/burp/canonical.cpp 2012-04-14 23:02:47.982845118 +0200
+@@ -505,7 +505,7 @@
+ UCHAR *p;
+ SSHORT n;
+
+- p = buffer + (int) desc->dsc_address;
++ p = buffer + (int)(IPTR) desc->dsc_address;
+
+ switch (desc->dsc_dtype)
+ {
+diff -uNr firebird-1.5.6.5026.orig/src/common/classes/alloc.h firebird-1.5.6.5026/src/common/classes/alloc.h
+--- firebird-1.5.6.5026.orig/src/common/classes/alloc.h 2007-12-17 15:48:31.000000000 +0100
++++ firebird-1.5.6.5026/src/common/classes/alloc.h 2012-04-14 23:06:38.771543648 +0200
+@@ -241,7 +241,7 @@
+
+ void operator delete[](void* mem) throw();
+
+-#if (defined AIX || defined DARWIN)
++#if (defined AIX || defined DARWIN) || __GNUC__ >= 4
+ #define FB_STATIC_INLINE_NEW inline
+ #else
+ #define FB_STATIC_INLINE_NEW static inline
+diff -uNr firebird-1.5.6.5026.orig/src/common/config/config.cpp firebird-1.5.6.5026/src/common/config/config.cpp
+--- firebird-1.5.6.5026.orig/src/common/config/config.cpp 2005-10-01 03:08:41.000000000 +0200
++++ firebird-1.5.6.5026/src/common/config/config.cpp 2012-04-14 23:02:47.954845518 +0200
@@ -261,12 +261,12 @@
int Config::getSortMemBlockSize()
@@ -214,1359 +229,1321 @@
#else
return 0;
#endif
---- Firebird/src/jrd/common.h.org 2007-02-27 23:37:36.050623000 +0100
-+++ Firebird/src/jrd/common.h 2007-02-27 23:38:29.062623000 +0100
-@@ -874,8 +874,8 @@
+diff -uNr firebird-1.5.6.5026.orig/src/dsql/ddl.cpp firebird-1.5.6.5026/src/dsql/ddl.cpp
+--- firebird-1.5.6.5026.orig/src/dsql/ddl.cpp 2005-06-08 15:50:46.000000000 +0200
++++ firebird-1.5.6.5026/src/dsql/ddl.cpp 2012-04-14 23:02:47.978845175 +0200
+@@ -1126,12 +1126,12 @@
+ if (constant)
+ {
+ request->append_number(gds_dyn_trg_sequence,
+- (SSHORT)(SLONG) (constant ? constant->nod_arg[0] : 0));
++ (SSHORT)(SLONG)(IPTR) (constant ? constant->nod_arg[0] : 0));
+ }
- #define JRD_BUGCHK 15 /* facility code for bugcheck messages */
- #ifndef OFFSET
--#define OFFSET(struct,fld) ((int) &((struct) 0)->fld)
--#define OFFSETA(struct,fld) ((int) ((struct) 0)->fld)
-+#define OFFSET(struct,fld) ((int)(IPTR) &((struct) 0)->fld)
-+#define OFFSETA(struct,fld) ((int)(IPTR) ((struct) 0)->fld)
- #endif
+ if ((constant = node->nod_arg[e_cnstr_type]) != NULL)
+ {
+- const SSHORT type = (SSHORT)(SLONG) constant->nod_arg[0];
++ const SSHORT type = (SSHORT)(SLONG)(IPTR) constant->nod_arg[0];
+ request->append_number(gds_dyn_trg_type, type);
+ }
- #ifndef ODS_ALIGNMENT
---- Firebird/src/jrd/gds.cpp.org 2007-02-27 23:31:23.778623000 +0100
-+++ Firebird/src/jrd/gds.cpp 2007-02-27 23:39:16.538623000 +0100
-@@ -2287,7 +2287,7 @@
- return result;
+@@ -1270,7 +1270,7 @@
- if (stdio_flag)
-- if (!(result = ib_fdopen((int) result, "w+")))
-+ if (!(result = ib_fdopen((int)(IPTR) result, "w+")))
- return (void *)-1;
+ switch (element->nod_type) {
+ case nod_file_length:
+- start = (SLONG) (element->nod_arg[0]) + 1;
++ start = (SLONG)(IPTR) (element->nod_arg[0]) + 1;
+ break;
- if (expanded_string)
---- Firebird/src/gpre/cme.cpp.org 2007-02-27 23:39:38.878623000 +0100
-+++ Firebird/src/gpre/cme.cpp 2007-02-27 23:40:09.686623000 +0100
-@@ -251,7 +251,7 @@
- // ** Begin date/time/timestamp support *
- case nod_extract:
- STUFF(blr_extract);
-- switch ((KWWORDS) (int) node->nod_arg[0])
-+ switch ((KWWORDS) (int)(IPTR) node->nod_arg[0])
- {
- case KW_YEAR:
- STUFF(blr_extract_year);
-@@ -478,7 +478,7 @@
- // ** Begin date/time/timestamp support *
- case nod_extract:
- {
-- KWWORDS kw_word = (KWWORDS) (int) node->nod_arg[0];
-+ KWWORDS kw_word = (KWWORDS) (int)(IPTR) node->nod_arg[0];
- CME_get_dtype(node->nod_arg[1], f);
- switch (f->fld_dtype)
- {
---- Firebird/src/gpre/c_cxx.cpp.org 2007-02-27 23:40:26.886623000 +0100
-+++ Firebird/src/gpre/c_cxx.cpp 2007-02-27 23:41:05.806623000 +0100
-@@ -2184,7 +2184,7 @@
+ default:
+@@ -1336,25 +1336,25 @@
- args.pat_database = (DBB) init->nod_arg[3];
- args.pat_vector1 = status_vector(action);
-- args.pat_long1 = (int) init->nod_arg[2];
-+ args.pat_long1 = (int)(IPTR) init->nod_arg[2];
- args.pat_value2 = (int) event_list->nod_count;
+ case nod_group_commit_wait:
+ request->append_uchar(gds_dyn_log_group_commit_wait);
+- temp_long = (SLONG) (element->nod_arg[0]);
++ temp_long = (SLONG)(IPTR) (element->nod_arg[0]);
+ request->append_ulong_with_length(temp_long);
+ break;
- // generate call to dynamically generate event blocks
-@@ -2255,7 +2255,7 @@
- event_init = (GPRE_NOD) event_action->act_object;
- stack_name = (SYM) event_init->nod_arg[0];
- if (!strcmp(event_name->sym_string, stack_name->sym_string)) {
-- ident = (int) event_init->nod_arg[2];
-+ ident = (int)(IPTR) event_init->nod_arg[2];
- database = (DBB) event_init->nod_arg[3];
- }
- }
---- Firebird/src/jrd/sdl.cpp.org 2007-02-27 23:41:38.546623000 +0100
-+++ Firebird/src/jrd/sdl.cpp 2007-02-27 23:41:48.982623000 +0100
-@@ -701,7 +701,7 @@
- }
- element_desc = array_desc->ads_rpt[value].ads_desc;
- element_desc.dsc_address = (BLOB_PTR *) arg->sdl_arg_array +
-- (SLONG) element_desc.dsc_address +
-+ (SLONG)(IPTR) element_desc.dsc_address +
- (array_desc->ads_element_length * subscript);
+ case nod_check_point_len:
+ request->append_uchar(gds_dyn_log_check_point_length);
+- temp_long = (SLONG) (element->nod_arg[0]);
++ temp_long = (SLONG)(IPTR) (element->nod_arg[0]);
+ request->append_ulong_with_length(temp_long);
+ break;
- /* Is this element within the array bounds? */
---- Firebird/src/jrd/blb.cpp.org 2007-02-27 23:45:22.954623000 +0100
-+++ Firebird/src/jrd/blb.cpp 2007-02-27 23:45:34.610623000 +0100
-@@ -861,7 +861,7 @@
- source = (BID) from_desc->dsc_address;
- destination = (BID) to_desc->dsc_address;
- id = (USHORT) (IPTR) field->nod_arg[e_fld_id];
-- rpb = &request->req_rpb[(int) field->nod_arg[e_fld_stream]];
-+ rpb = &request->req_rpb[(int) (IPTR) field->nod_arg[e_fld_stream]];
- relation = rpb->rpb_relation;
- record = rpb->rpb_record;
+ case nod_num_log_buffers:
+ request->append_uchar(gds_dyn_log_num_of_buffers);
+- temp_short = (SSHORT)(SLONG) (element->nod_arg[0]);
++ temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]);
+ request->append_ushort_with_length(temp_short);
+ break;
---- Firebird/src/jrd/cmp.cpp.org 2007-02-27 23:45:52.962623000 +0100
-+++ Firebird/src/jrd/cmp.cpp 2007-02-27 23:46:14.266623000 +0100
-@@ -1661,7 +1661,7 @@
- return;
+ case nod_log_buffer_size:
+ request->append_uchar(gds_dyn_log_buffer_size);
+- temp_short = (SSHORT)(SLONG) (element->nod_arg[0]);
++ temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]);
+ request->append_ushort_with_length(temp_short);
+ break;
- case nod_extract:
-- if ((ULONG) node->nod_arg[e_extract_part] == blr_extract_second) {
-+ if ((ULONG) (IPTR) node->nod_arg[e_extract_part] == blr_extract_second) {
- /* QUADDATE - SECOND returns a float, or scaled! */
- desc->dsc_dtype = dtype_long;
- desc->dsc_length = sizeof(ULONG);
-@@ -1720,7 +1720,7 @@
+@@ -1637,11 +1637,11 @@
+ request->append_number(gds_dyn_def_dimension, position);
+ DSQL_NOD element = *ptr++;
+ request->append_uchar(gds_dyn_dim_lower);
+- SLONG lrange = (SLONG) (element->nod_arg[0]);
++ SLONG lrange = (SLONG)(IPTR) (element->nod_arg[0]);
+ request->append_ulong_with_length(lrange);
+ element = *ptr;
+ request->append_uchar(gds_dyn_dim_upper);
+- SLONG hrange = (SLONG) (element->nod_arg[0]);
++ SLONG hrange = (SLONG)(IPTR) (element->nod_arg[0]);
+ request->append_ulong_with_length(hrange);
+ request->append_uchar(gds_dyn_end);
+ if (lrange >= hrange)
+@@ -2062,9 +2062,9 @@
+ request->append_cstring(gds_dyn_def_filter,
+ ((STR) (ptr[e_filter_name]))->str_data);
+ request->append_number(gds_dyn_filter_in_subtype,
+- (SSHORT)(SLONG) ((ptr[e_filter_in_type])->nod_arg[0]));
++ (SSHORT)(SLONG)(IPTR) ((ptr[e_filter_in_type])->nod_arg[0]));
+ request->append_number(gds_dyn_filter_out_subtype,
+- (SSHORT)(SLONG) ((ptr[e_filter_out_type])->nod_arg[0]));
++ (SSHORT)(SLONG)(IPTR) ((ptr[e_filter_out_type])->nod_arg[0]));
+ request->append_cstring(gds_dyn_func_entry_point,
+ ((STR) (ptr[e_filter_entry_pt]))->str_data);
+ request->append_cstring(gds_dyn_func_module_name,
+@@ -2670,16 +2670,16 @@
+ gds_arg_gds, gds_dsql_shadow_number_err, 0);
+ }
- message = node->nod_arg[e_arg_message];
- format = (FMT) message->nod_arg[e_msg_format];
-- *desc = format->fmt_desc[(int) node->nod_arg[e_arg_number]];
-+ *desc = format->fmt_desc[(int) (IPTR) node->nod_arg[e_arg_number]];
- return;
- }
+- request->append_number(gds_dyn_def_shadow, (SSHORT)(SLONG) (ptr[e_shadow_number]));
++ request->append_number(gds_dyn_def_shadow, (SSHORT)(SLONG)(IPTR) (ptr[e_shadow_number]));
+ request->append_cstring(gds_dyn_def_file, ((STR) (ptr[e_shadow_name]))->str_data);
+ request->append_number(gds_dyn_shadow_man_auto,
+- (SSHORT)(SLONG) ((ptr[e_shadow_man_auto])->nod_arg[0]));
++ (SSHORT)(SLONG)(IPTR) ((ptr[e_shadow_man_auto])->nod_arg[0]));
+ request->append_number(gds_dyn_shadow_conditional,
+- (SSHORT)(SLONG) ((ptr[e_shadow_conditional])->nod_arg[0]));
++ (SSHORT)(SLONG)(IPTR) ((ptr[e_shadow_conditional])->nod_arg[0]));
---- Firebird/src/jrd/evl.cpp.org 2007-02-27 23:46:46.350623000 +0100
-+++ Firebird/src/jrd/evl.cpp 2007-02-27 23:49:01.206623000 +0100
-@@ -248,7 +248,7 @@
- arg_number = (int)(IPTR)node->nod_arg[e_arg_number];
- desc = &format->fmt_desc[arg_number];
- impure->vlu_desc.dsc_address =
-- (UCHAR *) request + message->nod_impure + (int) desc->dsc_address;
-+ (UCHAR *) request + message->nod_impure + (int) (IPTR) desc->dsc_address;
- impure->vlu_desc.dsc_dtype = desc->dsc_dtype;
- impure->vlu_desc.dsc_length = desc->dsc_length;
- impure->vlu_desc.dsc_scale = desc->dsc_scale;
-@@ -288,7 +288,7 @@
- // may happen. I checked triggers and insert/update statements.
- // All seem to work fine.
- record =
-- request->req_rpb[(int) node->nod_arg[e_fld_stream]].rpb_record;
-+ request->req_rpb[(int) (IPTR) node->nod_arg[e_fld_stream]].rpb_record;
- EVL_field(0, record, (USHORT) (IPTR) node->nod_arg[e_fld_id],
- &impure->vlu_desc);
- if (!impure->vlu_desc.dsc_address)
-@@ -828,10 +828,10 @@
- }
- message = node->nod_arg[e_arg_message];
- format = (FMT) message->nod_arg[e_msg_format];
-- desc = &format->fmt_desc[(int) node->nod_arg[e_arg_number]];
-+ desc = &format->fmt_desc[(int) (IPTR) node->nod_arg[e_arg_number]];
+ request->append_file_start(0);
- impure->vlu_desc.dsc_address = (UCHAR *) request +
-- message->nod_impure + (int) desc->dsc_address;
-+ message->nod_impure + (int) (IPTR) desc->dsc_address;
- impure->vlu_desc.dsc_dtype = desc->dsc_dtype;
- impure->vlu_desc.dsc_length = desc->dsc_length;
- impure->vlu_desc.dsc_scale = desc->dsc_scale;
-@@ -851,7 +851,7 @@
- case nod_field:
- {
- REC record =
-- request->req_rpb[(int)node->nod_arg[e_fld_stream]].rpb_record;
-+ request->req_rpb[(int)(IPTR)node->nod_arg[e_fld_stream]].rpb_record;
- /* In order to "map a null to a default" value (in EVL_field()),
- * the relation block is referenced.
- * Reference: Bug 10116, 10424
-@@ -997,7 +997,7 @@
- ULONG extract_part;
+- SLONG length = (SLONG) ptr[e_shadow_length];
++ SLONG length = (SLONG)(IPTR) ptr[e_shadow_length];
+ request->append_file_length(length);
- impure = (VLU) ((SCHAR *) request + node->nod_impure);
-- extract_part = (ULONG) node->nod_arg[e_extract_part];
-+ extract_part = (ULONG) (IPTR) node->nod_arg[e_extract_part];
- value = EVL_expr(tdbb, node->nod_arg[e_extract_value]);
+ request->append_uchar(gds_dyn_end);
+@@ -2806,15 +2806,15 @@
- impure->vlu_desc.dsc_dtype = dtype_short;
-@@ -1174,7 +1174,7 @@
- switch (node->nod_type) {
- case nod_gen_id: /* return a 32-bit generator value */
- impure->vlu_misc.vlu_long = (SLONG) DPM_gen_id(tdbb,
-- (SLONG)
-+ (SLONG) (IPTR)
- node->nod_arg
- [e_gen_id], 0,
- MOV_get_int64
-@@ -1189,7 +1189,7 @@
+ if (constant = node->nod_arg[e_trg_active])
+ request->append_number(gds_dyn_trg_inactive,
+- (SSHORT)(SLONG) constant->nod_arg[0]);
++ (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]);
- case nod_gen_id2:
- impure->vlu_misc.vlu_int64 = DPM_gen_id(tdbb,
-- (SLONG)
-+ (SLONG) (IPTR)
- node->nod_arg[e_gen_id],
- 0,
- MOV_get_int64(values[0],
-@@ -1383,7 +1383,7 @@
- return FALSE;
- }
-
-- desc->dsc_address = record->rec_data + (int) desc->dsc_address;
-+ desc->dsc_address = record->rec_data + (int) (IPTR) desc->dsc_address;
+ if (constant = node->nod_arg[e_trg_position])
+ request->append_number(gds_dyn_trg_sequence,
+- (SSHORT)(SLONG) constant->nod_arg[0]);
++ (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]);
- if (TEST_NULL(record, id)) {
- desc->dsc_flags |= DSC_null;
-@@ -1727,7 +1727,7 @@
- field = (*ptr)->nod_arg[e_asgn_to];
- id = (USHORT) (IPTR) field->nod_arg[e_fld_id];
- record =
-- request->req_rpb[(int) field->nod_arg[e_fld_stream]].rpb_record;
-+ request->req_rpb[(int) (IPTR) field->nod_arg[e_fld_stream]].rpb_record;
- impure = (VLUX) ((SCHAR *) request + from->nod_impure);
- switch (from->nod_type)
+ if (constant = node->nod_arg[e_trg_type]) {
+- request->append_number(gds_dyn_trg_type, (SSHORT)(SLONG) constant->nod_arg[0]);
+- trig_type = (USHORT)(ULONG) constant->nod_arg[0];
++ request->append_number(gds_dyn_trg_type, (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]);
++ trig_type = (USHORT)(ULONG)(IPTR) constant->nod_arg[0];
+ }
+ else {
+ assert(node->nod_type == nod_mod_trigger);
+@@ -2893,7 +2893,7 @@
+ for (DSQL_NOD* ptr = temp->nod_arg; ptr < end; ++ptr)
{
-@@ -3395,7 +3395,7 @@
+ DSQL_NOD message = *ptr;
+- SSHORT number = (SSHORT)(SLONG) message->nod_arg[e_msg_number];
++ SSHORT number = (SSHORT)(SLONG)(IPTR) message->nod_arg[e_msg_number];
+ if (message->nod_type == nod_del_trigger_msg)
+ {
+ request->append_number(gds_dyn_delete_trigger_msg, number);
+@@ -2954,7 +2954,7 @@
+ // CVC: This is case of "returns <type> [by value|reference]"
+ /* Some data types can not be returned as value */
- request = tdbb->tdbb_request;
- impure = (VLU) ((SCHAR *) request + node->nod_impure);
-- rpb = &request->req_rpb[(int) node->nod_arg[0]];
-+ rpb = &request->req_rpb[(int)(IPTR) node->nod_arg[0]];
- relation = rpb->rpb_relation;
+- if (((int)(SLONG) (ret_val_ptr[1]->nod_arg[0]) == FUN_value) &&
++ if (((int)(SLONG)(IPTR) (ret_val_ptr[1]->nod_arg[0]) == FUN_value) &&
+ (field->fld_dtype == dtype_text ||
+ field->fld_dtype == dtype_varying ||
+ field->fld_dtype == dtype_cstring ||
+@@ -2998,7 +2998,7 @@
+ // CVC: This is case of "returns parameter <N>"
- /* Format dbkey as vector of relation id, record number */
-@@ -4487,7 +4487,7 @@
- request = tdbb->tdbb_request;
- impure = (VLU) ((SCHAR *) request + node->nod_impure);
-- rpb = &request->req_rpb[(int) node->nod_arg[0]];
-+ rpb = &request->req_rpb[(int)(IPTR) node->nod_arg[0]];
+- position = (SSHORT)(SLONG) (ret_val_ptr[1]->nod_arg[0]);
++ position = (SSHORT)(SLONG)(IPTR) (ret_val_ptr[1]->nod_arg[0]);
+ /* Function modifies an argument whose value is the function return value */
- /* If the current transaction has updated the record, the record version
- * coming in from DSQL will have the original transaction # (or current
---- Firebird/src/jrd/exe.cpp.org 2007-02-27 23:49:26.026623000 +0100
-+++ Firebird/src/jrd/exe.cpp 2007-02-27 23:50:30.090623000 +0100
-@@ -376,7 +376,7 @@
- if (to->nod_type == nod_field)
- {
- SSHORT id = (USHORT) (IPTR) to->nod_arg[e_fld_id];
-- REC record = request->req_rpb[(int) to->nod_arg[e_fld_stream]].rpb_record;
-+ REC record = request->req_rpb[(int)(IPTR) to->nod_arg[e_fld_stream]].rpb_record;
- if (null) {
- SET_NULL(record, id);
- } else {
-@@ -1049,7 +1049,7 @@
- desc = &format->fmt_desc[n];
- if (!desc->dsc_address)
- continue;
-- p = record->rec_data + (SLONG) desc->dsc_address;
-+ p = record->rec_data + (SLONG)(IPTR) desc->dsc_address;
- if (TEST_NULL(record, n))
+ if (!arguments || position > arguments->nod_count || position < 1) {
+@@ -3024,10 +3024,10 @@
+ if (field->fld_dtype == dtype_blob)
{
- if (length = desc->dsc_length)
-@@ -1134,7 +1134,7 @@
-
- request = tdbb->tdbb_request;
- transaction = request->req_transaction;
-- rpb = &request->req_rpb[(int) node->nod_arg[e_erase_stream]];
-+ rpb = &request->req_rpb[(int)(IPTR) node->nod_arg[e_erase_stream]];
- relation = rpb->rpb_relation;
+ /* CVC: I need to test returning blobs by descriptor before allowing the change there. For now, I ignore the return type specification. */
+- BOOLEAN free_it = ((SSHORT)(SLONG) ret_val_ptr[1]->nod_arg[0] < 0);
++ BOOLEAN free_it = ((SSHORT)(SLONG)(IPTR) ret_val_ptr[1]->nod_arg[0] < 0);
+ request->append_number(gds_dyn_def_function_arg, blob_position);
+ request->append_number(gds_dyn_func_mechanism,
+- (SSHORT)(SLONG) ((free_it ? -1 : 1) * FUN_blob_struct));
++ (SSHORT)(SLONG)(IPTR) ((free_it ? -1 : 1) * FUN_blob_struct));
+ /* if we have the free_it set then the blob has
+ to be freed on return */
+ }
+@@ -3035,7 +3035,7 @@
+ {
+ request->append_number(gds_dyn_def_function_arg, (SSHORT) 0);
+ request->append_number(gds_dyn_func_mechanism,
+- (SSHORT)(SLONG) (ret_val_ptr[1]->nod_arg[0]));
++ (SSHORT)(SLONG)(IPTR) (ret_val_ptr[1]->nod_arg[0]));
+ }
- #ifdef PC_ENGINE
-@@ -2652,7 +2652,7 @@
- DSC *desc;
+ request->append_cstring(gds_dyn_function_name, udf_name);
+@@ -3070,7 +3070,7 @@
+ request->append_number(gds_dyn_def_function_arg, (SSHORT) position);
- desc = EVL_expr(tdbb, node->nod_arg[e_gen_value]);
-- (void) DPM_gen_id(tdbb, (SLONG) node->nod_arg[e_gen_id], 1,
-+ (void) DPM_gen_id(tdbb, (SLONG)(IPTR) node->nod_arg[e_gen_id], 1,
- MOV_get_int64(desc, 0));
- request->req_operation = jrd_req::req_return;
- }
-@@ -2664,7 +2664,7 @@
- DSC *desc;
+ if (param_node [e_udf_param_type]) {
+- SSHORT arg_mechanism = (SSHORT)(SLONG) (param_node [e_udf_param_type]->nod_arg [0]);
++ SSHORT arg_mechanism = (SSHORT)(SLONG)(IPTR) (param_node [e_udf_param_type]->nod_arg [0]);
+ request->append_number(gds_dyn_func_mechanism, arg_mechanism);
+ }
+ else if (field->fld_dtype == dtype_blob) {
+@@ -3677,13 +3677,13 @@
+ if (constant)
+ {
+ request->append_number(gds_dyn_trg_sequence,
+- (SSHORT)(SLONG) (constant ? constant->nod_arg[0] : 0));
++ (SSHORT)(SLONG)(IPTR) (constant ? constant->nod_arg[0] : 0));
+ }
- desc = EVL_expr(tdbb, node->nod_arg[e_gen_value]);
-- (void) DPM_gen_id(tdbb, (SLONG) node->nod_arg[e_gen_id], 1,
-+ (void) DPM_gen_id(tdbb, (SLONG)(IPTR) node->nod_arg[e_gen_id], 1,
- MOV_get_int64(desc, 0));
- request->req_operation = jrd_req::req_return;
- }
---- Firebird/src/jrd/ext.cpp.org 2007-02-27 23:50:53.198623000 +0100
-+++ Firebird/src/jrd/ext.cpp 2007-02-27 23:51:19.166623000 +0100
-@@ -299,7 +299,7 @@
- continue;
- if ( (literal = (LIT) field->fld_missing_value) ) {
- desc = *desc_ptr;
-- desc.dsc_address = record->rec_data + (int) desc.dsc_address;
-+ desc.dsc_address = record->rec_data + (int) (IPTR) desc.dsc_address;
- if (!MOV_compare(&literal->lit_desc, &desc))
- continue;
- }
-@@ -512,7 +512,7 @@
- desc_ptr->dsc_length &&
- TEST_NULL(record, i))
- {
-- p = record->rec_data + (int) desc_ptr->dsc_address;
-+ p = record->rec_data + (int) (IPTR) desc_ptr->dsc_address;
- if ( (literal = (LIT) field->fld_missing_value) ) {
- desc = *desc_ptr;
- desc.dsc_address = p;
---- Firebird/src/jrd/idx.cpp.org 2007-02-27 23:51:42.758623000 +0100
-+++ Firebird/src/jrd/idx.cpp 2007-02-27 23:51:52.130623000 +0100
-@@ -1058,7 +1058,7 @@
- (UCHAR) (IPTR) (*idx->idx_foreign_primaries)[index_number]) continue;
- partner_relation =
- MET_relation(tdbb,
-- (int) (*idx->idx_foreign_relations)[index_number]);
-+ (int) (IPTR) (*idx->idx_foreign_relations)[index_number]);
- index_id =
- (USHORT) (IPTR) (*idx->idx_foreign_indexes)[index_number];
- if ( (result =
---- Firebird/src/jrd/inf.cpp.org 2007-02-27 23:52:13.402623000 +0100
-+++ Firebird/src/jrd/inf.cpp 2007-02-27 23:52:25.830623000 +0100
-@@ -973,7 +973,7 @@
- node = request->req_message;
- if (item == gds_info_message_number)
- length =
-- INF_convert((SLONG) node->nod_arg[e_msg_number],
-+ INF_convert((SLONG)(IPTR) node->nod_arg[e_msg_number],
- buffer_ptr);
- else {
- format = (FMT) node->nod_arg[e_msg_format];
---- Firebird/src/jrd/jrd.cpp.org 2007-02-27 23:52:47.034623000 +0100
-+++ Firebird/src/jrd/jrd.cpp 2007-02-27 23:53:44.414623000 +0100
-@@ -3877,9 +3877,9 @@
+ constant = node->nod_arg[e_cnstr_type];
+ if (constant)
{
- if ( (node = csb->csb_rpt[i].csb_message) )
- {
-- if ((int) node->nod_arg[e_msg_number] == 0) {
-+ if ((int)(IPTR) node->nod_arg[e_msg_number] == 0) {
- in_message = node;
-- } else if ((int) node->nod_arg[e_msg_number] == 1) {
-+ } else if ((int)(IPTR) node->nod_arg[e_msg_number] == 1) {
- out_message = node;
- }
- }
---- Firebird/src/jrd/jrd.h.org 2007-02-27 23:54:08.442623000 +0100
-+++ Firebird/src/jrd/jrd.h 2007-02-27 23:54:30.994623000 +0100
-@@ -1050,8 +1050,10 @@
+- trig_type = (USHORT)(ULONG) constant->nod_arg[0];
++ trig_type = (USHORT)(ULONG)(IPTR) constant->nod_arg[0];
+ request->append_number(gds_dyn_trg_type, trig_type);
+ }
+ else
+@@ -4173,7 +4173,7 @@
- #if !defined(REQUESTER)
+ case nod_del_shadow:
+ request->append_number(gds_dyn_delete_shadow,
+- (SSHORT)(SLONG) (node->nod_arg[0]));
++ (SSHORT)(SLONG)(IPTR) (node->nod_arg[0]));
+ request->append_uchar(gds_dyn_end);
+ break;
-+extern "C" {
- extern int debug;
- extern IHNDL internal_db_handles;
-+}
+@@ -4611,25 +4611,25 @@
- #endif /* REQUESTER */
+ case nod_group_commit_wait:
+ request->append_uchar(gds_dyn_log_group_commit_wait);
+- temp_long = (SLONG) (element->nod_arg[0]);
++ temp_long = (SLONG)(IPTR) (element->nod_arg[0]);
+ request->append_ulong_with_length(temp_long);
+ break;
---- Firebird/src/jrd/jrn.cpp.org 2007-02-27 23:55:28.466623000 +0100
-+++ Firebird/src/jrd/jrn.cpp 2007-02-27 23:57:02.762623000 +0100
-@@ -836,7 +836,7 @@
- for (loop = 0; loop < 20; loop++) {
- for (;;) {
- journal->jrn_channel = (int *) socket(AF_INET, SOCK_STREAM, 0);
-- if ((int) journal->jrn_channel != -1)
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/packages/Firebird/Firebird-gcc4.patch?r1=1.10&r2=1.10.2.1
More information about the pld-cvs-commit
mailing list