List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:June 1 2007 11:03pm
Subject:bk commit into 6.0-falcon tree (jas:1.2532)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When  does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-01 17:02:52-04:00, jas@rowvwade. +38 -0
  Work in progress on Win64 build.

  storage/falcon/Bitmap.cpp@stripped, 2007-06-01 17:02:29-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/CompiledStatement.cpp@stripped, 2007-06-01 17:02:30-04:00, jas@rowvwade. +1
-1
    Work in progress on Win64 build.

  storage/falcon/DataPage.cpp@stripped, 2007-06-01 17:02:30-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/Database.cpp@stripped, 2007-06-01 17:02:30-04:00, jas@rowvwade. +4 -4
    Work in progress on Win64 build.

  storage/falcon/Hdr.cpp@stripped, 2007-06-01 17:02:31-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/ImageManager.cpp@stripped, 2007-06-01 17:02:31-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/Images.cpp@stripped, 2007-06-01 17:02:32-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/Index.cpp@stripped, 2007-06-01 17:02:32-04:00, jas@rowvwade. +2 -1
    Work in progress on Win64 build.

  storage/falcon/Index2Page.cpp@stripped, 2007-06-01 17:02:32-04:00, jas@rowvwade. +20 -19
    Work in progress on Win64 build.

  storage/falcon/Index2RootPage.cpp@stripped, 2007-06-01 17:02:33-04:00, jas@rowvwade. +2 -2
    Work in progress on Win64 build.

  storage/falcon/IndexKey.cpp@stripped, 2007-06-01 17:02:33-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/IndexPage.cpp@stripped, 2007-06-01 17:02:33-04:00, jas@rowvwade. +18 -17
    Work in progress on Win64 build.

  storage/falcon/IndexRootPage.cpp@stripped, 2007-06-01 17:02:34-04:00, jas@rowvwade. +2 -2
    Work in progress on Win64 build.

  storage/falcon/Interlock.h@stripped, 2007-06-01 17:02:34-04:00, jas@rowvwade. +6 -1
    Work in progress on Win64 build.

  storage/falcon/InversionPage.cpp@stripped, 2007-06-01 17:02:34-04:00, jas@rowvwade. +21 -9
    Work in progress on Win64 build.

  storage/falcon/InversionWord.cpp@stripped, 2007-06-01 17:02:35-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/JString.cpp@stripped, 2007-06-01 17:02:35-04:00, jas@rowvwade. +7 -7
    Work in progress on Win64 build.

  storage/falcon/Log.cpp@stripped, 2007-06-01 17:02:36-04:00, jas@rowvwade. +2 -2
    Work in progress on Win64 build.

  storage/falcon/Parameter.cpp@stripped, 2007-06-01 17:02:36-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/Parameters.cpp@stripped, 2007-06-01 17:02:36-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/QueryString.cpp@stripped, 2007-06-01 17:02:37-04:00, jas@rowvwade. +19 -4
    Work in progress on Win64 build.

  storage/falcon/Record.cpp@stripped, 2007-06-01 17:02:37-04:00, jas@rowvwade. +6 -6
    Work in progress on Win64 build.

  storage/falcon/Registry.cpp@stripped, 2007-06-01 17:02:37-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/RepositoryManager.cpp@stripped, 2007-06-01 17:02:38-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/RepositoryVolume.cpp@stripped, 2007-06-01 17:02:38-04:00, jas@rowvwade. +4 -4
    Work in progress on Win64 build.

  storage/falcon/ResultList.cpp@stripped, 2007-06-01 17:02:38-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/ResultSetMetaData.cpp@stripped, 2007-06-01 17:02:39-04:00, jas@rowvwade. +2 -1
    Work in progress on Win64 build.

  storage/falcon/RoleModel.cpp@stripped, 2007-06-01 17:02:39-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/Scan.cpp@stripped, 2007-06-01 17:02:39-04:00, jas@rowvwade. +3 -3
    Work in progress on Win64 build.

  storage/falcon/Section.cpp@stripped, 2007-06-01 17:02:40-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/SequenceManager.cpp@stripped, 2007-06-01 17:02:40-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/SerialLog.cpp@stripped, 2007-06-01 17:02:40-04:00, jas@rowvwade. +10 -10
    Work in progress on Win64 build.

  storage/falcon/SerialLogControl.cpp@stripped, 2007-06-01 17:02:41-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/SerialLogRecord.cpp@stripped, 2007-06-01 17:02:41-04:00, jas@rowvwade. +3 -3
    Work in progress on Win64 build.

  storage/falcon/SerialLogTransaction.cpp@stripped, 2007-06-01 17:02:42-04:00, jas@rowvwade.
+2 -2
    Work in progress on Win64 build.

  storage/falcon/SerialLogWindow.cpp@stripped, 2007-06-01 17:02:42-04:00, jas@rowvwade. +5 -5
    Work in progress on Win64 build.

  storage/falcon/Socket.cpp@stripped, 2007-06-01 17:02:42-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

  storage/falcon/Socket.h@stripped, 2007-06-01 17:02:43-04:00, jas@rowvwade. +1 -1
    Work in progress on Win64 build.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jas
# Host:	rowvwade.
# Root:	D:/MySQL/mysql-5.1-falcon-vs8

--- 1.15/storage/falcon/Index2Page.cpp	2007-06-01 17:03:15 -04:00
+++ 1.16/storage/falcon/Index2Page.cpp	2007-06-01 17:03:15 -04:00
@@ -121,7 +121,7 @@
 	if (offset2 >= 0)
 		{
 		UCHAR *tail = (UCHAR*) node.nextNode;
-		int tailLength = (UCHAR*) this + length - tail;
+		int tailLength = (int) ((UCHAR*) this + length - tail);
 		ASSERT (tailLength >= 0);
 		
 		if (tailLength > 0)
@@ -212,7 +212,7 @@
 				goto exit;
 			}
 			
-		offset = p - key;
+		offset = (int) (p - key);
 		
 		if (expandedKey)
 			{
@@ -292,12 +292,12 @@
 	if ((UCHAR*) node.nextNode > (UCHAR*) this + length)
 		node = prevNode;
 
-	int tailLength = ((UCHAR*) this + length) - (UCHAR*) node.nextNode;
+	int tailLength = (int) (((UCHAR*) this + length) - (UCHAR*) node.nextNode);
 
 	if (tailLength < 0)
 		{
 		node.parseNode(nodes);
-		tailLength = ((UCHAR*) this + length) - (UCHAR*) node.nextNode;
+		tailLength = (int) (((UCHAR*) this + length) - (UCHAR*) node.nextNode);
 		}
 
 	// If we didn't find a break, use the last one.  This may be the first node
@@ -324,10 +324,10 @@
 
 	//node.setNumber (END_BUCKET);
 	node.insert(node.node, node.offset, node.length, key, END_BUCKET);
-	length = (UCHAR*) node.nextNode - (UCHAR*) this;
+	length = (int) ((UCHAR*) node.nextNode - (UCHAR*) this);
 
 	//validate(split);
-	split->length = ((UCHAR*) newNode.nextNode + tailLength) - (UCHAR*) split;
+	split->length = (int) (((UCHAR*) newNode.nextNode + tailLength) - (UCHAR*) split);
 	//split->validate(this);
 
 	if (dbb->debug & (DEBUG_PAGES | DEBUG_SPLIT_PAGE))
@@ -382,7 +382,7 @@
 				return prior;	// searchKey <= node, return prior
 			}
 
-		offset = p - key;
+		offset = (int) (p - key);
 		}
 
 	return prior;
@@ -476,7 +476,7 @@
 	IndexKey priorKey;
 	Index2Node node (findNode (indexKey, &priorKey));
 	Btn *bucketEnd = (Btn*) ((char*) this + length);
-	int offset = (char*) node.node - (char*) this;
+	int offset = (int) ((char*) node.node - (char*) this);
 
 	// Make sure we've got an exact hit on key
 
@@ -489,7 +489,7 @@
 
 	for (bool first = true; node.node < bucketEnd; node.getNext(), first = false)
 		{
-		offset = (char*) node.node - (char*) this;
+		offset = (int) ((char*) node.node - (char*) this);
 		
 		if (!first && (node.offset != keyLength || node.length != 0))
 			return -1;
@@ -499,8 +499,9 @@
 		if (number == recordNumber)
 			{
 			Index2Node next (node.nextNode);
+
 			if (next.node >= bucketEnd)
-				length = (char*) node.node - (char*) this;
+				length = (int) ((char*) node.node - (char*) this);
 			else
 				{
 				// Reconstruct following key for recompression
@@ -510,7 +511,7 @@
 				int nextLength = next.offset + next.length;
 
 				Btn *tail = next.nextNode;
-				int tailLength = (char*) bucketEnd - (char*) tail;
+				int tailLength = (int) ((char*) bucketEnd - (char*) tail);
 
 				// Compute new prefix length; rebuild node
 
@@ -524,7 +525,7 @@
 				if (tailLength > 0)
 					memcpy (newTail, tail, tailLength);
 
-				length = (char*) newTail + tailLength - (char*) this;
+				length = (int) ((char*) newTail + tailLength - (char*) this);
 				//validate(NULL);
 				}
 				
@@ -566,7 +567,7 @@
 		node.printKey ("", key, inversion);
 		}
 
-	length = (UCHAR*) node.node - (UCHAR*) page;
+	length = (int) ((UCHAR*) node.node - (UCHAR*) page);
 
 	if (length != page->length)
 		Log::debug ("**** bad bucket length -- should be %d ***\n", length);
@@ -785,14 +786,14 @@
 		int number = node.getNumber();
 		//node.setNumber(END_BUCKET);
 		node.insert(node.node, node.offset, node.length, tempKey.key, END_BUCKET);
-		length = (char*) node.nextNode - (char*) this;
+		length = (int) ((char*) node.nextNode - (char*) this);
 		split->appendNode(&tempKey, number, dbb->pageSize);
 		}
 	else
 		{
 		int offset = computePrefix(&tempKey, insertKey);
 		node.insert(node.node, offset, insertKeyLength - offset, insertKey->key,
END_BUCKET);
-		length = (char*)(node.nextNode) - (char*) this;
+		length = (int) ((char*)(node.nextNode) - (char*) this);
 		}
 
 	split->appendNode(insertKey, recordNumber, dbb->pageSize);
@@ -827,7 +828,7 @@
 		throw SQLError (INDEX_OVERFLOW, "Cannot split page; expanded key will not fit");
 
 	node.insert(node.node, offset, newLength - offset, newKey, recordNumber);
-	length = (char*)(node.nextNode) - (char*) this;
+	length = (int) ((char*)(node.nextNode) - (char*) this);
 
 	return node.node;
 }
@@ -848,7 +849,7 @@
 		throw SQLError (INDEX_OVERFLOW, "Cannot split page; expanded key will not fit");
 
 	node.insert(node.node, offset, newKey->keyLength - offset, newKey->key,
recordNumber);
-	length = (char*)(node.nextNode) - (char*) this;
+	length = (int) ((char*)(node.nextNode) - (char*) this);
 
 	return node.node;
 }
@@ -953,7 +954,7 @@
 				goto exit;
 			}
 			
-		offset = p - key;
+		offset = (int) (p - key);
 		node.expandKey (expandedKey);
 		priorLength = node.offset + node.length;
 		}
@@ -1054,7 +1055,7 @@
 				goto exit;
 			}
 			
-		offset = p - key;
+		offset = (int) (p - key);
 		node.expandKey (expandedKey);
 		priorLength = node.offset + node.length;
 		}

--- 1.16/storage/falcon/Index2RootPage.cpp	2007-06-01 17:03:15 -04:00
+++ 1.17/storage/falcon/Index2RootPage.cpp	2007-06-01 17:03:15 -04:00
@@ -413,7 +413,7 @@
 						if (*p++ > *q++)
 							break;
 							
-						offset = p - highKey->key;
+						offset = (int) (p - highKey->key);
 						}
 					}
 				}
@@ -942,7 +942,7 @@
 				if (offset2 >= 0)
 					{
 					UCHAR *tail = (UCHAR*) node.nextNode;
-					int tailLength = (UCHAR*) page + page->length - tail;
+					int tailLength = (int) ((UCHAR*) page + page->length - tail);
 					ASSERT (tailLength >= 0);
 					
 					if (tailLength > 0)

--- 1.10/storage/falcon/Bitmap.cpp	2007-06-01 17:03:15 -04:00
+++ 1.11/storage/falcon/Bitmap.cpp	2007-06-01 17:03:15 -04:00
@@ -690,7 +690,7 @@
 			BitClump clump = *bits;
 			BitClump newClump = clump | mask;
 
-			if (COMPARE_EXCHANGE(bits, clump, newClump))
+			if (COMPARE_EXCHANGE_POINTER(bits, clump, newClump))
 				{
 				INTERLOCKED_INCREMENT(segment->count);
 				INTERLOCKED_INCREMENT(count);

--- 1.12/storage/falcon/CompiledStatement.cpp	2007-06-01 17:03:15 -04:00
+++ 1.13/storage/falcon/CompiledStatement.cpp	2007-06-01 17:03:15 -04:00
@@ -1260,5 +1260,5 @@
 
 	*p = 0;
 
-	return JString(temp, p - temp);
+	return JString(temp, (int) (p - temp));
 }

--- 1.19/storage/falcon/DataPage.cpp	2007-06-01 17:03:16 -04:00
+++ 1.20/storage/falcon/DataPage.cpp	2007-06-01 17:03:16 -04:00
@@ -234,7 +234,7 @@
 			used += ABS (line->length);
 			}
 		else if (id == -1)
-			id = line - lineIndex;
+			id = (int) (line - lineIndex);
 
 	if (id == -1)
 		{

--- 1.64/storage/falcon/Database.cpp	2007-06-01 17:03:16 -04:00
+++ 1.65/storage/falcon/Database.cpp	2007-06-01 17:03:16 -04:00
@@ -93,7 +93,7 @@
 #endif
 
 #define TRANSACTION_ID(transaction)		((transaction) ? transaction->transactionId : 0)
-#define HASH(address,size)				(((UIPTR) address >> 2) % size)
+#define HASH(address,size)				(int)(((UIPTR) address >> 2) % size)
 #define EXPIRATION_DAYS					180
 
 #define STATEMENT_RETIREMENT_AGE	60
@@ -542,7 +542,7 @@
 void Database::createDatabase(const char * filename)
 {
 	const char *p = strrchr(filename, '.');
-	JString logRoot = (p) ? JString(filename, p - filename) : name;
+	JString logRoot = (p) ? JString(filename, (int) (p - filename)) : name;
 	
 #ifdef STORAGE_ENGINE
 	int page_size = falcon_page_size;
@@ -614,7 +614,7 @@
 	if (dbb->logRoot.IsEmpty())
 		{
 		const char *p = strrchr(filename, '.');
-		dbb->logRoot = (p) ? JString(filename, p - filename) : name;
+		dbb->logRoot = (p) ? JString(filename, (int) (p - filename)) : name;
 		}
 		
 	if (serialLog)
@@ -631,7 +631,7 @@
 			catch (SQLException&)
 				{
 				const char *p = strrchr(filename, '.');
-				JString logRoot = (p) ? JString(filename, p - filename) : name;
+				JString logRoot = (p) ? JString(filename, (int) (p - filename)) : name;
 				bool failed = true;
 				
 				try

--- 1.10/storage/falcon/Hdr.cpp	2007-06-01 17:03:16 -04:00
+++ 1.11/storage/falcon/Hdr.cpp	2007-06-01 17:03:16 -04:00
@@ -63,7 +63,7 @@
 	header->haveIndexVersionNumber = true;
 	
 	if (logRoot)
-		header->putHeaderVariable(dbb, hdrLogPrefix, strlen(logRoot), logRoot);
+		header->putHeaderVariable(dbb, hdrLogPrefix, (int) strlen(logRoot), logRoot);
 		
 	bdb->release();
 }

--- 1.7/storage/falcon/ImageManager.cpp	2007-06-01 17:03:16 -04:00
+++ 1.8/storage/falcon/ImageManager.cpp	2007-06-01 17:03:16 -04:00
@@ -35,7 +35,7 @@
 #include "Transaction.h"
 #include "SQLError.h"
 
-#define HASH(address,size)				(((UIPTR) address >> 2) % size)
+#define HASH(address,size)				(int)(((UIPTR) address >> 2) % size)
 
 static const char *ddl [] = {
 	"upgrade table Images (\

--- 1.4/storage/falcon/Images.cpp	2007-06-01 17:03:16 -04:00
+++ 1.5/storage/falcon/Images.cpp	2007-06-01 17:03:16 -04:00
@@ -31,7 +31,7 @@
 #include "ResultSet.h"
 #include "Sync.h"
 
-#define HASH(address,size)				(((UIPTR) address >> 2) % size)
+#define HASH(address,size)				(int)(((UIPTR) address >> 2) % size)
 
 #ifdef _DEBUG
 #undef THIS_FILE

--- 1.50/storage/falcon/Index.cpp	2007-06-01 17:03:16 -04:00
+++ 1.51/storage/falcon/Index.cpp	2007-06-01 17:03:16 -04:00
@@ -300,7 +300,8 @@
 			while (q > key && q[-1] == ' ')
 				--q;
 
-			indexKey->keyLength = q - key;
+			indexKey->keyLength = (int) (q - key);
+
 			return ;
 			}
 

--- 1.24/storage/falcon/IndexKey.cpp	2007-06-01 17:03:16 -04:00
+++ 1.25/storage/falcon/IndexKey.cpp	2007-06-01 17:03:16 -04:00
@@ -128,7 +128,7 @@
 
 	// Finally, readjust the length of the key being built.
 
-	keyLength = p - key;
+	keyLength = (int) (p - key);
 }
 
 void IndexKey::appendRecordNumber(int32 recordNum)

--- 1.50/storage/falcon/IndexPage.cpp	2007-06-01 17:03:16 -04:00
+++ 1.51/storage/falcon/IndexPage.cpp	2007-06-01 17:03:16 -04:00
@@ -121,7 +121,7 @@
 	if (offset2 >= 0)
 		{
 		UCHAR *tail = (UCHAR*) node.nextNode;
-		int tailLength = (UCHAR*) this + length - tail;
+		int tailLength = (int) ((UCHAR*) this + length - tail);
 		ASSERT (tailLength >= 0);
 		
 		if (tailLength > 0)
@@ -218,7 +218,7 @@
 				goto exit;
 			}
 			
-		offset = p - key;
+		offset = (int) (p - key);
 		
 		if (foundKey)
 			{
@@ -296,12 +296,12 @@
 	if ((UCHAR*) node.nextNode > (UCHAR*) this + length)
 		node = prevNode;
 
-	int tailLength = ((UCHAR*) this + length) - (UCHAR*) node.nextNode;
+	int tailLength = (int) (((UCHAR*) this + length) - (UCHAR*) node.nextNode);
 
 	if (tailLength < 0)
 		{
 		node.parseNode(nodes);
-		tailLength = ((UCHAR*) this + length) - (UCHAR*) node.nextNode;
+		tailLength = (int) (((UCHAR*) this + length) - (UCHAR*) node.nextNode);
 		}
 
 	// If we didn't find a break, use the last one.  This may be the first node
@@ -327,10 +327,10 @@
 	 * and zap the node "number" to "END_BUCKET" */
 
 	node.insert(node.node, node.offset, node.length, key, END_BUCKET);
-	length = (UCHAR*) node.nextNode - (UCHAR*) this;
+	length = (int) ((UCHAR*) node.nextNode - (UCHAR*) this);
 
 	//validate(split);
-	split->length = ((UCHAR*) newNode.nextNode + tailLength) - (UCHAR*) split;
+	split->length = (int) (((UCHAR*) newNode.nextNode + tailLength) - (UCHAR*) split);
 	//split->validate(this);
 
 	if (level == 0)
@@ -399,7 +399,7 @@
 				return prior;
 			}
 
-		matchedOffset = p - key;
+		matchedOffset = (int) (p - key);
 		}
 
 	return prior;
@@ -507,7 +507,7 @@
 	IndexKey priorKey;
 	IndexNode node (findNodeInLeaf (indexKey, &priorKey));
 	Btn *bucketEnd = (Btn*) ((char*) this + length);
-	int offset = (char*) node.node - (char*) this;
+	int offset = (int) ((char*) node.node - (char*) this);
 
 	// Make sure we've got an exact hit on key
 
@@ -520,7 +520,7 @@
 
 	for (bool first = true; node.node < bucketEnd; node.getNext(), first = false)
 		{
-		offset = (char*) node.node - (char*) this;
+		offset = (int) ((char*) node.node - (char*) this);
 		
 		if (!first && (node.offset != keyLength || node.length != 0))
 			return -1;
@@ -531,7 +531,7 @@
 			{
 			IndexNode next (node.nextNode);
 			if (next.node >= bucketEnd)
-				length = (char*) node.node - (char*) this;
+				length = (int) ((char*) node.node - (char*) this);
 			else
 				{
 				// Reconstruct following key for recompression
@@ -541,7 +541,7 @@
 				nextKey.keyLength = next.offset + next.length;
 
 				Btn *tail = next.nextNode;
-				int tailLength = (char*) bucketEnd - (char*) tail;
+				int tailLength = (int) ((char*) bucketEnd - (char*) tail);
 
 				// Compute new prefix length; rebuild node
 
@@ -555,7 +555,7 @@
 				if (tailLength > 0)
 					memcpy (newTail, tail, tailLength);
 
-				length = (char*) newTail + tailLength - (char*) this;
+				length = (int) ((char*) newTail + tailLength - (char*) this);
 				//validate(NULL);
 				}
 				
@@ -597,7 +597,7 @@
 		node.printKey ("", key, inversion);
 		}
 
-	length = (UCHAR*) node.node - (UCHAR*) page;
+	length = (int) ((UCHAR*) node.node - (UCHAR*) page);
 
 	if (length != page->length)
 		Log::debug ("**** bad bucket length -- should be %d ***\n", length);
@@ -815,14 +815,14 @@
 		int number = node.getNumber();
 		//node.setNumber(END_BUCKET);
 		node.insert(node.node, node.offset, node.length, tempKey.key, END_BUCKET);
-		length = (char*) node.nextNode - (char*) this;
+		length = (int) ((char*) node.nextNode - (char*) this);
 		split->appendNode(&tempKey, number, dbb->pageSize);
 		}
 	else
 		{
 		int offset = computePrefix(&tempKey, insertKey);
 		node.insert(node.node, offset, insertKey->keyLength - offset, insertKey->key,
END_BUCKET);
-		length = (char*)(node.nextNode) - (char*) this;
+		length = (int) ((char*)(node.nextNode) - (char*) this);
 		}
 
 	split->appendNode(insertKey, recordNumber, dbb->pageSize);
@@ -857,7 +857,7 @@
 		throw SQLError (INDEX_OVERFLOW, "Cannot split page; expanded key will not fit");
 
 	node.insert(node.node, offset, newKey->keyLength - offset, newKey->key,
recordNumber);
-	length = (char*)(node.nextNode) - (char*) this;
+	length = (int) ((char*)(node.nextNode) - (char*) this);
 
 	return node.node;
 }
@@ -1012,8 +1012,9 @@
 				goto exit;		// key < node, use this node.
 			}
 			
-		matchedOffset = p - key;
+		matchedOffset = (int) (p - key);
 		node.expandKey (expandedKey);
+
 		if (level)
 			expandedKey->recordNumber = node.getAppendedRecordNumber();
 

--- 1.64/storage/falcon/IndexRootPage.cpp	2007-06-01 17:03:16 -04:00
+++ 1.65/storage/falcon/IndexRootPage.cpp	2007-06-01 17:03:16 -04:00
@@ -435,7 +435,7 @@
 						if (*p++ > *q++)
 							break;
 							
-						offset = p - highKey->key;
+						offset = (int) (p - highKey->key);
 						}
 					}
 				}
@@ -969,7 +969,7 @@
 				if (offset2 >= 0)
 					{
 					UCHAR *tail = (UCHAR*) node.nextNode;
-					int tailLength = (UCHAR*) page + page->length - tail;
+					int tailLength = (int) ((UCHAR*) page + page->length - tail);
 					ASSERT (tailLength >= 0);
 					
 					if (tailLength > 0)

--- 1.8/storage/falcon/Interlock.h	2007-06-01 17:03:16 -04:00
+++ 1.9/storage/falcon/Interlock.h	2007-06-01 17:03:16 -04:00
@@ -25,8 +25,11 @@
 	(InterlockedCompareExchange(target,exchange,compare)==compare)
 
 #ifdef _WIN64
+#include <intrin.h>
 #define COMPARE_EXCHANGE_POINTER(target,compare,exchange)\
 	(InterlockedCompareExchangePointer((void *volatile*)
target,(void*)exchange,(void*)compare)==(void*)compare)
+#define InterlockedCompareExchangePointer	_InterlockedCompareExchangePointer
+void* _InterlockedCompareExchangePointer(void *volatile *Destination, void *Exchange,
void *Comperand);
 #else
 #define COMPARE_EXCHANGE_POINTER(target,compare,exchange)\
 	(InterlockedCompareExchange((volatile int*)
target,(int)exchange,(int)compare)==(int)compare)
@@ -41,13 +44,15 @@
 //#define InterlockedCompareExchangePointer	_InterlockedCompareExchangePointer
 #endif
 
+#ifndef __MACHINEX64
 extern "C" 
 	{
 	long  InterlockedIncrement(long* lpAddend);
 	long  InterlockedDecrement(long* lpAddend);
 	long  InterlockedCompareExchange(volatile int *Destination, int Exchange, int
Comperand);
-	//void* InterlockedCompareExchangePointer(void *volatile*, void *Destination, void
*Exchange, void *Comperand);
+	//void* InterlockedCompareExchangePointer(void *volatile* *Destination, void *Exchange,
void *Comperand);
 	}
+#endif
 
 #pragma intrinsic(_InterlockedIncrement)
 #pragma intrinsic(_InterlockedDecrement)

--- 1.13/storage/falcon/InversionPage.cpp	2007-06-01 17:03:16 -04:00
+++ 1.14/storage/falcon/InversionPage.cpp	2007-06-01 17:03:16 -04:00
@@ -99,8 +99,9 @@
 	if (l2 >= 0)
 		{
 		UCHAR *tail = (UCHAR*) NEXT_INV (node);
-		int tailLength = (UCHAR*) this + length - tail;
+		int tailLength = (int) ((UCHAR*) this + length - tail);
 		ASSERT (tailLength >= 0);
+
 		if (tailLength > 0)
 			memmove (tail + delta, tail, tailLength);
 		}
@@ -155,28 +156,39 @@
 				printPage (0);
 				FATAL ("InversionPage findNode: trashed inversion page");
 				}
+
 			if (expandedLength)
 				*expandedLength = priorLength;
+
 			return bucketEnd;
 			}
+
 		int l = node->length;
+
 		if (node->offset < offset)
 			break;
+
 		if (node->offset > offset || l == 0)
 			continue;
+
 		UCHAR *p = key + node->offset;
 		UCHAR *q = node->key;
 		UCHAR *nodeEnd = q + l;
+
 		for (;;)
 			{
 			if (p == keyEnd)
 				goto exit;
+
 			if (q == nodeEnd || *p > *q)
 				break;
+
 			if (*p++ < *q++)
 				goto exit;
 			}
-		offset = p - key;
+
+		offset = (int) (p - key);
+
 		if (expandedKey && l)
 			{
 			memcpy (expandedKey + node->offset, node->key, l);
@@ -240,12 +252,12 @@
 	newNode->offset = 0;
 	newNode->length = (UCHAR) kLength;
 	memcpy (newNode->key, key, kLength);
-	int tailLength = ((UCHAR*) this + length) - (UCHAR*) NEXT_INV (node);
+	int tailLength = (int) (((UCHAR*) this + length) - (UCHAR*) NEXT_INV (node));
 	memcpy (NEXT_INV (newNode), NEXT_INV (node), tailLength);
 
-	length = (UCHAR*) node - (UCHAR*) this;
+	length = (int) ((UCHAR*) node - (UCHAR*) this);
 	//validate();
-	split->length = (newNode->key + newNode->length + tailLength) - (UCHAR*) split;
+	split->length = (int) ((newNode->key + newNode->length + tailLength) - (UCHAR*)
split);
 	//split->validate();
 
 	return splitBdb;
@@ -280,7 +292,7 @@
 		Log::debug ("\n");
 		}
 
-	int len = (UCHAR*) node - (UCHAR*) this;
+	int len = (int) ((UCHAR*) node - (UCHAR*) this);
 
 	if (len != length)
 		{
@@ -481,7 +493,7 @@
 
 	if ((char*) next >= pageEnd)
 		{
-		length = (char*) node - (char*) this;
+		length = (int) ((char*) node - (char*) this);
 		//validate();
 		return;
 		}
@@ -502,7 +514,7 @@
 	// Slide down everything else
 
 	char *newEnd = (char*) NEXT_INV (node);
-	int tailLength = pageEnd - tail;
+	int tailLength = (int) (pageEnd - tail);
 
 	if (tailLength > 0)
 		{
@@ -510,7 +522,7 @@
 		newEnd += tailLength;
 		}
 
-	length = newEnd - (char*) this;
+	length = (int) (newEnd - (char*) this);
 }
 
 void Inv::printKey(int length, UCHAR *key)

--- 1.3/storage/falcon/InversionWord.cpp	2007-06-01 17:03:16 -04:00
+++ 1.4/storage/falcon/InversionWord.cpp	2007-06-01 17:03:16 -04:00
@@ -69,7 +69,7 @@
 
 	ASSERT (p - key <= MAX_INV_KEY);
 
-	return p - key;
+	return (int) (p - key);
 }
 
 

--- 1.7/storage/falcon/JString.cpp	2007-06-01 17:03:16 -04:00
+++ 1.8/storage/falcon/JString.cpp	2007-06-01 17:03:16 -04:00
@@ -135,8 +135,8 @@
 
 	char *temp = string;
 	++((int*) temp)[-1];
-	int l1 = strlen (temp);
-	int	l2 = strlen (stuff);
+	int l1 = (int) strlen (temp);
+	int	l2 = (int) strlen (stuff);
 	release();
 	alloc (l1 + l2);
 	memcpy (string, temp, l1);
@@ -161,7 +161,7 @@
  **************************************/
 
 	if (stuff)
-		setString (stuff, strlen (stuff));
+		setString (stuff, (int) strlen (stuff));
 	else
 		release();
 }
@@ -350,7 +350,7 @@
 		return *this;
 
 	JString stuff;
-	stuff.setString (string, p - string);
+	stuff.setString (string, (int) (p - string));
 
 	return stuff;
 }
@@ -433,7 +433,7 @@
 			;
 			
 		if (!*s)
-			return p - string;
+			return (int) (p - string);
 		}
 
 	return -1;
@@ -442,7 +442,7 @@
 JString JString::upcase(const char * source)
 {
 	JString string;
-	int len = strlen (source);
+	int len = (int) strlen (source);
 	string.alloc (len);
 	
 	for (int n = 0; n < len; ++n)
@@ -517,7 +517,7 @@
 	for (p = string; *p; ++p)
 		;
 
-	return p - string;
+	return (int) (p - string);
 }
 
 JString::JString(const char * source, int length)

--- 1.11/storage/falcon/Log.cpp	2007-06-01 17:03:16 -04:00
+++ 1.12/storage/falcon/Log.cpp	2007-06-01 17:03:16 -04:00
@@ -199,7 +199,7 @@
 
 	if ((mask & LogScrub) && symbols)
 		{
-		int l = strlen (text) + 30;
+		int l = (int) strlen (text) + 30;
 		
 		if (l > (int) sizeof (temp))
 			scrubbed = new char [l];
@@ -217,7 +217,7 @@
 			else if (parameter && (c == '='))
 				{
 				char word [128];
-				l = p - parameter - 1;
+				l = (int) (p - parameter) - 1;
 				
 				if (l < (int) sizeof (word) - 1)
 					{

--- 1.3/storage/falcon/Parameter.cpp	2007-06-01 17:03:16 -04:00
+++ 1.4/storage/falcon/Parameter.cpp	2007-06-01 17:03:16 -04:00
@@ -60,7 +60,7 @@
 		return;
 
 	char *oldName = name;
-	valueLength = strlen (newValue);
+	valueLength = (int) strlen (newValue);
 	name = new char [nameLength + valueLength + 2];
 	memcpy (name, oldName, nameLength);
 	name [nameLength] = 0;

--- 1.3/storage/falcon/Parameters.cpp	2007-06-01 17:03:16 -04:00
+++ 1.4/storage/falcon/Parameters.cpp	2007-06-01 17:03:16 -04:00
@@ -48,7 +48,7 @@
 
 void Parameters::putValue(const char * name, const char * value)
 {
-	putValue (name, strlen (name), value, strlen (value));
+	putValue (name, (int) strlen (name), value, (int) strlen (value));
 }
 
 void Parameters::putValue(const char * name, int nameLength, const char * value, int
valueLength)

--- 1.5/storage/falcon/QueryString.cpp	2007-06-01 17:03:16 -04:00
+++ 1.6/storage/falcon/QueryString.cpp	2007-06-01 17:03:16 -04:00
@@ -72,7 +72,7 @@
 
 int QueryString::getParameter(const char * queryString, const char * name, int
bufferLength, char * buffer)
 {
-	int l = strlen (name);
+	int l = (int) strlen (name);
 	char *q = buffer;
 	char *end = q + bufferLength;
 
@@ -81,6 +81,7 @@
 		if (!strncmp (p, name, l) && p [l] == '=')
 			{
 			p += l + 1;
+
 			for (char c; (c = *p++) && c != '&';)
 				{
 				if (c == '+')
@@ -88,6 +89,7 @@
 				else if (c == '%')
 					{
 					char hex = 0;
+
 					for (int n = 0; (c = *p) && n < 2; ++n, ++p)
 						if (ISDIGIT (c))
 							hex = hex * 16 + c - '0';
@@ -97,7 +99,9 @@
 							hex = hex * 16 + c - 'A' + 10;
 						else
 							break;
+
 					c = hex;
+
 					if (c == '\r')
 						continue;
 					}
@@ -106,10 +110,13 @@
 				else
 					++q;
 				}
+
 			if (q < end)
 				*q = 0;
-			return q - buffer;
+
+			return (int) (q - buffer);
 			}
+
 		while (*p && *p++ != '&')
 			;
 		}
@@ -149,24 +156,28 @@
 		queryString = "";
 
 	memset (variables, 0, sizeof (variables));
-	uint32 length = strlen (queryString);
+	uint32 length = (uint32) strlen (queryString);
 	char buffer [256];
 	char *temp = (length + 2 < sizeof (buffer)) ? buffer : new char [length + 2];
 
 	for (const char *p = queryString; *p;)
 		{
 		char c, *q = temp;
+
 		while (*p && (c = *p++) != '=')
 			{
 			if (c == '+')
 				c = ' ';
 			else if (c == '%')
 				c = getHex (&p);
+
 			*q++ = c;
 			}
+
 		*q++ = 0;
 		char *value = q;
 		bool quote = false;
+
 		while (*p && (((c = *p++) != '&') || quote))
 			{
 			if (c == '+')
@@ -179,8 +190,10 @@
 					continue;
 				***/
 				}
+
 			*q++ = c;
 			}
+
 		*q = 0;
 		int slot = JString::hash (temp, QUERY_HASH_SIZE);
 		Parameter **ptr;
@@ -191,11 +204,13 @@
 				{
 				for (ptr = &parameter->next; *ptr; ptr = &(*ptr)->next)
 					;
+
 				break;
 				}
 			;
+
 		//printf ("%*s: %*s\n", strlen (temp), temp, strlen (value), value);
-		*ptr = new Parameter (NULL, temp, strlen (temp), value, strlen (value));
+		*ptr = new Parameter (NULL, temp, (int) strlen (temp), value, (int) strlen (value));
 		}
 
 	if (temp != buffer)

--- 1.43/storage/falcon/Record.cpp	2007-06-01 17:03:16 -04:00
+++ 1.44/storage/falcon/Record.cpp	2007-06-01 17:03:16 -04:00
@@ -648,7 +648,7 @@
 				while (highWater < index)
 					{
 					const UCHAR *q = EncodedDataStream::skip(p);
-					vector[++highWater] = q - (UCHAR*) data.record;
+					vector[++highWater] = (USHORT) (q - (UCHAR*) data.record);
 					p = q;
 					}
 				}
@@ -657,7 +657,7 @@
 			const UCHAR *q = EncodedDataStream::decode((UCHAR*) data.record + vector[index],
value, false);
 
 			if (++index < format->count && highWater < index)
-				vector[++highWater] = q - (UCHAR*) data.record;
+				vector[++highWater] = (USHORT) (q - (UCHAR*) data.record);
 
 			return;
 			}
@@ -708,7 +708,7 @@
 	char *dataBuffer = ALLOCATE_RECORD(totalLength);
 	memset(dataBuffer, 0, vectorLength);
 	stream->getSegment(0, stream->totalLength, dataBuffer + vectorLength);
-	((USHORT*)dataBuffer)[0] = vectorLength + sizeof(short);
+	((USHORT*)dataBuffer)[0] = (USHORT) (vectorLength + sizeof(short));
 	
 	highWater = 0;
 	size +=  vectorLength + stream->totalLength;
@@ -759,7 +759,7 @@
 				while (highWater < index)
 					{
 					const UCHAR *q = EncodedDataStream::skip(p);
-					vector[++highWater] = q - (UCHAR*) data.record;
+					vector[++highWater] = (USHORT) (q - (UCHAR*) data.record);
 					p = q;
 					}
 				}
@@ -794,7 +794,7 @@
 				while (highWater < index)
 					{
 					const UCHAR *q = EncodedDataStream::skip(p);
-					vector[++highWater] = q - (UCHAR*) data.record;
+					vector[++highWater] = (USHORT) (q - (UCHAR*) data.record);
 					p = q;
 					}
 				}
@@ -859,7 +859,7 @@
 	memset(dataBuffer, 0, vectorLength);
 	memcpy(dataBuffer + vectorLength, dataIn, dataLength);
 	
-	((USHORT*) dataBuffer)[0] = vectorLength + sizeof(short);
+	((USHORT*) dataBuffer)[0] = (USHORT) (vectorLength + sizeof(short));
 	
 	highWater = 0;
 	setAgeGroup();

--- 1.7/storage/falcon/Registry.cpp	2007-06-01 17:03:16 -04:00
+++ 1.8/storage/falcon/Registry.cpp	2007-06-01 17:03:16 -04:00
@@ -123,7 +123,7 @@
 	if (ret != ERROR_SUCCESS)
 		throw SQLError (RUNTIME_ERROR, "RegCreateKey failed creating \"%s\"", keyString);
 		
-	ret = RegSetValue (key, SUB_KEY, REG_SZ, expandedName, strlen (expandedName));
+	ret = RegSetValue (key, SUB_KEY, REG_SZ, expandedName, (int) strlen (expandedName));
 
 	if (ret != ERROR_SUCCESS)
 		throw SQLError (RUNTIME_ERROR, "RegSetValue failed setting \"%s\"", expandedName);

--- 1.3/storage/falcon/RepositoryManager.cpp	2007-06-01 17:03:16 -04:00
+++ 1.4/storage/falcon/RepositoryManager.cpp	2007-06-01 17:03:16 -04:00
@@ -29,7 +29,7 @@
 #include "SQLError.h"
 #include "Sync.h"
 
-#define HASH(address,size)				(((UIPTR) address >> 2) % size)
+#define HASH(address,size)				(int)(((UIPTR) address >> 2) % size)
 
 static const char *schedule = "7 1,6,11,16,21,26,31,36,41,46,51,56";
 

--- 1.13/storage/falcon/RepositoryVolume.cpp	2007-06-01 17:03:16 -04:00
+++ 1.14/storage/falcon/RepositoryVolume.cpp	2007-06-01 17:03:16 -04:00
@@ -218,7 +218,7 @@
 	bdb->mark (0);
 	Hdr *header = (Hdr*) bdb->buffer;
 	header->volumeNumber = volumeNumber;
-	header->putHeaderVariable (dbb, hdrRepositoryName, strlen (repository->name),
repository->name);
+	header->putHeaderVariable (dbb, hdrRepositoryName, (int) strlen
(repository->name), repository->name);
 	bdb->release();
 	dbb->flush();
 	isWritable = true;
@@ -256,7 +256,7 @@
 	while (p > key && p [-1] == 0)
 		--p;
 
-	return indexKey->keyLength = p - key;
+	return indexKey->keyLength = (int) (p - key);
 }
 
 
@@ -407,10 +407,10 @@
 		sync.lock(Shared);
 		}
 
-	Bdb *bdb = dbb->fetchPage (HEADER_PAGE, PAGE_header, Exclusive);
+	Bdb *bdb = dbb->fetchPage(HEADER_PAGE, PAGE_header, Exclusive);
 	bdb->mark (0);
 	Hdr *header = (Hdr*) bdb->buffer;
-	header->putHeaderVariable (dbb, hdrRepositoryName, strlen (name), name);
+	header->putHeaderVariable(dbb, hdrRepositoryName, (int) strlen(name), name);
 	bdb->release();
 }
 

--- 1.5/storage/falcon/ResultList.cpp	2007-06-01 17:03:16 -04:00
+++ 1.6/storage/falcon/ResultList.cpp	2007-06-01 17:03:16 -04:00
@@ -113,7 +113,7 @@
 		if (database->getTable (hit->tableId))
 			*ptr++ = hit;
 
-	int size = count = ptr - records;
+	int size = count = (int) (ptr - records);
 	int i, j, r, stack = 0;
 	int low [128];
 	int high [128];

--- 1.3/storage/falcon/ResultSetMetaData.cpp	2007-06-01 17:03:16 -04:00
+++ 1.4/storage/falcon/ResultSetMetaData.cpp	2007-06-01 17:03:16 -04:00
@@ -117,7 +117,8 @@
 			}
 		else if (c == '?')
 			{
-			stream.putSegment (p - sql, sql, true);
+			stream.putSegment ((int) (p - sql), sql, true);
+
 			if (n < count)
 				{
 				char *temp;

--- 1.5/storage/falcon/RoleModel.cpp	2007-06-01 17:03:16 -04:00
+++ 1.6/storage/falcon/RoleModel.cpp	2007-06-01 17:03:16 -04:00
@@ -39,7 +39,7 @@
 #include "CoterieRange.h"
 #endif
 
-#define HASH(address,size)				(((UIPTR) address >> 2) % size)
+#define HASH(address,size)				(int)(((UIPTR) address >> 2) % size)
 
 static const char* ddl [] = 
 	{

--- 1.4/storage/falcon/Scan.cpp	2007-06-01 17:03:16 -04:00
+++ 1.5/storage/falcon/Scan.cpp	2007-06-01 17:03:16 -04:00
@@ -339,7 +339,7 @@
 		}
 
 	*p = 0;
-	keyLength = p - key;
+	keyLength = (int) (p - key);
 	frequentWord = searchWords->isStopWord ((const char*) key);		
 }
 
@@ -388,7 +388,7 @@
 	for (int n = 0; n < 4; ++n)
 		Inv::encode (numbers [n], &p);
 
-	int length = p - key;
+	int length = (int) (p - key);
 	IndexKey indexKey(length, key);
 	Bdb *bdb = inversion->findInversion (&indexKey, Shared);
 
@@ -445,7 +445,7 @@
 	for (int n = 0; n < 3; ++n)
 		Inv::encode (wordNumbers [n], &p);
 
-	int length = p - key;
+	int length = (int) (p - key);
 	IndexKey indexKey(length, key);
 
 	if (!(bdb = inversion->findInversion (&indexKey, Shared)))

--- 1.47/storage/falcon/Section.cpp	2007-06-01 17:03:16 -04:00
+++ 1.48/storage/falcon/Section.cpp	2007-06-01 17:03:16 -04:00
@@ -563,7 +563,7 @@
 	/* If record won't fit on a page, store the tail on dedicated
 	   pages, leaving only the head on the data page */
 
-	int indexSlot = index - recordLocatorPage->elements;
+	int indexSlot = (int) (index - recordLocatorPage->elements);
 	int length = stream->totalLength;
 	int effectiveLength = length;
 	int maxRecord = OVERFLOW_RECORD_SIZE;

--- 1.5/storage/falcon/SequenceManager.cpp	2007-06-01 17:03:16 -04:00
+++ 1.6/storage/falcon/SequenceManager.cpp	2007-06-01 17:03:16 -04:00
@@ -29,7 +29,7 @@
 
 #include "MemMgr.h"						// debugging only
 
-#define HASH(address,size)				(((UIPTR) address >> 2) % size)
+#define HASH(address,size)				(int)(((UIPTR) address >> 2) % size)
 
 static const char *ddl [] = {
     "create table system.sequences ("

--- 1.76/storage/falcon/SerialLog.cpp	2007-06-01 17:03:16 -04:00
+++ 1.77/storage/falcon/SerialLog.cpp	2007-06-01 17:03:16 -04:00
@@ -385,7 +385,7 @@
 	*writePtr++ = srlEnd | LOW_BYTE_FLAG;
 	writeBlock->blockNumber = nextBlockNumber++;
 	writeBlock->creationTime = (uint32) creationTime;
-	writeBlock->length = writePtr - (UCHAR*) writeBlock;
+	writeBlock->length = (int) (writePtr - (UCHAR*) writeBlock);
 	lastReadBlock = writeBlock->readBlockNumber = getReadBlock();
 
 	// Keep track of what needs to be written
@@ -466,7 +466,7 @@
 	*writePtr++ = srlEnd | LOW_BYTE_FLAG;
 	writeBlock->blockNumber = nextBlockNumber++;
 	writeBlock->creationTime = (uint32) creationTime;
-	writeBlock->length = writePtr - (UCHAR*) writeBlock;
+	writeBlock->length = (int) (writePtr - (UCHAR*) writeBlock);
 	lastReadBlock = writeBlock->readBlockNumber = getReadBlock();
 
 	// Keep track of what needs to be written
@@ -482,8 +482,8 @@
 		writeBlock->blockNumber = nextBlockNumber;
 		writeBlock->readBlockNumber = lastReadBlock;
 		writeBlock->creationTime = (uint32) creationTime;
-		writeBlock->length = writePtr - (UCHAR*) writeBlock;
-		writeWindow->currentLength = writePtr - writeWindow->buffer;
+		writeBlock->length = (int) (writePtr - (UCHAR*) writeBlock);
+		writeWindow->currentLength = (int) (writePtr - writeWindow->buffer);
 		writeWindow->lastBlockNumber = writeBlock->blockNumber;
 		}
 	else
@@ -567,8 +567,8 @@
 		{
 		memcpy(writePtr, data, length);
 		writePtr += length;
-		writeBlock->length = writePtr - (UCHAR*) writeBlock;
-		writeWindow->currentLength = writePtr - writeWindow->buffer;
+		writeBlock->length = (int) (writePtr - (UCHAR*) writeBlock);
+		writeWindow->currentLength = (int) (writePtr - writeWindow->buffer);
 		ASSERT(writePtr < writeWindow->warningTrack);
 
 		return;
@@ -577,9 +577,9 @@
 	// Data didn't fit in block -- find out how much didn't fit, then flush the rest
 	// Note: the record code is going to be overwritten by an srlEnd byte.
 
-	int tailLength = writePtr - recordStart;
+	int tailLength = (int) (writePtr - recordStart);
 	UCHAR recordCode = *recordStart;						
-	writeBlock->length = recordStart - (UCHAR*) writeBlock;
+	writeBlock->length = (int) (recordStart - (UCHAR*) writeBlock);
 	writePtr = recordStart;
 	//flush(true, 0, NULL);
 	overflowFlush();
@@ -607,7 +607,7 @@
 
 	memcpy(writePtr, data, length);
 	writePtr += length;
-	writeBlock->length = writePtr - (UCHAR*) writeBlock;
+	writeBlock->length = (int) (writePtr - (UCHAR*) writeBlock);
 	recordStart = writeBlock->data;
 	ASSERT(writePtr < writeWindow->warningTrack);
 }
@@ -857,7 +857,7 @@
 	writePtr = writeBlock->data;
 	writeBlock->blockNumber = nextBlockNumber;
 	writeBlock->creationTime = (uint32) creationTime;
-	writeBlock->length = writePtr - (UCHAR*) writeBlock;
+	writeBlock->length = (int) (writePtr - (UCHAR*) writeBlock);
 	writeWindow->setLastBlock(writeBlock);
 	
 	writeWarningTrack = writeWindow->warningTrack;

--- 1.35/storage/falcon/SerialLogControl.cpp	2007-06-01 17:03:16 -04:00
+++ 1.36/storage/falcon/SerialLogControl.cpp	2007-06-01 17:03:16 -04:00
@@ -332,7 +332,7 @@
 
 int SerialLogControl::getOffset()
 {
-	return input - (const UCHAR*) inputBlock;
+	return (int) (input - (const UCHAR*) inputBlock);
 }
 
 uint64 SerialLogControl::getBlockNumber()

--- 1.14/storage/falcon/SerialLogRecord.cpp	2007-06-01 17:03:16 -04:00
+++ 1.15/storage/falcon/SerialLogRecord.cpp	2007-06-01 17:03:16 -04:00
@@ -119,7 +119,7 @@
 		*p++ = (value >> (lengthShifts [count])) & 0x7f;
 
 	*p++ = value | LOW_BYTE_FLAG;
-	putData(p - data, data);
+	putData((int) (p - data), data);
 }
 
 void SerialLogRecord::putInt64(int64 value)
@@ -131,7 +131,7 @@
 		*p++ = (UCHAR) (value >> (lengthShifts [count])) & 0x7f;
 
 	*p++ = ((UCHAR) value) | LOW_BYTE_FLAG;
-	putData(p - data, data);
+	putData((int) (p - data), data);
 }
 
 UCHAR* SerialLogRecord::putFixedInt(int value)
@@ -143,7 +143,7 @@
 		*p++ = (value >> (lengthShifts [count])) & 0x7f;
 
 	*p++ = value | LOW_BYTE_FLAG;
-	putData(p - data, data);
+	putData((int) (p - data), data);
 	
 	return log->writePtr - FIXED_INT_LENGTH;
 }

--- 1.18/storage/falcon/SerialLogTransaction.cpp	2007-06-01 17:03:16 -04:00
+++ 1.19/storage/falcon/SerialLogTransaction.cpp	2007-06-01 17:03:16 -04:00
@@ -111,8 +111,8 @@
 	blockNumber = block->blockNumber;
 	minBlockNumber = blockNumber;
 	maxBlockNumber = blockNumber;
-	blockOffset = (UCHAR*) block - window->buffer;
-	recordOffset = record - block->data;
+	blockOffset = (int) ((UCHAR*) block - window->buffer);
+	recordOffset = (int) (record - block->data);
 }
 
 void SerialLogTransaction::setState(sltState newState)

--- 1.22/storage/falcon/SerialLogWindow.cpp	2007-06-01 17:03:16 -04:00
+++ 1.23/storage/falcon/SerialLogWindow.cpp	2007-06-01 17:03:16 -04:00
@@ -103,10 +103,10 @@
 SerialLogBlock* SerialLogWindow::write(SerialLogBlock *block)
 {
 	uint32 length = ROUNDUP(block->length, sectorSize);
-	uint32 offset = origin + (UCHAR*) block - buffer;
+	uint32 offset = (int) (origin + ((UCHAR*) block - buffer));
 	file->write(offset, length, block);
 	++log->windowWrites;
-	currentLength = (UCHAR*) block + length - buffer;
+	currentLength = (int32) ((UCHAR*) block + length - buffer);
 	UCHAR *ptr = (UCHAR*) block + length;
 
 	if (ptr >= bufferEnd)
@@ -149,7 +149,7 @@
 			 block->creationTime != log->creationTime || 
 			 block->blockNumber != ++blockNumber)
 			{
-			currentLength = ((const UCHAR*) block) - buffer;
+			currentLength = (int) (((const UCHAR*) block) - buffer);
 			lastBlockNumber = prior->blockNumber;
 
 			return lastBlock = prior;
@@ -158,7 +158,7 @@
 		if (endBlock[-1] != (srlEnd | LOW_BYTE_FLAG))
 			{
 			Log::log("damaged serial log block " I64FORMAT "\n", block->blockNumber);
-			currentLength = ((const UCHAR*) block) - buffer;
+			currentLength = (int) ((const UCHAR*) block - buffer);
 			lastBlockNumber = prior->blockNumber;
 
 			return lastBlock = prior;
@@ -278,7 +278,7 @@
 	ASSERT(block->blockNumber >= firstBlock()->blockNumber);
 	ASSERT(block->blockNumber <= log->nextBlockNumber);
 	lastBlock = block;
-	lastBlockOffset = (UCHAR*) block - buffer;
+	lastBlockOffset = (int) ((UCHAR*) block - buffer);
 	lastBlockNumber = block->blockNumber;
 }
 

--- 1.8/storage/falcon/Socket.cpp	2007-06-01 17:03:17 -04:00
+++ 1.9/storage/falcon/Socket.cpp	2007-06-01 17:03:17 -04:00
@@ -89,7 +89,7 @@
 	socket = CLOSED_SOCKET;
 }
 
-Socket::Socket(int sock, sockaddr_in *addr)
+Socket::Socket(socket_t sock, sockaddr_in *addr)
 {
 	init();
 	socket = sock;

--- 1.4/storage/falcon/Socket.h	2007-06-01 17:03:17 -04:00
+++ 1.5/storage/falcon/Socket.h	2007-06-01 17:03:17 -04:00
@@ -106,7 +106,7 @@
 	void getBytes (int count, void* buffer);
 	int flush();
 	int read();
-	Socket (int sock, sockaddr_in *addr);
+	Socket (socket_t sock, sockaddr_in *addr);
 	void bind (int ipAddress, int port);
 	Socket();
 	virtual ~Socket();
Thread
bk commit into 6.0-falcon tree (jas:1.2532)U-ROWVWADEjas1 Jun