Skip to content

Commit

Permalink
+ uint_64 maps to long long int on x86_64 on Darwin (Fixed with casting)
Browse files Browse the repository at this point in the history
+ Need to replace %ld with PRId64 macro but this will break VOLT_ERROR macro
  • Loading branch information
Joy Arulraj committed Sep 7, 2013
1 parent b6714a9 commit 5c64bd9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/ee/common/UndoLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ namespace voltdb

inline UndoQuantum* generateUndoQuantum(int64_t nextUndoToken) {
VOLT_TRACE("Generating token %ld / lastUndo:%ld / lastRelease:%ld / undoQuantums:%ld",
nextUndoToken, m_lastUndoToken, m_lastReleaseToken, m_undoQuantums.size());
(long int)nextUndoToken, (long int)m_lastUndoToken, (long int)m_lastReleaseToken, (long int)m_undoQuantums.size());

// Since ExecutionSite is using monotonically increasing
// token values, every new quanta we're asked to generate should be
// larger than any token value we've seen before
#ifdef VOLT_ERROR_ENABLED
if (nextUndoToken <= m_lastUndoToken) {
VOLT_ERROR("nextUndoToken[%ld] is less than or equal to m_lastUndoToken[%ld]",
nextUndoToken, m_lastUndoToken);
(long int)nextUndoToken, (long int)m_lastUndoToken);
}
#endif
assert(nextUndoToken > m_lastUndoToken);

#ifdef VOLT_ERROR_ENABLED
if (nextUndoToken <= m_lastReleaseToken) {
VOLT_ERROR("nextUndoToken[%ld] is less than or equal to m_lastReleaseToken[%ld]",
nextUndoToken, m_lastReleaseToken);
(long int)nextUndoToken, (long int)m_lastReleaseToken);
}
#endif
assert(nextUndoToken > m_lastReleaseToken);
Expand All @@ -77,7 +77,7 @@ namespace voltdb
new (pool->allocate(sizeof(UndoQuantum)))
UndoQuantum(nextUndoToken, pool);
m_undoQuantums.push_back(undoQuantum);
VOLT_TRACE("Created new UndoQuantum %ld", nextUndoToken);
VOLT_TRACE("Created new UndoQuantum %ld", (long int)nextUndoToken);
return undoQuantum;
}

Expand All @@ -96,7 +96,7 @@ namespace voltdb
#ifdef VOLT_ERROR_ENABLED
if (undoToken < m_lastReleaseToken) {
VOLT_ERROR("undoToken[%ld] is less than m_lastReleaseToken[%ld]",
undoToken, m_lastReleaseToken);
(long int)undoToken, (long int)m_lastReleaseToken);
}
#endif
assert(undoToken >= m_lastReleaseToken);
Expand Down Expand Up @@ -153,11 +153,11 @@ namespace voltdb
#ifdef VOLT_ERROR_ENABLED
if (startToken < m_lastReleaseToken) {
VOLT_ERROR("startToken[%ld] is less than m_lastReleaseToken[%ld]",
startToken, m_lastReleaseToken);
(long int)startToken, (long int)m_lastReleaseToken);
}
if (stopToken < m_lastReleaseToken) {
VOLT_ERROR("stopToken[%ld] is less than m_lastReleaseToken[%ld]",
stopToken, m_lastReleaseToken);
(long int)stopToken, (long int)m_lastReleaseToken);
}
#endif
assert(startToken >= m_lastReleaseToken);
Expand Down Expand Up @@ -237,7 +237,7 @@ namespace voltdb
#ifdef VOLT_ERROR_ENABLED
if (m_lastReleaseToken >= undoToken) {
VOLT_ERROR("m_lastReleaseToken[%ld] is greater than or equal to undoToken[%ld]",
m_lastReleaseToken, undoToken);
(long int)m_lastReleaseToken, (long int)undoToken);
}
#endif
assert(m_lastReleaseToken < undoToken);
Expand Down

0 comments on commit 5c64bd9

Please sign in to comment.