SOURCES: Firebird-gcc4.patch - at least builds on x86 using gcc 4.1
qboosh
qboosh at pld-linux.org
Sat Dec 24 17:00:40 CET 2005
Author: qboosh Date: Sat Dec 24 16:00:40 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- at least builds on x86 using gcc 4.1
---- Files affected:
SOURCES:
Firebird-gcc4.patch (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/Firebird-gcc4.patch
diff -u SOURCES/Firebird-gcc4.patch:1.2 SOURCES/Firebird-gcc4.patch:1.3
--- SOURCES/Firebird-gcc4.patch:1.2 Tue May 3 02:35:08 2005
+++ SOURCES/Firebird-gcc4.patch Sat Dec 24 17:00:35 2005
@@ -1,641 +1,80 @@
---- firebird-1.5.2.4731/src/common/classes/alloc.h~ 2004-09-17 20:34:27.000000000 +0000
-+++ firebird-1.5.2.4731/src/common/classes/alloc.h 2005-05-02 23:30:18.351312952 +0000
-@@ -253,11 +253,11 @@
- #define FB_NEW(pool) new(pool,__FILE__,__LINE__)
- #define FB_NEW_RPT(pool,count) new(pool,count,__FILE__,__LINE__)
- #else
--static inline void* operator new(size_t s, Firebird::MemoryPool& pool) {
-+inline void* operator new(size_t s, Firebird::MemoryPool& pool) {
- return pool.allocate(s);
- // return pool.calloc(s);
- }
--static inline void* operator new[](size_t s, Firebird::MemoryPool& pool) {
-+inline void* operator new[](size_t s, Firebird::MemoryPool& pool) {
- return pool.allocate(s);
- // return pool.calloc(s);
- }
---- firebird-1.5.2.4731/src/common/config/config.h.orig 2005-05-02 23:33:31.284982576 +0000
-+++ firebird-1.5.2.4731/src/common/config/config.h 2005-05-02 23:36:57.674606584 +0000
-@@ -118,12 +118,12 @@
- /*
- Block size for the sorting manager
- */
-- static int getSortMemBlockSize();
-+ static size_t getSortMemBlockSize();
-
- /*
- Memory usage limit for the sorting manager
- */
-- static int getSortMemUpperLimit();
-+ static size_t getSortMemUpperLimit();
-
- /*
- Whether remote (NFS) files can be opened
-@@ -133,12 +133,12 @@
- /*
- Startup option for the guardian
- */
-- static int getGuardianOption();
-+ static size_t getGuardianOption();
-
- /*
- CPU affinity mask
- */
-- static int getCpuAffinityMask();
-+ static size_t getCpuAffinityMask();
-
- /*
- Old parameter ordering for backward compatibility with FB1/IB6.X
-@@ -148,7 +148,7 @@
- /*
- XDR buffer size
- */
-- static int getTcpRemoteBufferSize();
-+ static size_t getTcpRemoteBufferSize();
-
- /*
- Disable Nagle algorithm
-@@ -158,37 +158,37 @@
- /*
- IPC client mapping
- */
-- static int getIpcMapSize();
-+ static size_t getIpcMapSize();
-
- /*
- Default database cache size
- */
-- static int getDefaultDbCachePages();
-+ static size_t getDefaultDbCachePages();
-
- /*
- Connection timeout
- */
-- static int getConnectionTimeout();
-+ static size_t getConnectionTimeout();
-
- /*
- Dummy packet interval
- */
-- static int getDummyPacketInterval();
-+ static size_t getDummyPacketInterval();
-
- /*
- Lock manager memory size
- */
-- static int getLockMemSize();
-+ static size_t getLockMemSize();
-
- /*
- Lock manager semaphore count
- */
-- static int getLockSemCount();
-+ static size_t getLockSemCount();
-
- /*
- Lock manager signal number
- */
-- static int getLockSignal();
-+ static size_t getLockSignal();
-
- /*
- Lock manager grant order
-@@ -198,27 +198,27 @@
- /*
- Lock manager hash slots
- */
-- static int getLockHashSlots();
-+ static size_t getLockHashSlots();
-
- /*
- Lock manager acquire spins
- */
-- static int getLockAcquireSpins();
-+ static size_t getLockAcquireSpins();
-
- /*
- Event manager memory size
- */
-- static int getEventMemSize();
-+ static size_t getEventMemSize();
-
- /*
- Deadlock timeout
- */
-- static int getDeadlockTimeout();
-+ static size_t getDeadlockTimeout();
-
- /*
- Solaris stall value
- */
-- static int getSolarisStallValue();
-+ static size_t getSolarisStallValue();
-
- /*
- Trace memory pools
-@@ -228,17 +228,17 @@
- /*
- Priority switch delay
- */
-- static int getPrioritySwitchDelay();
-+ static size_t getPrioritySwitchDelay();
-
- /*
- Dead threads collection
- */
-- static int getDeadThreadsCollection();
-+ static size_t getDeadThreadsCollection();
-
- /*
- Priority boost
- */
-- static int getPriorityBoost();
-+ static size_t getPriorityBoost();
-
- /*
- Service name for remote protocols
-@@ -248,7 +248,7 @@
- /*
- Service port for INET
- */
-- static int getRemoteServicePort();
-+ static size_t getRemoteServicePort();
-
- /*
- Pipe name for WNET
-@@ -263,17 +263,17 @@
- /*
- Unflushed writes number
- */
-- static int getMaxUnflushedWrites();
-+ static size_t getMaxUnflushedWrites();
-
- /*
- Unflushed write time
- */
-- static int getMaxUnflushedWriteTime();
-+ static size_t getMaxUnflushedWriteTime();
-
- /*
- Process priority level
- */
-- static int getProcessPriorityLevel();
-+ static size_t getProcessPriorityLevel();
-
- /*
- Create window for IPC stuff
-@@ -288,7 +288,7 @@
- /*
- Port for event processing
- */
-- static int getRemoteAuxPort();
-+ static size_t getRemoteAuxPort();
-
- /*
- Server binding NIC address
---- firebird-1.5.2.4731/src/common/config/config.cpp.orig 2005-05-02 23:33:35.531337032 +0000
-+++ firebird-1.5.2.4731/src/common/config/config.cpp 2005-05-02 23:36:03.720808808 +0000
-@@ -257,14 +257,14 @@
- return result ? result : sysConfig.root_dir;
- }
-
--int Config::getSortMemBlockSize()
-+size_t Config::getSortMemBlockSize()
- {
-- return (int) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE];
-+ return (size_t) sysConfig.values[KEY_SORT_MEM_BLOCK_SIZE];
- }
-
--int Config::getSortMemUpperLimit()
-+size_t Config::getSortMemUpperLimit()
- {
-- return (int) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT];
-+ return (size_t) sysConfig.values[KEY_SORT_MEM_UPPER_LIMIT];
- }
-
- bool Config::getRemoteFileOpenAbility()
-@@ -272,14 +272,14 @@
- return (bool) sysConfig.values[KEY_REMOTE_FILE_OPEN_ABILITY];
- }
-
--int Config::getGuardianOption()
-+size_t Config::getGuardianOption()
- {
-- return (int) sysConfig.values[KEY_GUARDIAN_OPTION];
-+ return (size_t) sysConfig.values[KEY_GUARDIAN_OPTION];
- }
-
--int Config::getCpuAffinityMask()
-+size_t Config::getCpuAffinityMask()
- {
-- return (int) sysConfig.values[KEY_CPU_AFFINITY_MASK];
-+ return (size_t) sysConfig.values[KEY_CPU_AFFINITY_MASK];
- }
-
- bool Config::getOldParameterOrdering()
-@@ -287,9 +287,9 @@
- return (bool) sysConfig.values[KEY_OLD_PARAMETER_ORDERING];
- }
-
--int Config::getTcpRemoteBufferSize()
-+size_t Config::getTcpRemoteBufferSize()
- {
-- return (int) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE];
-+ return (size_t) sysConfig.values[KEY_TCP_REMOTE_BUFFER_SIZE];
- }
-
- bool Config::getTcpNoNagle()
-@@ -297,39 +297,39 @@
- return (bool) sysConfig.values[KEY_TCP_NO_NAGLE];
- }
-
--int Config::getIpcMapSize()
-+size_t Config::getIpcMapSize()
- {
-- return (int) sysConfig.values[KEY_IPC_MAP_SIZE];
-+ return (size_t) sysConfig.values[KEY_IPC_MAP_SIZE];
- }
-
--int Config::getDefaultDbCachePages()
-+size_t Config::getDefaultDbCachePages()
- {
-- return (int) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES];
-+ return (size_t) sysConfig.values[KEY_DEFAULT_DB_CACHE_PAGES];
- }
-
--int Config::getConnectionTimeout()
-+size_t Config::getConnectionTimeout()
- {
-- return (int) sysConfig.values[KEY_CONNECTION_TIMEOUT];
-+ return (size_t) sysConfig.values[KEY_CONNECTION_TIMEOUT];
- }
-
--int Config::getDummyPacketInterval()
-+size_t Config::getDummyPacketInterval()
- {
-- return (int) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL];
-+ return (size_t) sysConfig.values[KEY_DUMMY_PACKET_INTERVAL];
- }
-
--int Config::getLockMemSize()
-+size_t Config::getLockMemSize()
- {
-- return (int) sysConfig.values[KEY_LOCK_MEM_SIZE];
-+ return (size_t) sysConfig.values[KEY_LOCK_MEM_SIZE];
- }
-
--int Config::getLockSemCount()
-+size_t Config::getLockSemCount()
- {
-- return (int) sysConfig.values[KEY_LOCK_SEM_COUNT];
-+ return (size_t) sysConfig.values[KEY_LOCK_SEM_COUNT];
- }
-
--int Config::getLockSignal()
-+size_t Config::getLockSignal()
- {
-- return (int) sysConfig.values[KEY_LOCK_SIGNAL];
-+ return (size_t) sysConfig.values[KEY_LOCK_SIGNAL];
- }
-
- bool Config::getLockGrantOrder()
-@@ -337,29 +337,29 @@
- return (bool) sysConfig.values[KEY_LOCK_GRANT_ORDER];
- }
-
--int Config::getLockHashSlots()
-+size_t Config::getLockHashSlots()
- {
-- return (int) sysConfig.values[KEY_LOCK_HASH_SLOTS];
-+ return (size_t) sysConfig.values[KEY_LOCK_HASH_SLOTS];
- }
-
--int Config::getLockAcquireSpins()
-+size_t Config::getLockAcquireSpins()
- {
-- return (int) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS];
-+ return (size_t) sysConfig.values[KEY_LOCK_ACQUIRE_SPINS];
- }
-
--int Config::getEventMemSize()
-+size_t Config::getEventMemSize()
- {
-- return (int) sysConfig.values[KEY_EVENT_MEM_SIZE];
-+ return (size_t) sysConfig.values[KEY_EVENT_MEM_SIZE];
- }
-
--int Config::getDeadlockTimeout()
-+size_t Config::getDeadlockTimeout()
- {
-- return (int) sysConfig.values[KEY_DEADLOCK_TIMEOUT];
-+ return (size_t) sysConfig.values[KEY_DEADLOCK_TIMEOUT];
- }
-
--int Config::getSolarisStallValue()
-+size_t Config::getSolarisStallValue()
- {
-- return (int) sysConfig.values[KEY_SOLARIS_STALL_VALUE];
-+ return (size_t) sysConfig.values[KEY_SOLARIS_STALL_VALUE];
- }
-
- bool Config::getTraceMemoryPools()
-@@ -367,25 +367,25 @@
- return (bool) sysConfig.values[KEY_TRACE_MEMORY_POOLS];
- }
-
--int Config::getPrioritySwitchDelay()
-+size_t Config::getPrioritySwitchDelay()
- {
-- int rc = (int) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY];
-+ size_t rc = (size_t) sysConfig.values[KEY_PRIORITY_SWITCH_DELAY];
- if (rc < 1)
- rc = 1;
- return rc;
- }
-
--int Config::getDeadThreadsCollection()
-+size_t Config::getDeadThreadsCollection()
- {
-- int rc = (int) sysConfig.values[KEY_DEAD_THREADS_COLLECTION];
-+ size_t rc = (size_t) sysConfig.values[KEY_DEAD_THREADS_COLLECTION];
- if (rc < 1)
- rc = 1;
- return rc;
- }
-
--int Config::getPriorityBoost()
-+size_t Config::getPriorityBoost()
- {
-- int rc = (int) sysConfig.values[KEY_PRIORITY_BOOST];
-+ size_t rc = (size_t) sysConfig.values[KEY_PRIORITY_BOOST];
- if (rc < 1)
- rc = 1;
- if (rc > 1000)
-@@ -398,9 +398,9 @@
- return (const char*) sysConfig.values[KEY_REMOTE_SERVICE_NAME];
- }
-
--int Config::getRemoteServicePort()
-+size_t Config::getRemoteServicePort()
- {
-- return (int) sysConfig.values[KEY_REMOTE_SERVICE_PORT];
-+ return (size_t) sysConfig.values[KEY_REMOTE_SERVICE_PORT];
- }
-
- const char *Config::getRemotePipeName()
-@@ -413,19 +413,19 @@
- return (const char*) sysConfig.values[KEY_IPC_NAME];
- }
-
--int Config::getMaxUnflushedWrites()
-+size_t Config::getMaxUnflushedWrites()
- {
-- return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES];
-+ return (size_t) sysConfig.values[KEY_MAX_UNFLUSHED_WRITES];
- }
-
--int Config::getMaxUnflushedWriteTime()
-+size_t Config::getMaxUnflushedWriteTime()
- {
-- return (int) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME];
-+ return (size_t) sysConfig.values[KEY_MAX_UNFLUSHED_WRITE_TIME];
- }
-
--int Config::getProcessPriorityLevel()
-+size_t Config::getProcessPriorityLevel()
- {
-- return (int) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL];
-+ return (size_t) sysConfig.values[KEY_PROCESS_PRIORITY_LEVEL];
- }
-
- bool Config::getCreateInternalWindow()
-@@ -438,10 +438,10 @@
- return (bool) sysConfig.values[KEY_COMPLETE_BOOLEAN_EVALUATION];
- }
-
--int Config::getRemoteAuxPort()
-+size_t Config::getRemoteAuxPort()
- {
- #ifdef SUPERSERVER
-- return (int) sysConfig.values[KEY_REMOTE_AUX_PORT];
-+ return (size_t) sysConfig.values[KEY_REMOTE_AUX_PORT];
- #else
- return 0;
- #endif
---- firebird-1.5.2.4731/src/jrd/common.h.orig 2005-05-02 23:26:45.000000000 +0000
-+++ firebird-1.5.2.4731/src/jrd/common.h 2005-05-02 23:50:08.873326096 +0000
-@@ -864,8 +864,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) ((size_t) &((struct) 0)->fld)
-+#define OFFSETA(struct,fld) ((size_t) ((struct) 0)->fld)
- #endif
-
- #ifndef ODS_ALIGNMENT
---- firebird-1.5.2.4731/src/jrd/gds.cpp.orig 2005-05-02 23:39:56.000000000 +0000
-+++ firebird-1.5.2.4731/src/jrd/gds.cpp 2005-05-02 23:51:13.128557816 +0000
-@@ -2356,7 +2356,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-1.5.2.4731/src/gpre/cmd.cpp~ 2003-10-30 22:25:53.000000000 +0000
-+++ firebird-1.5.2.4731/src/gpre/cmd.cpp 2005-05-03 00:06:56.620125296 +0000
-@@ -204,7 +204,7 @@
-
- case ACT_drop_shadow:
- put_numeric(request, gds_dyn_delete_shadow,
-- (SSHORT) action->act_object);
-+ (SSHORT) (IPTR) action->act_object);
- STUFF_END;
- break;
-
---- firebird-1.5.2.4731/src/gpre/cme.cpp.orig 2005-05-03 00:16:24.976721960 +0000
-+++ firebird-1.5.2.4731/src/gpre/cme.cpp 2005-05-03 00:15:46.661546752 +0000
-@@ -251,7 +251,7 @@
- // ** Begin date/time/timestamp support *
- case nod_extract:
- STUFF(blr_extract);
-- switch ((KWWORDS) (int) node->nod_arg[0])
-+ switch ((KWWORDS) (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) (IPTR) node->nod_arg[0];
- CME_get_dtype(node->nod_arg[1], f);
- switch (f->fld_dtype)
- {
---- firebird-1.5.2.4731/src/gpre/c_cxx.cpp.orig 2005-05-03 00:17:13.068891056 +0000
-+++ firebird-1.5.2.4731/src/gpre/c_cxx.cpp 2005-05-03 00:17:54.679565272 +0000
-@@ -2184,7 +2184,7 @@
-
- args.pat_database = (DBB) init->nod_arg[3];
- args.pat_vector1 = status_vector(action);
-- args.pat_value1 = (int) init->nod_arg[2];
-+ args.pat_value1 = (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 = (IPTR) event_init->nod_arg[2];
- database = (DBB) event_init->nod_arg[3];
- }
- }
---- firebird-1.5.2.4731/src/jrd/sdl.cpp~ 2003-04-10 06:49:14.000000000 +0000
-+++ firebird-1.5.2.4731/src/jrd/sdl.cpp 2005-05-03 00:19:43.328048192 +0000
-@@ -699,7 +699,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 +
-+ (IPTR) element_desc.dsc_address +
- (array_desc->ads_element_length * subscript);
-
- /* Is this element within the array bounds? */
---- firebird-1.5.2.4731/src/jrd/dpm.cpp.orig 2005-05-03 00:21:08.675073472 +0000
-+++ firebird-1.5.2.4731/src/jrd/dpm.cpp 2005-05-03 00:21:25.822466672 +0000
-@@ -2214,7 +2214,7 @@
-
- DEBUG if (stack)
- while (*stack)
-- CCH_precedence(tdbb, &rpb->rpb_window, (SLONG) LLS_POP(stack));
-+ CCH_precedence(tdbb, &rpb->rpb_window, (IPTR) LLS_POP(stack));
-
- CCH_precedence(tdbb, &rpb->rpb_window, -rpb->rpb_transaction);
- CCH_MARK(tdbb, &rpb->rpb_window);
-@@ -2831,7 +2831,7 @@
- If the page need to be compressed, compress it. */
-
- while (*stack)
-- CCH_precedence(tdbb, &rpb->rpb_window, (SLONG) LLS_POP(stack));
-+ CCH_precedence(tdbb, &rpb->rpb_window, (IPTR) LLS_POP(stack));
- CCH_MARK(tdbb, &rpb->rpb_window);
- i = page->dpg_count + ((slot) ? 0 : 1);
-
---- firebird-1.5.2.4731/src/jrd/met.cpp.orig 2005-05-03 00:22:57.523525992 +0000
-+++ firebird-1.5.2.4731/src/jrd/met.cpp 2005-05-03 00:24:20.650888712 +0000
-@@ -1541,7 +1541,7 @@
- if (desc->dsc_address)
- {
- format->fmt_length =
-- (ULONG) desc->dsc_address + desc->dsc_length;
-+ (IPTR) desc->dsc_address + desc->dsc_length;
- break;
- }
- }
-@@ -3181,13 +3181,13 @@
+--- firebird-1.5.2.4731/src/jrd/met.epp.orig 2004-09-15 00:01:51.000000000 +0200
++++ firebird-1.5.2.4731/src/jrd/met.epp 2005-12-24 12:57:15.942243120 +0100
+@@ -2133,13 +2133,13 @@
index_number < references->frgn_reference_ids->count();
index_number++)
{
- if (idx->idx_id == (UCHAR) (*references->frgn_reference_ids)
-+ if (idx->idx_id == (IPTR) (*references->frgn_reference_ids)
++ if (idx->idx_id == (UCHAR)(size_t) (*references->frgn_reference_ids)
[index_number])
{
idx->idx_primary_relation =
- (USHORT) (*references->frgn_relations)[index_number];
-+ (IPTR) (*references->frgn_relations)[index_number];
++ (USHORT)(size_t) (*references->frgn_relations)[index_number];
idx->idx_primary_index =
- (UCHAR) (*references->frgn_indexes)[index_number];
-+ (IPTR) (*references->frgn_indexes)[index_number];
++ (UCHAR)(size_t) (*references->frgn_indexes)[index_number];
return TRUE;
}
}
-@@ -3203,7 +3203,7 @@
+@@ -2155,7 +2155,7 @@
index_number < dependencies->prim_reference_ids->count();
index_number++)
{
- if (idx->idx_id == (UCHAR) (*dependencies->prim_reference_ids)
-+ if (idx->idx_id == (IPTR) (*dependencies->prim_reference_ids)
++ if (idx->idx_id == (UCHAR)(size_t) (*dependencies->prim_reference_ids)
[index_number])
{
idx->idx_foreign_primaries =
-@@ -4182,10 +4182,10 @@
- {
- if ( (node = csb_->csb_rpt[i].csb_message) )
- {
-- if ((int) node->nod_arg[e_msg_number] == 0)
-+ if ((IPTR) node->nod_arg[e_msg_number] == 0)
- {
- procedure->prc_input_msg = node;
-- } else if ((int) node->nod_arg[e_msg_number] == 1)
-+ } else if ((IPTR) node->nod_arg[e_msg_number] == 1)
- {
- procedure->prc_output_msg = node;
- }
-@@ -6141,7 +6141,7 @@
+@@ -4542,7 +4542,7 @@
node = (JRD_NOD) LLS_POP(&csb->csb_dependencies);
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/Firebird-gcc4.patch?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list