From 820a9c5f3464d85a8998ecde16fca332522239a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 3 Aug 2005 13:46:38 +0200 Subject: [PATCH] Portability fixes: - Moved a few DBUG_ENTER statements after the variable declarations to satisfy some compilers (e.g. gcc-2.95.x, gcc-2.96, IBM xlc_r) in ndb/src/common/portlib/NdbMutex.c and ndb/src/common/portlib/NdbThread.c - portability fix for FreeBSD 4.x and HPUX: replaced atoll() with strtoll() in ndb/tools/config.cpp ndb/src/common/portlib/NdbMutex.c: - Moved a few DBUG_ENTER statements after the variable declarations to satisfy some compilers (e.g. gcc-2.95.x, gcc-2.96, IBM xlc_r) ndb/src/common/portlib/NdbThread.c: - Moved a DBUG_ENTER statement after the variable declarations to satisfy some compilers (e.g. gcc-2.95.x, gcc-2.96, IBM xlc_r) ndb/tools/config.cpp: - portability fix for FreeBSD 4.x and HPUX: replaced atoll() with strtoll() --- ndb/src/common/portlib/NdbMutex.c | 4 ++-- ndb/src/common/portlib/NdbThread.c | 2 +- ndb/tools/config.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ndb/src/common/portlib/NdbMutex.c b/ndb/src/common/portlib/NdbMutex.c index 18f8548e4e6..4a170d87e5c 100644 --- a/ndb/src/common/portlib/NdbMutex.c +++ b/ndb/src/common/portlib/NdbMutex.c @@ -23,9 +23,9 @@ NdbMutex* NdbMutex_Create(void) { - DBUG_ENTER("NdbMutex_Create"); NdbMutex* pNdbMutex; int result; + DBUG_ENTER("NdbMutex_Create"); pNdbMutex = (NdbMutex*)NdbMem_Allocate(sizeof(NdbMutex)); DBUG_PRINT("info",("NdbMem_Allocate 0x%lx",pNdbMutex)); @@ -42,8 +42,8 @@ NdbMutex* NdbMutex_Create(void) int NdbMutex_Destroy(NdbMutex* p_mutex) { - DBUG_ENTER("NdbMutex_Destroy"); int result; + DBUG_ENTER("NdbMutex_Destroy"); if (p_mutex == NULL) DBUG_RETURN(-1); diff --git a/ndb/src/common/portlib/NdbThread.c b/ndb/src/common/portlib/NdbThread.c index cee4ec018a0..55ebc4c8111 100644 --- a/ndb/src/common/portlib/NdbThread.c +++ b/ndb/src/common/portlib/NdbThread.c @@ -71,10 +71,10 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func, const char* p_thread_name, NDB_THREAD_PRIO thread_prio) { - DBUG_ENTER("NdbThread_Create"); struct NdbThread* tmpThread; int result; pthread_attr_t thread_attr; + DBUG_ENTER("NdbThread_Create"); (void)thread_prio; /* remove warning for unused parameter */ diff --git a/ndb/tools/config.cpp b/ndb/tools/config.cpp index 7944f66f71c..d188aec1337 100644 --- a/ndb/tools/config.cpp +++ b/ndb/tools/config.cpp @@ -359,7 +359,7 @@ Match::eval(NdbMgmHandle h, const Iter& iter) } else if(iter.get(m_key, &val64) == 0) { - if(atoll(m_value.c_str()) != val64) + if(strtoll(m_value.c_str(), (char **)NULL, 10) != val64) return 0; } else if(iter.get(m_key, &valc) == 0)