SOURCES: Firebird-gcc4.patch - update; not finished

arekm arekm at pld-linux.org
Wed Feb 28 00:36:05 CET 2007


Author: arekm                        Date: Tue Feb 27 23:36:05 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update; not finished

---- Files affected:
SOURCES:
   Firebird-gcc4.patch (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/Firebird-gcc4.patch
diff -u SOURCES/Firebird-gcc4.patch:1.7 SOURCES/Firebird-gcc4.patch:1.8
--- SOURCES/Firebird-gcc4.patch:1.7	Sun Feb 18 09:55:50 2007
+++ SOURCES/Firebird-gcc4.patch	Wed Feb 28 00:36:00 2007
@@ -29,3 +29,1432 @@
  		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
+@@ -261,12 +261,12 @@
+ 
+ int Config::getSortMemBlockSize()
+ {
+-	return (int) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE];
++	return (int)(IPTR) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE];
+ }
+ 
+ int Config::getSortMemUpperLimit()
+ {
+-	return (int) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT];
++	return (int)(IPTR) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT];
+ }
+ 
+ bool Config::getRemoteFileOpenAbility()
+@@ -276,12 +276,12 @@
+ 
+ int Config::getGuardianOption()
+ {
+-	return (int) sysConfig.values[KEY_GUARDIAN_OPTION];
++	return (int)(IPTR) sysConfig.values[KEY_GUARDIAN_OPTION];
+ }
+ 
+ int Config::getCpuAffinityMask()
+ {
+-	return (int) sysConfig.values[KEY_CPU_AFFINITY_MASK];
++	return (int)(IPTR) sysConfig.values[KEY_CPU_AFFINITY_MASK];
+ }
+ 
+ bool Config::getOldParameterOrdering()
+@@ -291,7 +291,7 @@
+ 
+ int Config::getTcpRemoteBufferSize()
+ {
+-	return (int) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE];
++	return (int)(IPTR) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE];
+ }
+ 
+ bool Config::getTcpNoNagle()
+@@ -301,37 +301,37 @@
+ 
+ int Config::getIpcMapSize()
+ {
+-	return (int) sysConfig.values[KEY_IPC_MAP_SIZE];
++	return (int)(IPTR) sysConfig.values[KEY_IPC_MAP_SIZE];
+ }
+ 
+ int Config::getDefaultDbCachePages()
+ {
+-	return (int) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES];
++	return (int)(IPTR) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES];
+ }
+ 
+ int Config::getConnectionTimeout()
+ {
+-	return (int) sysConfig.values[KEY_CONNECTION_TIMEOUT];
++	return (int)(IPTR) sysConfig.values[KEY_CONNECTION_TIMEOUT];
+ }
+ 
+ int Config::getDummyPacketInterval()
+ {
+-	return (int) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL];
++	return (int)(IPTR) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL];
+ }
+ 
+ int Config::getLockMemSize()
+ {
+-	return (int) sysConfig.values[KEY_LOCK_MEM_SIZE];
++	return (int)(IPTR) sysConfig.values[KEY_LOCK_MEM_SIZE];
+ }
+ 
+ int Config::getLockSemCount()
+ {
+-	return (int) sysConfig.values[KEY_LOCK_SEM_COUNT];
++	return (int)(IPTR) sysConfig.values[KEY_LOCK_SEM_COUNT];
+ }
+ 
+ int Config::getLockSignal()
+ {
+-	return (int) sysConfig.values[KEY_LOCK_SIGNAL];
++	return (int)(IPTR) sysConfig.values[KEY_LOCK_SIGNAL];
+ }
+ 
+ bool Config::getLockGrantOrder()
+@@ -341,27 +341,27 @@
+ 
+ int Config::getLockHashSlots()
+ {
+-	return (int) sysConfig.values[KEY_LOCK_HASH_SLOTS];
++	return (int)(IPTR) sysConfig.values[KEY_LOCK_HASH_SLOTS];
+ }
+ 
+ int Config::getLockAcquireSpins()
+ {
+-	return (int) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS];
++	return (int)(IPTR) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS];
+ }
+ 
+ int Config::getEventMemSize()
+ {
+-	return (int) sysConfig.values[KEY_EVENT_MEM_SIZE];
++	return (int)(IPTR) sysConfig.values[KEY_EVENT_MEM_SIZE];
+ }
+ 
+ int Config::getDeadlockTimeout()
+ {
+-	return (int) sysConfig.values[KEY_DEADLOCK_TIMEOUT];
++	return (int)(IPTR) sysConfig.values[KEY_DEADLOCK_TIMEOUT];
+ }
+ 
+ int Config::getSolarisStallValue()
+ {
+-	return (int) sysConfig.values[KEY_SOLARIS_STALL_VALUE];
++	return (int)(IPTR) sysConfig.values[KEY_SOLARIS_STALL_VALUE];
+ }
+ 
+ bool Config::getTraceMemoryPools()
+@@ -371,7 +371,7 @@
+ 
+ int Config::getPrioritySwitchDelay()
+ {
+-	int rc = (int) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY];
++	int rc = (int) (IPTR) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY];
+ 	if (rc < 1)
+ 		rc = 1;
+ 	return rc;
+@@ -379,7 +379,7 @@
+ 
+ int Config::getDeadThreadsCollection()
+ {
+-	int rc = (int) sysConfig.values[KEY_DEAD_THREADS_COLLECTION];
++	int rc = (int) (IPTR) sysConfig.values[KEY_DEAD_THREADS_COLLECTION];
+ 	if (rc < 1)
+ 		rc = 1;
+ 	return rc;
+@@ -387,7 +387,7 @@
+ 
+ int Config::getPriorityBoost()
+ {
+-	int rc = (int) sysConfig.values[KEY_PRIORITY_BOOST];
++	int rc = (int) (IPTR) sysConfig.values[KEY_PRIORITY_BOOST];
+ 	if (rc < 1)
+ 		rc = 1;
+ 	if (rc > 1000)
+@@ -402,7 +402,7 @@
+ 
+ int Config::getRemoteServicePort()
+ {
+-	return (int) sysConfig.values[KEY_REMOTE_SERVICE_PORT];
++	return (int)(IPTR) sysConfig.values[KEY_REMOTE_SERVICE_PORT];
+ }
+ 
+ const char *Config::getRemotePipeName()
+@@ -417,17 +417,17 @@
+ 
+ int Config::getMaxUnflushedWrites()
+ {
+-	return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES];
++	return (int)(IPTR) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES];
+ }
+ 
+ int Config::getMaxUnflushedWriteTime()
+ {
+-	return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME];
++	return (int)(IPTR) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME];
+ }
+ 
+ int Config::getProcessPriorityLevel()
+ {
+-	return (int) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL];
++	return (int)(IPTR) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL];
+ }
+ 
+ bool Config::getCreateInternalWindow()
+@@ -443,7 +443,7 @@
+ int Config::getRemoteAuxPort()
+ {
+ #ifdef SUPERSERVER
+-	return (int) sysConfig.values[KEY_REMOTE_AUX_PORT];
++	return (int)(IPTR) sysConfig.values[KEY_REMOTE_AUX_PORT];
+ #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 @@
+ 
+ #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
+ 
+ #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;
+ 
+ 	if (stdio_flag)
+-		if (!(result = ib_fdopen((int) result, "w+")))
++		if (!(result = ib_fdopen((int)(IPTR) result, "w+")))
+ 			return (void *)-1;
+ 
+ 	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 @@
+ 
+ 	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;
+ 
+ //  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);
+ 
+ 			/* 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;
+ 
+--- 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_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 @@
+ 
+ 			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;
+ 		}
+ 
+--- 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]];
+ 
+ 			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;
+ 
+ 			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]);
+ 
+ 			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 @@
+ 
+ 		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 (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)
+ 		{
+@@ -3395,7 +3395,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]];
+ 	relation = rpb->rpb_relation;
+ 
+ /* 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]];
+ 
+ /* 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 (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;
+ 
+ #ifdef PC_ENGINE
+@@ -2652,7 +2652,7 @@
+ 				DSC *desc;
+ 
+ 				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;
+ 
+ 				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 @@
+ 	{
+ 		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 @@
+ 
+ #if !defined(REQUESTER)
+ 
++extern "C" {
+ extern int debug;
+ extern IHNDL internal_db_handles;
++}
+ 
+ #endif /* REQUESTER */
+ 
+--- 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)
++			if ((int) (IPTR)journal->jrn_channel != -1)
+ 				break;
+ 			if (!SYSCALL_INTERRUPTED(errno)) {
+ 				error(status_vector, journal, errno, "socket");
+@@ -859,18 +859,18 @@
+ 			return ret_val;
+ 		}
+ 
+-		if (!connect((int) journal->jrn_channel, (sockaddr*)&address, sizeof(address)))
++		if (!connect((int)(IPTR) journal->jrn_channel, (sockaddr*)&address, sizeof(address)))
+ 			break;
+ 
+ 		sleep(3);
+ 
+ 		if (loop < 16) {
+-			close((int) journal->jrn_channel);
++			close((int)(IPTR) journal->jrn_channel);
+ 			continue;
+ 		}
+ 		if (!SYSCALL_INTERRUPTED(errno)) {
+ 			if (retry) {
+-				close((int) journal->jrn_channel);
++				close((int)(IPTR) journal->jrn_channel);
+ 				gds__free(journal);
+ 				*ret_jrn = (JRN) NULL;
+ 				return FB_SUCCESS;
+@@ -879,7 +879,7 @@
+ 			gds__free(journal);
+ 			return FB_FAILURE;
+ 		}
+-		close((int) journal->jrn_channel);
++		close((int)(IPTR) journal->jrn_channel);
+ 	}
+ #endif
+ 
+@@ -939,7 +939,7 @@
+ 		if (retry)
+ 		{
+ #ifdef BSD_SOCKETS
+-			close((int) journal->jrn_channel);
++			close((int)(IPTR) journal->jrn_channel);
+ #endif
+ 
+ #ifdef WIN_NT
+@@ -1056,7 +1056,7 @@
+     with us, so keep trying until successful.  */
+ 
+ 	do {
+-		l = recv((int) journal->jrn_channel, (char *) reply, sizeof(struct jrnr), 0);
++		l = recv((int)(IPTR) journal->jrn_channel, (char *) reply, sizeof(struct jrnr), 0);
+ 	} while (l < 0 && SYSCALL_INTERRUPTED(errno));
+ 
+ 	if (l < 0) {
+@@ -1095,7 +1095,7 @@
+  **************************************/
+ 
+ #ifdef BSD_SOCKETS
+-	if (close((int) journal->jrn_channel) < 0) {
++	if (close((int)(IPTR) journal->jrn_channel) < 0) {
+ 		error(status_vector, journal, errno, "close");
+ 		return FB_FAILURE;
+ 	}
+@@ -1166,7 +1166,7 @@
+     with us, so keep trying until successful.  */
+ 
+ 	do {
+-		l = send((int) journal->jrn_channel, (char *) buffer, (int) length, 0);
++		l = send((int)(IPTR) journal->jrn_channel, (char *) buffer, (int) length, 0);
+ 	} while (l < 0 && SYSCALL_INTERRUPTED(errno));
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/Firebird-gcc4.patch?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list